Searched refs:semaphore (Results 1 - 25 of 26) sorted by relevance

12

/haiku/src/add-ons/kernel/file_systems/netfs/shared/
H A DBlocker.cpp10 : 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/headers/posix/
H A Dsemaphore.h29 int sem_close(sem_t* semaphore);
32 int sem_init(sem_t* semaphore, int shared, unsigned value);
33 int sem_destroy(sem_t* semaphore);
35 int sem_post(sem_t* semaphore);
36 int sem_clockwait(sem_t* semaphore, clockid_t clock_id,
38 int sem_timedwait(sem_t* semaphore, const struct timespec* abstime);
39 int sem_trywait(sem_t* semaphore);
40 int sem_wait(sem_t* semaphore);
41 int sem_getvalue(sem_t* semaphore, int* value);
/haiku/src/system/libroot/posix/
H A Dsemaphore.cpp7 #include <semaphore.h>
52 // get the mode and semaphore count parameters, if O_CREAT is specified
68 // call of this process to open the semaphore. If it is, we will keep the
79 // ask the kernel to open the semaphore
96 sem_close(sem_t* semaphore) argument
99 status_t error = _kern_realtime_sem_close(semaphore->u.named_sem_id,
116 sem_init(sem_t* semaphore, int shared, unsigned value) argument
118 semaphore->type = shared ? SEM_TYPE_UNNAMED_SHARED : SEM_TYPE_UNNAMED;
119 semaphore->u.unnamed_sem = value;
125 sem_destroy(sem_t* semaphore) argument
135 unnamed_sem_post(sem_t* semaphore) argument
151 unnamed_sem_trywait(sem_t* semaphore) argument
163 unnamed_sem_timedwait(sem_t* semaphore, clockid_t clock_id, const struct timespec* timeout) argument
196 sem_post(sem_t* semaphore) argument
209 named_sem_timedwait(sem_t* semaphore, clockid_t clock_id, const struct timespec* timeout) argument
248 sem_trywait(sem_t* semaphore) argument
262 sem_wait(sem_t* semaphore) argument
275 sem_clockwait(sem_t* semaphore, clockid_t clock_id, const struct timespec* abstime) argument
288 sem_timedwait(sem_t* semaphore, const struct timespec* abstime) argument
295 sem_getvalue(sem_t* semaphore, int* value) argument
[all...]
/haiku/src/system/libroot/os/locks/
H A Dinit_once.cpp26 // 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/src/kits/debugger/model/
H A DSemaphoreInfo.cpp32 SemaphoreInfo::SemaphoreInfo(team_id team, sem_id semaphore, argument
36 fSemaphore(semaphore),
45 SemaphoreInfo::SetTo(team_id team, sem_id semaphore, const BString& name, argument
49 fSemaphore = semaphore;
/haiku/src/apps/installer/
H A DSemaphoreLocker.h28 inline SemaphoreLocker(sem_id semaphore, bool alreadyLocked = false, argument
32 fSem(semaphore)
/haiku/src/system/libroot/posix/pthread/
H A Dpthread_once.cpp40 // If someone has set a semaphore, delete it.
57 // semaphore/STATE_SPINNING: Set by the second thread entering the function,
59 // that the thread manages to create a semaphore. This thread (and all
60 // following threads) will block on the semaphore until the first thread is
81 // If someone else is waiting, we need to delete the semaphore.
89 // someone is initializing -- we need to create a semaphore we can
91 sem_id semaphore = create_sem(0, "pthread once"); local
92 if (semaphore >= 0) {
95 semaphore, STATE_INITIALIZING);
97 value = semaphore;
[all...]
/haiku/src/add-ons/print/transports/ipp/
H A DIppSetupDlg.h21 long semaphore; member in class:IppSetupDlg
H A DIppSetupDlg.cpp165 semaphore = create_sem(0, "IppSetupSem");
171 release_sem(semaphore);
186 release_sem(semaphore);
192 release_sem(semaphore);
204 acquire_sem(semaphore);
205 delete_sem(semaphore);
/haiku/headers/private/debugger/model/
H A DSemaphoreInfo.h18 SemaphoreInfo(team_id team, sem_id semaphore,
22 void SetTo(team_id team, sem_id semaphore,
/haiku/src/add-ons/kernel/file_systems/netfs/headers/shared/
H A DBlocker.h11 Blocker(sem_id semaphore);
/haiku/src/build/libroot/
H A Dsem.cpp13 struct semaphore { struct
20 static semaphore sSemaphores[kSemaphoreCount];
36 semaphore &sem = sSemaphores[i];
83 semaphore &sem = sSemaphores[id];
116 debugger("Would block on a semaphore without timeout in a "
146 semaphore &sem = sSemaphores[id];
/haiku/src/servers/app/
H A DMessageLooper.h35 static status_t WaitForQuit(sem_id semaphore,
H A DMessageLooper.cpp102 MessageLooper::WaitForQuit(sem_id semaphore, bigtime_t timeout) argument
106 status = acquire_sem_etc(semaphore, 1, B_RELATIVE_TIMEOUT, timeout);
/haiku/headers/private/kernel/posix/
H A Drealtime_sem.h8 #include <semaphore.h>
/haiku/src/tests/system/libroot/posix/
H A Dxsi_sem_test1.cpp53 // Destroy private semaphore
74 // Destroy non-private semaphore
85 // Destroy non-existing semaphore
216 // Destroy non-private semaphore
255 // GETVAL semaphore 4
263 // Check only last semaphore value
267 // SETVAL semaphore 2
268 TEST("semctl(SETVAL) - semaphore #2");
278 TEST("semctl(GETALL) - semaphore #10");
280 TEST("semctl(GETALL) - semaphore #
286 struct semid_ds semaphore; local
[all...]
H A Drealtime_sem_test1.cpp13 #include <semaphore.h>
256 TEST_SET("sem_{post,wait,trywait,timedwait}() named semaphore");
406 TEST_SET("sem_{post,wait,trywait,timedwait}() unnamed semaphore");
541 TEST_SET("sem_{post,wait,trywait,timedwait}() named semaphore with fork()");
666 TEST_SET("sem_{post,wait,trywait,timedwait}() named semaphore open after "
801 TEST_SET("sem_{post,wait,trywait,timedwait}() unnamed semaphore with "
879 TEST_SET("sem_{post,wait,trywait,timedwait}() unnamed semaphore with "
/haiku/src/kits/shared/
H A DRWLocker.cpp54 delete_sem(fMutex.semaphore);
55 delete_sem(fQueue.semaphore);
160 // at the mutex semaphore. We need to wake it up.
192 fMutex.semaphore = create_sem(0, mutexName.String());
197 fQueue.semaphore = create_sem(0, queueName.String());
458 error = acquire_sem_etc(benaphore.semaphore, 1, B_ABSOLUTE_TIMEOUT,
469 release_sem(benaphore.semaphore);
/haiku/src/system/kernel/posix/
H A Dxsi_semaphore.cpp84 // Xsi semaphore definition
98 // For some reason the semaphore is getting destroyed.
105 // the semaphore set, it'll just ignore the sem_undo
107 // whole sUndoList. Beside we don't know our semaphore
108 // number nor our semaphore set id.
201 // Xsi semaphore set definition (semid_ds)
224 TRACE(("XsiSemaphoreSet::~XsiSemaphoreSet(): removing semaphore "
343 // for the same semaphore set
370 // semaphore set
475 int fID; // semaphore se
824 XsiSemaphore *semaphore = semaphoreSet->Semaphore(semaphoreNumber); local
1066 XsiSemaphore *semaphore = NULL; local
1174 XsiSemaphore *semaphore = semaphoreSet->Semaphore(semaphoreNumber); local
1205 XsiSemaphore *semaphore = semaphoreSet->Semaphore(semaphoreNumber); local
[all...]
H A Drealtime_sem.cpp164 size_t Hash(NamedSem* semaphore) const
166 return HashKey(semaphore->Name());
169 bool Compare(const KeyType& key, NamedSem* semaphore) const
171 return strcmp(key, semaphore->Name()) == 0;
174 NamedSem*& GetLink(NamedSem* semaphore) const
176 return semaphore->HashLink();
285 TeamSemInfo(SemInfo* semaphore, sem_t* userSem) argument
287 fSemaphore(semaphore),
353 size_t Hash(TeamSemInfo* semaphore) const
355 return HashKey(semaphore
[all...]
/haiku/headers/private/shared/
H A DRWLocker.h61 // semaphore. Unfortunately features as nested locking and timeouts make
63 // whether they already own a lock before acquiring the queueing semaphore.
101 sem_id semaphore; member in struct:RWLocker::Benaphore
124 Benaphore fQueue; // queueing semaphore
/haiku/src/add-ons/kernel/file_systems/userlandfs/server/fuse/
H A DFUSELowLevel.h9 #include <semaphore.h>
/haiku/src/servers/app/drawing/
H A DOverlay.cpp31 SemaphoreLocker(sem_id semaphore, bigtime_t timeout = B_INFINITE_TIMEOUT) argument
33 fSemaphore(semaphore)
/haiku/src/add-ons/kernel/generic/tty/
H A Dtty.cpp162 sem_id semaphore = -1; local
164 semaphore = cookie->blocking_semaphore;
168 if (semaphore >= 0) {
170 "releasing blocking sem %" B_PRId32 "\n", cookie, semaphore));
172 release_sem(semaphore);
/haiku/headers/private/audio/
H A Dhmulti_audio.h316 int32 semaphore; /* semaphore app will wait on */ member in struct:multi_set_event_info

Completed in 177 milliseconds

12