aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gos/gos_linux.c')
-rw-r--r--src/gos/gos_linux.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gos/gos_linux.c b/src/gos/gos_linux.c
index 5a098509..f7ac1f78 100644
--- a/src/gos/gos_linux.c
+++ b/src/gos/gos_linux.c
@@ -25,7 +25,7 @@
#define linuxyield() pthread_yield()
#endif
-static gfxMutex SystemMutex;
+static gMutex SystemMutex;
void _gosInit(void)
{
@@ -109,7 +109,7 @@ gTicks gfxSystemTicks(void) {
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}
-gThread gfxThreadCreate(void *stackarea, gMemSize stacksz, gThreadpriority prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param) {
+gThread gfxThreadCreate(void *stackarea, gMemSize stacksz, gThreadpriority prio, GFX_THREAD_FUNCTION((*fn),p), void *param) {
gThread th;
(void) stackarea;
(void) stacksz;
@@ -138,14 +138,14 @@ gThreadreturn gfxThreadWait(gThread thread) {
}
#if GFX_USE_POSIX_SEMAPHORES
- void gfxSemInit(gfxSem *pSem, gSemcount val, gSemcount limit) {
+ void gfxSemInit(gSem *pSem, gSemcount val, gSemcount limit) {
pSem->max = limit;
sem_init(&pSem->sem, 0, val);
}
- void gfxSemDestroy(gfxSem *pSem) {
+ void gfxSemDestroy(gSem *pSem) {
sem_destroy(&pSem->sem);
}
- gBool gfxSemWait(gfxSem *pSem, gDelay ms) {
+ gBool gfxSemWait(gSem *pSem, gDelay ms) {
switch (ms) {
case gDelayForever:
return sem_wait(&pSem->sem) ? gFalse : gTrue;
@@ -164,7 +164,7 @@ gThreadreturn gfxThreadWait(gThread thread) {
}
}
}
- void gfxSemSignal(gfxSem *pSem) {
+ void gfxSemSignal(gSem *pSem) {
int res;
res = 0;
@@ -173,7 +173,7 @@ gThreadreturn gfxThreadWait(gThread thread) {
sem_post(&pSem->sem);
}
#else
- void gfxSemInit(gfxSem *pSem, gSemcount val, gSemcount limit) {
+ void gfxSemInit(gSem *pSem, gSemcount val, gSemcount limit) {
pthread_mutex_init(&pSem->mtx, 0);
pthread_cond_init(&pSem->cond, 0);
pthread_mutex_lock(&pSem->mtx);
@@ -181,11 +181,11 @@ gThreadreturn gfxThreadWait(gThread thread) {
pSem->max = limit;
pthread_mutex_unlock(&pSem->mtx);
}
- void gfxSemDestroy(gfxSem *pSem) {
+ void gfxSemDestroy(gSem *pSem) {
pthread_mutex_destroy(&pSem->mtx);
pthread_cond_destroy(&pSem->cond);
}
- gBool gfxSemWait(gfxSem *pSem, gDelay ms) {
+ gBool gfxSemWait(gSem *pSem, gDelay ms) {
pthread_mutex_lock(&pSem->mtx);
switch (ms) {
@@ -226,7 +226,7 @@ gThreadreturn gfxThreadWait(gThread thread) {
pthread_mutex_unlock(&pSem->mtx);
return gTrue;
}
- void gfxSemSignal(gfxSem *pSem) {
+ void gfxSemSignal(gSem *pSem) {
pthread_mutex_lock(&pSem->mtx);
if (pSem->cnt < pSem->max) {