src/thread/windows/SDL_syssem.c
changeset 6430 48d519500f7e
parent 6138 4c64952a58fb
child 6885 700f1b25f77f
     1.1 --- a/src/thread/windows/SDL_syssem.c	Fri Sep 14 18:18:38 2012 -0400
     1.2 +++ b/src/thread/windows/SDL_syssem.c	Sat Sep 15 10:59:39 2012 -0400
     1.3 @@ -27,18 +27,10 @@
     1.4  #include "../../core/windows/SDL_windows.h"
     1.5  
     1.6  #include "SDL_thread.h"
     1.7 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
     1.8 -#include "win_ce_semaphore.h"
     1.9 -#endif
    1.10 -
    1.11  
    1.12  struct SDL_semaphore
    1.13  {
    1.14 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    1.15 -    SYNCHHANDLE id;
    1.16 -#else
    1.17      HANDLE id;
    1.18 -#endif
    1.19      LONG count;
    1.20  };
    1.21  
    1.22 @@ -53,11 +45,7 @@
    1.23      sem = (SDL_sem *) SDL_malloc(sizeof(*sem));
    1.24      if (sem) {
    1.25          /* Create the semaphore, with max value 32K */
    1.26 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    1.27 -        sem->id = CreateSemaphoreCE(NULL, initial_value, 32 * 1024, NULL);
    1.28 -#else
    1.29          sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL);
    1.30 -#endif
    1.31          sem->count = initial_value;
    1.32          if (!sem->id) {
    1.33              SDL_SetError("Couldn't create semaphore");
    1.34 @@ -76,11 +64,7 @@
    1.35  {
    1.36      if (sem) {
    1.37          if (sem->id) {
    1.38 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    1.39 -            CloseSynchHandle(sem->id);
    1.40 -#else
    1.41              CloseHandle(sem->id);
    1.42 -#endif
    1.43              sem->id = 0;
    1.44          }
    1.45          SDL_free(sem);
    1.46 @@ -103,11 +87,7 @@
    1.47      } else {
    1.48          dwMilliseconds = (DWORD) timeout;
    1.49      }
    1.50 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    1.51 -    switch (WaitForSemaphoreCE(sem->id, dwMilliseconds)) {
    1.52 -#else
    1.53      switch (WaitForSingleObject(sem->id, dwMilliseconds)) {
    1.54 -#endif
    1.55      case WAIT_OBJECT_0:
    1.56          InterlockedDecrement(&sem->count);
    1.57          retval = 0;
    1.58 @@ -159,11 +139,7 @@
    1.59       * is waiting for this semaphore.
    1.60       */
    1.61      InterlockedIncrement(&sem->count);
    1.62 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    1.63 -    if (ReleaseSemaphoreCE(sem->id, 1, NULL) == FALSE) {
    1.64 -#else
    1.65      if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) {
    1.66 -#endif
    1.67          InterlockedDecrement(&sem->count);      /* restore */
    1.68          SDL_SetError("ReleaseSemaphore() failed");
    1.69          return -1;