/external/kernel-headers/original/asm-arm/ |
semaphore.h | 2 * linux/include/asm-arm/semaphore.h 15 struct semaphore { struct 28 struct semaphore name = __SEMAPHORE_INIT(name,count) 33 static inline void sema_init(struct semaphore *sem, int val) 40 static inline void init_MUTEX(struct semaphore *sem) 45 static inline void init_MUTEX_LOCKED(struct semaphore *sem) 58 extern void __down(struct semaphore * sem); 59 extern int __down_interruptible(struct semaphore * sem); 60 extern int __down_trylock(struct semaphore * sem); 61 extern void __up(struct semaphore * sem) [all...] |
/system/extras/tests/bionic/libc/common/ |
test_semaphore.c | 29 #include <semaphore.h> 36 /* a simple semaphore test, using three threads 38 * a semaphore is initialized with a value of 1 42 * Thread 1 takes the semaphore, then sleeps for 2 seconds, then post the semaphore 43 * Thread 2 sleeps for 1 second, then waits the semaphore, sleeps for 2 seconds, then post the semaphoe 44 * Thread 3 sleeps 3 seconds, waits for the semaphore 47 static sem_t semaphore; variable 52 printf( "thread 1: waiting for semaphore\n" ); 53 if ( sem_wait( &semaphore ) < 0 ) [all...] |
test_sem_post.c | 30 * threads that are waiting on a single semaphore, and not all of 35 #include <semaphore.h> 41 static sem_t semaphore; variable 43 /* Thread function, just wait for the semaphore */ 63 * this is used to exercize more of the semaphore code path */ 64 if ( sem_init( &semaphore, 0, 1 ) < 0 ) { 65 printf( "Could not initialize semaphore: %s\n", strerror(errno) ); 70 if ( pthread_create( &t[nn], NULL, thread_func, &semaphore ) < 0 ) { 78 sem_post(&semaphore); 89 if (sem_getvalue(&semaphore, &value) < 0) [all...] |
/frameworks/av/libvideoeditor/osal/src/ |
M4OSA_Semaphore.c | 19 * @brief Semaphore for Windows 20 * @note This file implements functions to manipulate semaphore 32 #include <semaphore.h> 40 /* Context for the semaphore */ 42 M4OSA_UInt32 coreID; /* semaphore context identifiant */ 43 sem_t semaphore; /* semaphore */ member in struct:__anon18771 51 * @brief This method creates a new semaphore with the "initialCounter" 56 * parameter will be sent back to any OSAL core semaphore functions 57 * to allow retrieving data associated to the opened semaphore [all...] |
/cts/suite/audio_quality/lib/include/ |
Semaphore.h | 21 #include <semaphore.h> 26 * Simple semaphore interface for synchronization between client and server 28 class Semaphore { 30 Semaphore(int count = 0); 32 ~Semaphore(); 34 /// down semaphore if it is already positive.
|
/hardware/ti/omap4xxx/libtiutils/ |
Semaphore.cpp | 19 #include "Semaphore.h" 27 @brief Constructor for the semaphore class 32 Semaphore::Semaphore() 34 ///Initialize the semaphore to NULL 39 @brief Destructor of the semaphore class 45 Semaphore::~Semaphore() 51 @brief: Releases semaphore 55 @return One of the android error codes based on semaphore de-initializatio [all...] |
Semaphore.h | 20 #include <semaphore.h> 29 class Semaphore 33 Semaphore(); 34 ~Semaphore(); 36 //Release semaphore 39 ///Create the semaphore with initial count value 48 ///Current semaphore count
|
/external/qemu/distrib/sdl-1.2.15/docs/man3/ |
SDL_SemValue.3 | 3 SDL_SemValue \- Return the current value of a semaphore\&. 12 \fBSDL_SemValue()\fP returns the current semaphore value from the semaphore pointed to by \fBsem\fR\&. 15 Returns current value of the semaphore\&.
|
SDL_SemWaitTimeout.3 | 3 SDL_SemWaitTimeout \- Lock a semaphore, but only wait up to a specified maximum time\&. 12 \fBSDL_SemWaitTimeout()\fP is a varient of \fISDL_SemWait\fR with a maximum timeout value\&. If the value of the semaphore pointed to by \fBsem\fR is positive (greater than zero) it will atomically decrement the semaphore value and return 0, otherwise it will wait up to \fBtimeout\fR milliseconds trying to lock the semaphore\&. This function is to be avoided if possible since on some platforms it is implemented by polling the semaphore every millisecond in a busy loop\&. 14 After \fBSDL_SemWaitTimeout()\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. 17 Returns \fB0\fR if the semaphore was successfully locked or either \fBSDL_MUTEX_TIMEOUT\fR or \fB-1\fR if the timeout period was exceeded or there was an error, respectivly\&. 19 If the semaphore was not successfully locked, the semaphore will be unchanged\&.
|
SDL_SemPost.3 | 3 SDL_SemPost \- Unlock a semaphore\&. 12 \fBSDL_SemPost\fP unlocks the semaphore pointed to by \fBsem\fR and atomically increments the semaphores value\&. Threads that were blocking on the semaphore may be scheduled after this call succeeds\&. 14 \fBSDL_SemPost\fP should be called after a semaphore is locked by a successful call to \fISDL_SemWait\fR, \fISDL_SemTryWait\fR or \fISDL_SemWaitTimeout\fR\&. 17 Returns \fB0\fR if successful or \fB-1\fR if there was an error (leaving the semaphore unchanged)\&.
|
SDL_CreateSemaphore.3 | 3 SDL_CreateSemaphore \- Creates a new semaphore and assigns an initial value to it\&. 12 \fBSDL_CreateSemaphore()\fP creates a new semaphore and initializes it with the value \fBinitial_value\fR\&. Each locking operation on the semaphore by \fISDL_SemWait\fR, \fISDL_SemTryWait\fR or \fISDL_SemWaitTimeout\fR will atomically decrement the semaphore value\&. The locking operation will be blocked if the semaphore value is not positive (greater than zero)\&. Each unlock operation by \fISDL_SemPost\fR will atomically increment the semaphore value\&. 15 Returns a pointer to an initialized semaphore or \fBNULL\fR if there was an error\&.
|
SDL_SemTryWait.3 | 3 SDL_SemTryWait \- Attempt to lock a semaphore but don\&'t suspend the thread\&. 12 \fBSDL_SemTryWait\fP is a non-blocking varient of \fI\fBSDL_SemWait\fP\fR\&. If the value of the semaphore pointed to by \fBsem\fR is positive it will atomically decrement the semaphore value and return 0, otherwise it will return \fBSDL_MUTEX_TIMEOUT\fR instead of suspending the thread\&. 14 After \fBSDL_SemTryWait\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. 17 Returns \fB0\fR if the semaphore was successfully locked or either \fBSDL_MUTEX_TIMEOUT\fR or \fB-1\fR if the thread would have suspended or there was an error, respectivly\&. 19 If the semaphore was not successfully locked, the semaphore will be unchanged\&.
|
SDL_SemWait.3 | 3 SDL_SemWait \- Lock a semaphore and suspend the thread if the semaphore value is zero\&. 12 \fBSDL_SemWait()\fP suspends the calling thread until either the semaphore pointed to by \fBsem\fR has a positive value, the call is interrupted by a signal or error\&. If the call is successful it will atomically decrement the semaphore value\&. 14 After \fBSDL_SemWait()\fP is successful, the semaphore can be released and its count atomically incremented by a successful call to \fISDL_SemPost\fR\&. 17 Returns \fB0\fR if successful or \fB-1\fR if there was an error (leaving the semaphore unchanged)\&.
|
SDL_DestroySemaphore.3 | 3 SDL_DestroySemaphore \- Destroys a semaphore that was created by \fISDL_CreateSemaphore\fR\&. 12 \fBSDL_DestroySemaphore\fP destroys the semaphore pointed to by \fBsem\fR that was created by \fI\fBSDL_CreateSemaphore\fP\fR\&. It is not safe to destroy a semaphore if there are threads currently blocked waiting on it\&.
|
/external/valgrind/main/drd/ |
drd_semaphore.c | 85 /** Enable or disable tracing of semaphore actions. */ 93 * client semaphore at client addres 'semaphore'. 97 const Addr semaphore) 99 tl_assert(semaphore != 0); 100 tl_assert(p->a1 == semaphore); 127 "Destruction of semaphore that is being waited" 138 * client semaphore. Allocate a new structure if such a structure did not 143 drd_semaphore_get_or_allocate(const Addr semaphore) 147 tl_assert(offsetof(DrdClientobj, semaphore) == 0) [all...] |
drd_semaphore.h | 25 // Semaphore state information: owner thread and recursion count. 40 struct semaphore_info* DRD_(semaphore_init)(const Addr semaphore, 43 void DRD_(semaphore_destroy)(const Addr semaphore); 44 struct semaphore_info* DRD_(semaphore_open)(const Addr semaphore, 47 void DRD_(semaphore_close)(const Addr semaphore); 48 void DRD_(semaphore_pre_wait)(const Addr semaphore); 49 void DRD_(semaphore_post_wait)(const DrdThreadId tid, const Addr semaphore, 51 void DRD_(semaphore_pre_post)(const DrdThreadId tid, const Addr semaphore); 52 void DRD_(semaphore_post_post)(const DrdThreadId tid, const Addr semaphore,
|
/cts/suite/audio_quality/lib/src/ |
Semaphore.cpp | 17 #include "Semaphore.h" 20 Semaphore::Semaphore(int count) 27 Semaphore::~Semaphore() 32 void Semaphore::tryWait() 37 bool Semaphore::wait() 46 bool Semaphore::timedWait(int timeInMSec) 67 //LOGV("Semaphore::timedWait now %d-%d until %d-%d for %d msecs", 76 void Semaphore::post( [all...] |
/external/valgrind/main/drd/tests/ |
sem_open_traced.vgtest | 2 vgopts: --check-stack-var=yes --read-var-info=yes --trace-semaphore=yes
|
tc18_semabuse.stderr.exp | 2 Semaphore reinitialization: semaphore 0x........ 5 semaphore 0x........ was first observed at: 9 Invalid semaphore: semaphore 0x........ 12 semaphore 0x........ was first observed at:
|
/external/valgrind/main/none/tests/ |
semlimit.c | 1 #include <semaphore.h>
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/sys/ |
sem.h | 38 /* The following System V style IPC functions implement a semaphore 44 unsigned short int sem_num; /* semaphore number */ 45 short int sem_op; /* semaphore operation */ 52 /* Semaphore control operation. */ 55 /* Get semaphore. */ 58 /* Operate on semaphore. */ 62 /* Operate on semaphore with timeout. */
|
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/sys/ |
sem.h | 38 /* The following System V style IPC functions implement a semaphore 44 unsigned short int sem_num; /* semaphore number */ 45 short int sem_op; /* semaphore operation */ 52 /* Semaphore control operation. */ 55 /* Get semaphore. */ 58 /* Operate on semaphore. */ 62 /* Operate on semaphore with timeout. */
|
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/sys/ |
sem.h | 38 /* The following System V style IPC functions implement a semaphore 44 unsigned short int sem_num; /* semaphore number */ 45 short int sem_op; /* semaphore operation */ 52 /* Semaphore control operation. */ 55 /* Get semaphore. */ 58 /* Operate on semaphore. */ 62 /* Operate on semaphore with timeout. */
|
/external/qemu/distrib/sdl-1.2.15/src/thread/irix/ |
SDL_syssem.c | 55 { 0, -1, (IPC_NOWAIT|SEM_UNDO) } /* Decrement semaphore, no block */ 58 { 0, -1, SEM_UNDO } /* Decrement semaphore */ 61 { 0, 1, (IPC_NOWAIT|SEM_UNDO) } /* Increment semaphore */ 64 /* Create a blockable semaphore */ 78 SDL_SetError("Couldn't create semaphore"); 82 init.val = initial_value; /* Initialize semaphore */ 106 SDL_SetError("Passed a NULL semaphore"); 126 SDL_SetError("Passed a NULL semaphore"); 136 SDL_SetError("Semaphore operation error"); 147 SDL_SetError("Passed a NULL semaphore"); [all...] |
/external/kernel-headers/original/asm-x86/ |
semaphore_32.h | 14 * the original code and to make semaphore waits 21 * also implemented the `trylock' semaphore operation. 35 * /pub/linux/src/semaphore/semaphore-2.0.24.tar.gz. 44 struct semaphore { struct 59 struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) 63 static inline void sema_init (struct semaphore *sem, int val) 66 * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); 76 static inline void init_MUTEX (struct semaphore *sem) 81 static inline void init_MUTEX_LOCKED (struct semaphore *sem [all...] |