Bug 4035 - MacOS threading issues
: MacOS threading issues
Status: NEW
: Toolkit Internals
globus_common
: development
: All MacOS
: P3 normal
: ---
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2005-12-07 17:32 by
Modified: 2005-12-07 17:32 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2005-12-07 17:32:16
As mentioned in http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=3798

Find out the effect of setting:

#define _POSIX_C_SOURCE 200112L

this is required on Mac OS X in order to get correct POSIX behaviour  
from the threads APIs. For instance,
threads waiting on a condition variable are not canceled like they  
are supposed to be unless you define the macro.
Of course this has a strong impact on Globus threaded code.

Both POSIX and non-POSIX behaviours are available as of Tiger (Mac OS  
10.4).
If you are running on a newer MacOS X (e.g. you are running Tiger/ 
Cambridge Update), then before including the headers, simply do a:

  #define _POSIX_C_SOURCE 200112L

to ask for POSIX standard behaviour from the threads APIs.  This will  
also ask all the other API usages for variant APIs in that  
compilation unit to have more standard POSIX behaviour, and it will  
prevent the prototypes and manifest constants for non-POSIX APIs  
being visible, so you may need to break up your compilation units, if  
you need to use any non-POSIX APIs.

Thus, GT threaded code must define the macro to get correct POSIX  
behaviour on Mac OS 10.4 Tiger. Defining the macro should not cause  
problems on other unix platforms.