"Fossies" - the Fresh Open Source Software Archive

Member "usr/include/sys/_pthreadtypes.h" (19 Aug 2019, 2091 Bytes) of package /windows/misc/cygwin-20190819-x86_64.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* sys/_pthreadtypes.h
    2 
    3 This file is part of Cygwin.
    4 
    5 This software is a copyrighted work licensed under the terms of the
    6 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
    7 details. */
    8 
    9 #ifndef _SYS__PTHREADTYPES_H_
   10 #define _SYS__PTHREADTYPES_H_
   11 
   12 #include <sys/cpuset.h>
   13 
   14 #if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus)
   15 
   16 typedef struct __pthread_t {char __dummy;} *pthread_t;
   17 typedef struct __pthread_mutex_t {char __dummy;} *pthread_mutex_t;
   18 
   19 typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
   20 typedef struct __pthread_attr_t {char __dummy;} *pthread_attr_t;
   21 typedef struct __pthread_mutexattr_t {char __dummy;} *pthread_mutexattr_t;
   22 typedef struct __pthread_condattr_t {char __dummy;} *pthread_condattr_t;
   23 typedef struct __pthread_cond_t {char __dummy;} *pthread_cond_t;
   24 typedef struct __pthread_barrierattr_t {char __dummy;} *pthread_barrierattr_t;
   25 typedef struct __pthread_barrier_t {char __dummy;} *pthread_barrier_t;
   26 
   27   /* These variables are not user alterable. This means you!. */
   28 typedef struct
   29 {
   30   pthread_mutex_t mutex;
   31   int state;
   32 }
   33 pthread_once_t;
   34 typedef struct __pthread_spinlock_t {char __dummy;} *pthread_spinlock_t;
   35 typedef struct __pthread_rwlock_t {char __dummy;} *pthread_rwlock_t;
   36 typedef struct __pthread_rwlockattr_t {char __dummy;} *pthread_rwlockattr_t;
   37 
   38 #else
   39 
   40 /* pthreads types */
   41 
   42 typedef class pthread *pthread_t;
   43 typedef class pthread_mutex *pthread_mutex_t;
   44 typedef class pthread_key *pthread_key_t;
   45 typedef class pthread_attr *pthread_attr_t;
   46 typedef class pthread_mutexattr *pthread_mutexattr_t;
   47 typedef class pthread_condattr *pthread_condattr_t;
   48 typedef class pthread_cond *pthread_cond_t;
   49 typedef class pthread_barrier *pthread_barrier_t;
   50 typedef class pthread_barrierattr *pthread_barrierattr_t;
   51 typedef class pthread_once pthread_once_t;
   52 typedef class pthread_spinlock *pthread_spinlock_t;
   53 typedef class pthread_rwlock *pthread_rwlock_t;
   54 typedef class pthread_rwlockattr *pthread_rwlockattr_t;
   55 
   56 /* semaphores types */
   57 typedef class semaphore *sem_t;
   58 #endif /* __INSIDE_CYGWIN__ */
   59 
   60 #endif /* ! _SYS__PTHREADTYPES_H_ */