zenilib: zenilib/jni/external/sdl/src/thread/pthread/SDL_sysmutex.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Functions
SDL_sysmutex.c File Reference
`#include "SDL_config.h"`
`#include <pthread.h>`
`#include <errno.h>`
`#include "SDL_thread.h"`

Go to the source code of this file.

## Macros

#define | _GNU_SOURCE
#define | FAKE_RECURSIVE_MUTEX 1

## Functions

SDL_mutex * | SDL_CreateMutex (void)
void | SDL_DestroyMutex (SDL_mutex *mutex)
int | SDL_LockMutex (SDL_mutex *mutex)
int | SDL_TryLockMutex (SDL_mutex *mutex)
int | SDL_UnlockMutex (SDL_mutex *mutex)

## Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 23 of file SDL_sysmutex.c.

#define FAKE_RECURSIVE_MUTEX 1

Definition at line 31 of file SDL_sysmutex.c.

## Function Documentation

SDL_mutex* SDL_CreateMutex | ( | void |  | ) |

Create a mutex, initialized unlocked.

Definition at line 44 of file SDL_sysmutex.c.

References NULL, SDL_calloc(), SDL_free(), SDL_OutOfMemory, and SDL_SetError().

Referenced by open_audio_device(), SDL_AtomicTryLock(), SDL_CreateCond(), SDL_CreateSemaphore(), SDL_Generic_GetTLSData(), SDL_ReportAssertion(), SDL_StartEventLoop(), and SDL_TimerInit().

void SDL_DestroyMutex | ( | SDL_mutex * | mutex | ) |

Destroy a mutex.

Definition at line 72 of file SDL_sysmutex.c.

References SDL_free().

Referenced by close_audio_device(), SDL_AssertionsQuit(), SDL_DestroyCond(), SDL_DestroySemaphore(), SDL_StopEventLoop(), SDL_TimerInit(), and SDL_TimerQuit().

int SDL_LockMutex | ( | SDL_mutex * | mutex | ) |

Definition at line 82 of file SDL_sysmutex.c.

References NULL, and SDL_SetError().

Referenced by outputCallback(), SDL_AddTimer(), SDL_AtomicTryLock(), SDL_AudioLockDevice_Default(), SDL_CondBroadcast(), SDL_CondSignal(), SDL_CondWaitTimeout(), SDL_DestroySemaphore(), SDL_FilterEvents(), SDL_FlushEvents(), SDL_Generic_GetTLSData(), SDL_Generic_SetTLSData(), SDL_PeepEvents(), SDL_RemoveTimer(), SDL_ReportAssertion(), SDL_RunAudio(), SDL_SemPost(), SDL_SemTryWait(), SDL_SemValue(), SDL_SemWaitTimeout(), and SDL_StopEventLoop().

int SDL_TryLockMutex | ( | SDL_mutex * | mutex | ) |

Try to lock the mutex

Returns
  0, SDL_MUTEX_TIMEDOUT, or -1 on error

Definition at line 117 of file SDL_sysmutex.c.

References NULL, SDL_MUTEX_TIMEDOUT, and SDL_SetError().

int SDL_UnlockMutex | ( | SDL_mutex * | mutex | ) |

Definition at line 160 of file SDL_sysmutex.c.

References NULL, and SDL_SetError().

Referenced by outputCallback(), SDL_AddTimer(), SDL_AtomicTryLock(), SDL_AudioUnlockDevice_Default(), SDL_CondBroadcast(), SDL_CondSignal(), SDL_CondWaitTimeout(), SDL_DestroySemaphore(), SDL_FilterEvents(), SDL_FlushEvents(), SDL_Generic_GetTLSData(), SDL_Generic_SetTLSData(), SDL_PeepEvents(), SDL_RemoveTimer(), SDL_ReportAssertion(), SDL_RunAudio(), SDL_SemPost(), SDL_SemTryWait(), SDL_SemValue(), SDL_SemWaitTimeout(), and SDL_StopEventLoop().