QUARK  0.9.0
QUARK-QUeuingAndRuntimeforKernels
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
quarkwinthread.h
Go to the documentation of this file.
1 
16 #ifndef PLASMWINTHREAD_H
17 #define PLASMWINTHREAD_H
18 
19 #include <windows.h>
20 
21 /*
22 typedef struct pthread_s {
23  HANDLE Hth;
24  unsigned IDth;
25  void *(*Fth) (void *);
26 } pthread_t;
27 */
28 typedef struct pthread_s {
29  HANDLE hThread;
30  unsigned int uThId;
31 } pthread_t;
32 
33 typedef HANDLE pthread_mutex_t;
34 typedef int pthread_mutexattr_t;
35 typedef int pthread_attr_t;
36 typedef int pthread_condattr_t;
37 
38 typedef struct pthread_cond_s {
39  HANDLE hSem;
40  HANDLE hEvt;
41  CRITICAL_SECTION cs;
42  int waitCount; /* waiting thread counter */
44 
45 typedef int pthread_attr_t;
46 
47 #define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) -1)
48 
49 #define PTHREAD_SCOPE_SYSTEM 1
50 
51 #define QUARK_DLLPORT
52 #define QUARK_CDECL __cdecl
53 
63 QUARK_DLLPORT int QUARK_CDECL pthread_create(pthread_t *tid, const pthread_attr_t *attr, void *(*start) (void *), void *arg);
68 QUARK_DLLPORT int QUARK_CDECL pthread_join(pthread_t thread, void **value_ptr);
70 
72 
73 QUARK_DLLPORT unsigned int QUARK_CDECL pthread_self_id(void);
74 
75 #endif