{make,set,swap}context broken on powerpc32

Ulrich Drepper drepper@redhat.com
Wed Dec 13 02:02:00 GMT 2006


Paul Mackerras wrote:
> Does that last sentence mean that it is the programmer's
> responsibility to avoid using __thread variables entirely if he/she is
> using setcontext or swapcontext anywhere in his/her program?  Or did
> you mean something different?

It means they must be avoided if they are needed across scheduling 
points (i.e., makecontext calls).  Using __thread (e.g., via OpenMP) is 
perfectly fine as long as the entire block of code cannot be interrupted 
by a makecontext call.  And these calls don't sneak up on you, it's 
cooperative scheduling.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖



More information about the Libc-alpha mailing list