RetroArch
psp_osal.h
Go to the documentation of this file.
1 /*
2  * psp_osal.h
3  *
4  * Description:
5  *
6  * --------------------------------------------------------------------------
7  *
8  * Pthreads-embedded (PTE) - POSIX Threads Library for embedded systems
9  * Copyright(C) 2008 Jason Schmidlapp
10  *
11  * Contact Email: [email protected]
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library in the file COPYING.LIB;
25  * if not, write to the Free Software Foundation, Inc.,
26  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
27  */
28 
29 #include <pspsdk.h>
30 
32 
34 
36 
37 
38 #define OS_IS_HANDLE_VALID(x) ((x) > 0)
39 
40 #define OS_MAX_SIMUL_THREADS 10
41 
42 #define OS_DEFAULT_PRIO 11
43 
44 #define OS_MIN_PRIO 17
45 #define OS_MAX_PRIO 32
46 
47 #if 0
48 #define HAVE_THREAD_SAFE_ERRNO
49 #endif
50 
51 #define POLLING_DELAY_IN_us 100
52 
53 #define OS_MAX_SEM_VALUE 254
54 
55 int PspInterlockedExchange(int *ptarg, int val);
56 int PspInterlockedCompareExchange(int *pdest, int exchange, int comp);
57 int PspInterlockedExchangeAdd(int volatile* pAddend, int value);
58 int PspInterlockedDecrement(int *pdest);
59 int PspInterlockedIncrement(int *pdest);
60 
61 
62 
63 
SceUID pte_osThreadHandle
Definition: psp_osal.h:31
int PspInterlockedExchangeAdd(int volatile *pAddend, int value)
GLuint GLfloat * val
Definition: glext.h:7847
int PspInterlockedExchange(int *ptarg, int val)
SceUID pte_osSemaphoreHandle
Definition: psp_osal.h:33
int PspInterlockedIncrement(int *pdest)
SceUID pte_osMutexHandle
Definition: psp_osal.h:35
int SceUID
Definition: pte_types.h:24
int PspInterlockedDecrement(int *pdest)
GLsizei const GLfloat * value
Definition: glext.h:6709
int PspInterlockedCompareExchange(int *pdest, int exchange, int comp)