This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linuxthread race condition


> Would this thread_self_stack work with FLOATING_STACKS?  What if the stack
> size of the new thread is wildly different from STACK_SIZE?  I don't think
> that thread_self_stack can always return a valid thread descriptor.

You're right, I forgot about FLOATING_STACKS at first.  However,
thread_self_stack could look like the existing __pthread_find_self,
except that it would also look for the initial thread and the manager
thread's stack.  Certainly slower, but in the normal case where it is
only the manager stack that needs to be found, it is fast enough, I
believe (just 4 or so pointer comparisons).

Regards,
Wolfram.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]