/haiku-fatelf/headers/posix/ |
H A D | semaphore.h | 25 int sem_close(sem_t* semaphore); 28 int sem_init(sem_t* semaphore, int shared, unsigned value); 29 int sem_destroy(sem_t* semaphore); 31 int sem_post(sem_t* semaphore); 32 int sem_timedwait(sem_t* semaphore, const struct timespec* timeout); 33 int sem_trywait(sem_t* semaphore); 34 int sem_wait(sem_t* semaphore); 35 int sem_getvalue(sem_t* semaphore, int* value);
|
/haiku-fatelf/src/add-ons/kernel/file_systems/netfs/shared/ |
H A D | Blocker.cpp | 10 : semaphore(create_sem(0, "blocker")), 16 Data(sem_id semaphore) argument 17 : semaphore(semaphore), 24 if (semaphore >= 0) 25 delete_sem(semaphore); 28 sem_id semaphore; member in struct:Blocker::Data 40 Blocker::Blocker(sem_id semaphore) argument 41 : fData(new(std::nothrow) Data(semaphore)) 44 delete_sem(semaphore); [all...] |
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/netfs/shared/ |
H A D | Blocker.cpp | 10 : semaphore(create_sem(0, "blocker")), 16 Data(sem_id semaphore) argument 17 : semaphore(semaphore), 24 if (semaphore >= 0) 25 delete_sem(semaphore); 28 sem_id semaphore; member in struct:Blocker::Data 40 Blocker::Blocker(sem_id semaphore) argument 41 : fData(new(nothrow) Data(semaphore)) 44 delete_sem(semaphore); [all...] |
/haiku-fatelf/src/system/libroot/posix/ |
H A D | semaphore.cpp | 6 #include <semaphore.h> 30 // get the mode and semaphore count parameters, if O_CREAT is specified 46 // call of this process to open the semaphore. If it is, we will keep the 55 // ask the kernel to open the semaphore 72 sem_close(sem_t* semaphore) argument 75 status_t error = _kern_realtime_sem_close(semaphore->id, &deleteSem); 91 sem_init(sem_t* semaphore, int shared, unsigned value) argument 94 semaphore, NULL)); 99 sem_destroy(sem_t* semaphore) argument 101 RETURN_AND_SET_ERRNO(_kern_realtime_sem_close(semaphore 106 sem_post(sem_t* semaphore) argument 113 sem_timedwait(sem_t* semaphore, const struct timespec* timeout) argument 138 sem_trywait(sem_t* semaphore) argument 145 sem_wait(sem_t* semaphore) argument 153 sem_getvalue(sem_t* semaphore, int* value) argument [all...] |
/haiku-fatelf/src/system/libroot/os/locks/ |
H A D | init_once.cpp | 26 // semaphore/STATE_SPINNING: Set by the second thread entering the function, 28 // that the thread manages to create a semaphore. This thread (and all 29 // following threads) will block on the semaphore until the first thread is 46 // If someone else is waiting, we need to delete the semaphore. 54 // someone is initializing -- we need to create a semaphore we can wait 56 sem_id semaphore = create_sem(0, "pthread once"); local 57 if (semaphore >= 0) { 59 value = atomic_test_and_set(control, semaphore, STATE_INITIALIZING); 61 value = semaphore; 63 delete_sem(semaphore); [all...] |
/haiku-fatelf/src/apps/installer/ |
H A D | SemaphoreLocker.h | 28 inline SemaphoreLocker(sem_id semaphore, bool alreadyLocked = false, argument 32 fSem(semaphore)
|
/haiku-fatelf/src/system/libroot/posix/pthread/ |
H A D | pthread_once.cpp | 31 // If someone has set a semaphore, delete it. 48 // semaphore/STATE_SPINNING: Set by the second thread entering the function, 50 // that the thread manages to create a semaphore. This thread (and all 51 // following threads) will block on the semaphore until the first thread is 71 // If someone else is waiting, we need to delete the semaphore. 79 // someone is initializing -- we need to create a semaphore we can 81 sem_id semaphore = create_sem(0, "pthread once"); local 82 if (semaphore >= 0) { 85 semaphore, STATE_INITIALIZING); 87 value = semaphore; [all...] |
/haiku-fatelf/src/add-ons/print/transports/ipp/ |
H A D | IppSetupDlg.h | 21 long semaphore; member in class:IppSetupDlg
|
H A D | IppSetupDlg.cpp | 162 semaphore = create_sem(0, "IppSetupSem"); 168 release_sem(semaphore); 183 release_sem(semaphore); 189 release_sem(semaphore); 201 acquire_sem(semaphore); 202 delete_sem(semaphore);
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_init/ |
H A D | 5-1.c | 10 * un-successful unamed semaphore initialization return -1, otherwise zero 18 #include <semaphore.h>
|
H A D | 5-2.c | 10 * successful unamed semaphore initialization return zero 18 #include <semaphore.h>
|
H A D | 1-1.c | 10 The following test case initializes an unnamed semaphore with a value of 1, 11 and then check the value of the semaphore. 18 #include <semaphore.h>
|
H A D | 2-1.c | 10 * unamed semaphore is used in subsequent of sem_wait. 17 #include <semaphore.h>
|
H A D | 2-2.c | 10 * unamed semaphore is used in subsequent of sem_post. 17 #include <semaphore.h>
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_unlink/ |
H A D | 4-1.c | 10 * Trying to unlink a semaphore which it doesn't exist. It give an ERROR: 18 #include <semaphore.h> 40 puts("TEST FAILED: semaphore does exist");
|
/haiku-fatelf/src/servers/app/ |
H A D | MessageLooper.cpp | 99 MessageLooper::WaitForQuit(sem_id semaphore, bigtime_t timeout) argument 103 status = acquire_sem_etc(semaphore, 1, B_RELATIVE_TIMEOUT, timeout); 123 sem_id semaphore = Sem(); local 125 if (get_sem_info(semaphore, &info) == B_OK)
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_destroy/ |
H A D | 4-1.c | 10 * This test case verify the unamed semaphore is destroyed by calling 18 #include <semaphore.h>
|
/haiku-fatelf/src/add-ons/kernel/file_systems/netfs/headers/shared/ |
H A D | Blocker.h | 11 Blocker(sem_id semaphore);
|
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/beserved/server-1.2.6/ |
H A D | readerWriter.c | 7 void btLock(sem_id semaphore, int32 *atomic) argument 11 while (acquire_sem(semaphore) == B_INTERRUPTED); 14 void btUnlock(sem_id semaphore, int32 *atomic) argument 18 release_sem(semaphore);
|
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/test/netfs/headers/shared/ |
H A D | Blocker.h | 11 Blocker(sem_id semaphore);
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/pthread_exit/ |
H A D | 6-2.c | 49 #include <semaphore.h> 110 if (ret == -1) { UNRESOLVED(errno, "Failed to wait for the semaphore"); }
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_close/ |
H A D | 1-1.c | 10 sem_close test case that attempts to close an open semaphore, 11 close the semaphore and verify that close_sem returns 0. 18 #include <semaphore.h>
|
H A D | 3-1.c | 10 sem_close will have no effect on the state of the semaphore if 20 #include <semaphore.h>
|
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/sem_getvalue/ |
H A D | 1-1.c | 11 * by the semaphpre without effecting the state of the semaphore. The 12 * updated value represents the actual semaphore value when it was called. 20 #include <semaphore.h>
|
H A D | 4-1.c | 19 #include <semaphore.h>
|