PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
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 */
43
}
pthread_cond_t
;
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
54
QUARK_DLLPORT
pthread_t
QUARK_CDECL
pthread_self
(
void
);
55
QUARK_DLLPORT
int
QUARK_CDECL
pthread_mutex_init
(
pthread_mutex_t
*mutex,
const
pthread_mutexattr_t
* attr);
56
QUARK_DLLPORT
int
QUARK_CDECL
pthread_mutex_destroy
(
pthread_mutex_t
*mutex);
57
QUARK_DLLPORT
int
QUARK_CDECL
pthread_mutex_lock
(
pthread_mutex_t
*mutex);
58
QUARK_DLLPORT
int
QUARK_CDECL
pthread_mutex_trylock
(
pthread_mutex_t
*mutex);
59
QUARK_DLLPORT
int
QUARK_CDECL
pthread_mutex_unlock
(
pthread_mutex_t
*mutex);
60
QUARK_DLLPORT
int
QUARK_CDECL
pthread_attr_init
(
pthread_attr_t
*attr);
61
QUARK_DLLPORT
int
QUARK_CDECL
pthread_attr_destroy
(
pthread_attr_t
*attr);
62
QUARK_DLLPORT
int
QUARK_CDECL
pthread_attr_setscope
(
pthread_attr_t
*attr,
int
scope);
63
QUARK_DLLPORT
int
QUARK_CDECL
pthread_create
(
pthread_t
*tid,
const
pthread_attr_t
*attr,
void
*(*start) (
void
*),
void
*arg);
64
QUARK_DLLPORT
int
QUARK_CDECL
pthread_cond_init
(
pthread_cond_t
*cond,
const
pthread_condattr_t
*attr);
65
QUARK_DLLPORT
int
QUARK_CDECL
pthread_cond_destroy
(
pthread_cond_t
*cond);
66
QUARK_DLLPORT
int
QUARK_CDECL
pthread_cond_wait
(
pthread_cond_t
*cond,
pthread_mutex_t
*mutex);
67
QUARK_DLLPORT
int
QUARK_CDECL
pthread_cond_broadcast
(
pthread_cond_t
*cond);
68
QUARK_DLLPORT
int
QUARK_CDECL
pthread_join
(
pthread_t
thread,
void
**value_ptr);
69
QUARK_DLLPORT
int
QUARK_CDECL
pthread_equal
(
pthread_t
thread1,
pthread_t
thread2);
70
71
QUARK_DLLPORT
int
QUARK_CDECL
pthread_setconcurrency
(
int
);
72
73
QUARK_DLLPORT
unsigned
int
QUARK_CDECL
pthread_self_id
(
void
);
74
75
#endif
plasma_2.4.5
quark
quarkwinthread.h
Generated on Mon Jul 9 2012 12:45:03 for PLASMA by
1.8.1