This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 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: starvation in pthread_once?


> DCSI-TLS: (__declspec(thread) for control variable; DLL issues
> aside for a moment)
>
>   if (!once_control) {
>     named_mutex::guard guard(&once_control);
>     if (!once_control) {
>       <init>
>       once_control = true;
>     }
>   }

Sorry, I meant:

  if (!once_control) {
    named_mutex::guard guard(&once_control);
    if (!once_control2) {
      <init>
      once_control2 = true;
    }
    once_control = true;
  }

where once_control2 is a non-TLS flag.

regards,
alexander.



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