diff src/thread/amigaos/SDL_syssem.c @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children
line wrap: on
line diff
--- a/src/thread/amigaos/SDL_syssem.c	Mon May 29 03:53:21 2006 +0000
+++ b/src/thread/amigaos/SDL_syssem.c	Mon May 29 04:04:35 2006 +0000
@@ -37,74 +37,74 @@
 #define D(x)
 
 SDL_sem *
-SDL_CreateSemaphore (Uint32 initial_value)
+SDL_CreateSemaphore(Uint32 initial_value)
 {
     SDL_sem *sem;
 
-    sem = (SDL_sem *) SDL_malloc (sizeof (*sem));
+    sem = (SDL_sem *) SDL_malloc(sizeof(*sem));
 
     if (!sem) {
-        SDL_OutOfMemory ();
+        SDL_OutOfMemory();
         return (0);
     }
 
-    D (bug ("Creating semaphore %lx...\n", sem));
+    D(bug("Creating semaphore %lx...\n", sem));
 
-    SDL_memset (sem, 0, sizeof (*sem));
+    SDL_memset(sem, 0, sizeof(*sem));
 
-    InitSemaphore (&sem->Sem);
+    InitSemaphore(&sem->Sem);
 
     return (sem);
 }
 
 void
-SDL_DestroySemaphore (SDL_sem * sem)
+SDL_DestroySemaphore(SDL_sem * sem)
 {
-    D (bug ("Destroying semaphore %lx...\n", sem));
+    D(bug("Destroying semaphore %lx...\n", sem));
 
     if (sem) {
 // Condizioni per liberare i task in attesa?
-        SDL_free (sem);
+        SDL_free(sem);
     }
 }
 
 int
-SDL_SemTryWait (SDL_sem * sem)
+SDL_SemTryWait(SDL_sem * sem)
 {
     if (!sem) {
-        SDL_SetError ("Passed a NULL semaphore");
+        SDL_SetError("Passed a NULL semaphore");
         return -1;
     }
 
-    D (bug ("TryWait semaphore...%lx\n", sem));
+    D(bug("TryWait semaphore...%lx\n", sem));
 
-    ObtainSemaphore (&sem->Sem);
+    ObtainSemaphore(&sem->Sem);
 //      ReleaseSemaphore(&sem->Sem);
 
     return 1;
 }
 
 int
-SDL_SemWaitTimeout (SDL_sem * sem, Uint32 timeout)
+SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
 {
     int retval;
 
 
     if (!sem) {
-        SDL_SetError ("Passed a NULL semaphore");
+        SDL_SetError("Passed a NULL semaphore");
         return -1;
     }
 
-    D (bug ("WaitTimeout (%ld) semaphore...%lx\n", timeout, sem));
+    D(bug("WaitTimeout (%ld) semaphore...%lx\n", timeout, sem));
 
     /* A timeout of 0 is an easy case */
     if (timeout == 0) {
-        ObtainSemaphore (&sem->Sem);
+        ObtainSemaphore(&sem->Sem);
         return 1;
     }
-    if (!(retval = AttemptSemaphore (&sem->Sem))) {
-        SDL_Delay (timeout);
-        retval = AttemptSemaphore (&sem->Sem);
+    if (!(retval = AttemptSemaphore(&sem->Sem))) {
+        SDL_Delay(timeout);
+        retval = AttemptSemaphore(&sem->Sem);
     }
 
     if (retval == TRUE) {
@@ -116,14 +116,14 @@
 }
 
 int
-SDL_SemWait (SDL_sem * sem)
+SDL_SemWait(SDL_sem * sem)
 {
-    ObtainSemaphore (&sem->Sem);
+    ObtainSemaphore(&sem->Sem);
     return 0;
 }
 
 Uint32
-SDL_SemValue (SDL_sem * sem)
+SDL_SemValue(SDL_sem * sem)
 {
     Uint32 value;
 
@@ -139,15 +139,15 @@
 }
 
 int
-SDL_SemPost (SDL_sem * sem)
+SDL_SemPost(SDL_sem * sem)
 {
     if (!sem) {
-        SDL_SetError ("Passed a NULL semaphore");
+        SDL_SetError("Passed a NULL semaphore");
         return -1;
     }
-    D (bug ("SemPost semaphore...%lx\n", sem));
+    D(bug("SemPost semaphore...%lx\n", sem));
 
-    ReleaseSemaphore (&sem->Sem);
+    ReleaseSemaphore(&sem->Sem);
     return 0;
 }