DragonFly submit List (threaded) for 2007-08
DragonFly BSD
DragonFly submit List (threaded) for 2007-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [PATCH] [V2] add options to ps(1) to display lwp data


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Aug 2007 01:37:39 -0700 (PDT)

:It wasn't ment to be a pointer, just an identifier.  And the td pointer is a perfect identifier.  Of course, it doesn't format as nicely as a small number, but so what.  pid == -1 means kernel, tid *always* means thread identifier.
:
:cheers
:  simon

    It can't be negative and I don't want to hack around the fact by masking
    it with 0x7fffffff, because that requires visibility into the machine
    layer to work properly in 64 bit environments.  Also, there's nothing
    that says the TID is going to be the same or similar in size to a pointer,
    and userland does in fact need the TID because that's what you specify
    when you send signals.

    We can't just use a thread pointer between userland and the kernel.
    The kernel has to validate the ID passed to it either way so it just
    doesn't save any work at all to do that.

						-Matt




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]