[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sat May 23 10:27:21 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=14617
Steven Schveighoffer <schveiguy at yahoo.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy at yahoo.com
--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> ---
According to testing:
Stevens-MacBook-Pro:testd steves$ cat pthreadm.cpp 
#include <pthread.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
    pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;
    unsigned char *b = (unsigned char *)&x;
    unsigned char *e = (unsigned char *)((&x) + 1);
    while(b != e)
        printf("%02x ", (int)*b++);
    printf("\n");
}
Stevens-MacBook-Pro:testd steves$ ./pthreadm
a7 ab aa 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 
So that jives with Martin's research. I'll see about a PR.
--
    
    
More information about the Digitalmars-d-bugs
mailing list