MAGMA
1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
magmawinthread.h
Go to the documentation of this file.
1
18
#ifndef MAGMAWINTHREAD_H
19
#define MAGMAWINTHREAD_H
20
21
#include <windows.h>
22
23
/*
24
typedef struct pthread_s {
25
HANDLE Hth;
26
unsigned IDth;
27
void *(*Fth) (void *);
28
} pthread_t;
29
*/
30
typedef
struct
pthread_s
{
31
HANDLE
hThread
;
32
unsigned
int
uThId
;
33
}
pthread_t
;
34
35
typedef
HANDLE
pthread_mutex_t
;
36
typedef
int
pthread_mutexattr_t
;
37
typedef
int
pthread_attr_t
;
38
typedef
int
pthread_condattr_t
;
39
40
typedef
struct
pthread_cond_s
{
41
HANDLE
hSem
;
42
HANDLE
hEvt
;
43
CRITICAL_SECTION
cs
;
44
int
waitCount
;
/* waiting thread counter */
45
}
pthread_cond_t
;
46
47
typedef
int
pthread_attr_t
;
48
49
#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) -1)
50
51
#define PTHREAD_SCOPE_SYSTEM 1
52
53
#define MAGMA_DLLPORT
54
#define MAGMA_CDECL __cdecl
55
56
MAGMA_DLLPORT
pthread_t
MAGMA_CDECL
pthread_self
(
void
);
57
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_mutex_init
(
pthread_mutex_t
*mutex,
const
pthread_mutexattr_t
* attr);
58
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_mutex_destroy
(
pthread_mutex_t
*mutex);
59
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_mutex_lock
(
pthread_mutex_t
*mutex);
60
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_mutex_trylock
(
pthread_mutex_t
*mutex);
61
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_mutex_unlock
(
pthread_mutex_t
*mutex);
62
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_attr_init
(
pthread_attr_t
*attr);
63
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_attr_destroy
(
pthread_attr_t
*attr);
64
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_attr_setscope
(
pthread_attr_t
*attr,
int
scope);
65
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_create
(
pthread_t
*tid,
const
pthread_attr_t
*attr,
void
*(*start) (
void
*),
void
*arg);
66
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_cond_init
(
pthread_cond_t
*cond,
const
pthread_condattr_t
*attr);
67
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_cond_destroy
(
pthread_cond_t
*cond);
68
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_cond_wait
(
pthread_cond_t
*cond,
pthread_mutex_t
*mutex);
69
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_cond_broadcast
(
pthread_cond_t
*cond);
70
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_join
(
pthread_t
thread,
void
**value_ptr);
71
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_equal
(
pthread_t
thread1,
pthread_t
thread2);
72
73
MAGMA_DLLPORT
int
MAGMA_CDECL
pthread_setconcurrency
(
int
);
74
75
MAGMA_DLLPORT
unsigned
int
MAGMA_CDECL
pthread_self_id
(
void
);
76
77
#endif
magma-1.2.0
control
magmawinthread.h
Generated on Mon May 21 2012 16:42:19 for MAGMA by
1.8.1