FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
fb_thread.h
Go to the documentation of this file.
1
typedef
void (
FBCALL
*
FB_THREADPROC
)(
void
*param );
2
3
struct
_FBTHREAD
;
4
typedef
struct
_FBTHREAD
FBTHREAD
;
5
6
struct
_FBMUTEX;
7
typedef
struct
_FBMUTEX
FBMUTEX
;
8
9
struct
_FBCOND
;
10
typedef
struct
_FBCOND
FBCOND
;
11
12
FBCALL
FBTHREAD
*
fb_ThreadCreate
(
FB_THREADPROC
proc
,
void
*param, ssize_t stack_size );
13
FBCALL
void
fb_ThreadWait
(
FBTHREAD
*
thread
);
14
15
FBTHREAD
*
fb_ThreadCall
(
void
*
proc
,
int
abi, ssize_t stack_size,
int
num_args, ... );
16
17
FBCALL
FBMUTEX
*
fb_MutexCreate
(
void
);
18
FBCALL
void
fb_MutexDestroy
(
FBMUTEX
*
mutex
);
19
FBCALL
void
fb_MutexLock
(
FBMUTEX
*
mutex
);
20
FBCALL
void
fb_MutexUnlock
(
FBMUTEX
*
mutex
);
21
22
FBCALL
FBCOND
*
fb_CondCreate
(
void
);
23
FBCALL
void
fb_CondDestroy
(
FBCOND
*
cond
);
24
FBCALL
void
fb_CondSignal
(
FBCOND
*
cond
);
25
FBCALL
void
fb_CondBroadcast
(
FBCOND
*
cond
);
26
FBCALL
void
fb_CondWait
(
FBCOND
*
cond
,
FBMUTEX
*
mutex
);
27
28
/**************************************************************************************************
29
* per-thread local storage context
30
**************************************************************************************************/
31
32
enum
{
33
FB_TLSKEY_ERROR
,
34
FB_TLSKEY_DIR
,
35
FB_TLSKEY_INPUT
,
36
FB_TLSKEY_PRINTUSG
,
37
FB_TLSKEY_GFX
,
38
FB_TLSKEYS
39
};
40
41
FBCALL
void
*
fb_TlsGetCtx
(
int
index,
size_t
len );
42
FBCALL
void
fb_TlsDelCtx
(
int
index );
43
FBCALL
void
fb_TlsFreeCtxTb
(
void
);
44
#ifdef ENABLE_MT
45
void
fb_TlsInit (
void
);
46
void
fb_TlsExit (
void
);
47
#endif
48
49
#define FB_TLSGETCTX(id) (FB_##id##CTX *)fb_TlsGetCtx( FB_TLSKEY_##id, sizeof( FB_##id##CTX ) );
rtlib
fb_thread.h
Generated on Thu Jan 23 2014 19:40:11 for FreeBASIC by
1.8.4