RetroArch
cond.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------
2 
3 cond.h -- Thread subsystem V
4 
5 Copyright (C) 2004
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
8 
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any
11 damages arising from the use of this software.
12 
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
16 
17 1. The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
21 
22 2. Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
24 
25 3. This notice may not be removed or altered from any source
26 distribution.
27 
28 -------------------------------------------------------------*/
29 
30 
31 #ifndef __COND_H__
32 #define __COND_H__
33 
39 #include <gctypes.h>
40 #include <time.h>
41 
42 #define LWP_COND_NULL 0xffffffff
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 
52 typedef u32 cond_t;
53 
54 
62 
63 
72 
73 
81 
82 
90 
91 
100 s32 LWP_CondTimedWait(cond_t cond,mutex_t mutex,const struct timespec *abstime);
101 
102 
110 
111 #ifdef __cplusplus
112  }
113 #endif
114 
115 #endif
int32_t s32
32bit signed integer
Definition: gctypes.h:24
int mutex_t
typedef for the mutex handle
Definition: lock.c:6
Data type definitions.
static int cond(LexState *ls)
Definition: lparser.c:1177
static sys_sem mutex
Definition: memp.c:120
s32 LWP_CondDestroy(cond_t cond)
Destroy condition variable, release all threads and handles blocked on that condition variable.
Definition: cond.c:186
s32 LWP_CondSignal(cond_t cond)
Signal a specific thread waiting on this condition variable to wake up.
Definition: cond.c:167
s32 LWP_CondWait(cond_t cond, mutex_t mutex)
Wait on condition variable.
Definition: cond.c:162
u32 cond_t
typedef for the condition variable handle
Definition: cond.h:52
s32 LWP_CondBroadcast(cond_t cond)
Broadcast all threads waiting on this condition variable to wake up.
Definition: cond.c:172
s32 LWP_CondTimedWait(cond_t cond, mutex_t mutex, const struct timespec *abstime)
Timed wait on a conditionvariable.
Definition: cond.c:177
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
s32 LWP_CondInit(cond_t *cond)
Initialize condition variable.
Definition: cond.c:144