This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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: {make,set,swap}context broken on powerpc32


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 â


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