Skip to content

Commit

Permalink
pthread_once_t change for major version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
rocso committed Apr 6, 2016
1 parent 59c8db6 commit cd999ac
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,16 +488,30 @@ enum
* ====================
* ====================
*/
#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0}
#if PTW32_VERSION_MAJOR > 2

#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0 }

struct pthread_once_t_
{
int done; /* indicates if user function has been executed */
void * lock;
void * lock; /* MCS lock */
int done; /* indicates if user function has been executed */
};

#else

#define PTHREAD_ONCE_INIT { PTW32_FALSE, 0, 0, 0 }

struct pthread_once_t_
{
int done; /* indicates if user function has been executed */
void * lock; /* MCS lock */
int reserved1;
int reserved2;
};

#endif


/*
* ====================
Expand Down

0 comments on commit cd999ac

Please sign in to comment.