FreeBSD pthread_equal "bug"

Terry Lambert tlambert2 at mindspring.com
Thu Jun 5 04:42:44 PDT 2003


Daniel Eischen wrote:
> Process id's can wrap around so it can eventually happen.
> 
> This is a bug in the application; the implementation is allowed
> to reuse thread id's and there are enough interfaces for an
> application to tell when a thread terminates (pthread_join).
> 
> Perhaps our use of thread id's could be changes so that they
> were cached at the end of the free thread list, but cacheing
> them at the front seems to highlight bad applications, so
> that's a bonus ;-)

So's not explicitly protecting dlopen(), and so's not forcing
rescheduling of the thread that was running at preemption time,
when returning from an involuntary preemption. ;^).

If you're willing to hack around these two, why not the thread
ID as well?  8-) 8-).

-- Terry


More information about the freebsd-threads mailing list