Searched refs:semaphore (Results 1 - 25 of 27) 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_timedwait(sem_t* semaphore, const struct timespec* timeout);
37 int sem_trywait(sem_t* semaphore);
38 int sem_wait(sem_t* semaphore);
39 int sem_getvalue(sem_t* semaphore, int* value);
/haiku/src/system/libroot/posix/
H A Dsemaphore.cpp7 #include <semaphore.h>
51 // get the mode and semaphore count parameters, if O_CREAT is specified
67 // call of this process to open the semaphore. If it is, we will keep the
78 // ask the kernel to open the semaphore
95 sem_close(sem_t* semaphore) argument
98 status_t error = _kern_realtime_sem_close(semaphore->u.named_sem_id,
115 sem_init(sem_t* semaphore, int shared, unsigned value) argument
117 semaphore->type = SEM_TYPE_UNNAMED;
118 semaphore->u.unnamed_sem = value;
124 sem_destroy(sem_t* semaphore) argument
134 unnamed_sem_post(sem_t* semaphore) argument
145 unnamed_sem_trywait(sem_t* semaphore) argument
156 unnamed_sem_timedwait(sem_t* semaphore, const struct timespec* timeout) argument
176 sem_post(sem_t* semaphore) argument
189 named_sem_timedwait(sem_t* semaphore, const struct timespec* timeout) argument
215 sem_trywait(sem_t* semaphore) argument
228 sem_wait(sem_t* semaphore) argument
241 sem_timedwait(sem_t* semaphore, const struct timespec* timeout) argument
254 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.cpp32 // If someone has set a semaphore, delete it.
49 // semaphore/STATE_SPINNING: Set by the second thread entering the function,
51 // that the thread manages to create a semaphore. This thread (and all
52 // following threads) will block on the semaphore until the first thread is
73 // If someone else is waiting, we need to delete the semaphore.
81 // someone is initializing -- we need to create a semaphore we can
83 sem_id semaphore = create_sem(0, "pthread once"); local
84 if (semaphore >= 0) {
87 semaphore, STATE_INITIALIZING);
89 value = semaphore;
[all...]
/haiku/src/add-ons/print/transports/ipp/
H A DIppSetupDlg.h21 long semaphore; member in class:IppSetupDlg
H A DIppSetupDlg.cpp163 semaphore = create_sem(0, "IppSetupSem");
169 release_sem(semaphore);
184 release_sem(semaphore);
190 release_sem(semaphore);
202 acquire_sem(semaphore);
203 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/system/kernel/posix/
H A Dxsi_semaphore.cpp100 // Xsi semaphore definition
113 // For some reason the semaphore is getting destroyed.
125 // the semaphore set, it'll just ignore the sem_undo
127 // whole sUndoList. Beside we don't know our semaphore
128 // number nor our semaphore set id.
152 THREAD_BLOCK_TYPE_OTHER, (void*)"xsi semaphore");
258 // Xsi semaphore set definition (semid_ds)
281 TRACE(("XsiSemaphoreSet::~XsiSemaphoreSet(): removing semaphore "
400 // for the same semaphore set
427 // semaphore se
880 XsiSemaphore *semaphore = semaphoreSet->Semaphore(semaphoreNumber); local
1123 XsiSemaphore *semaphore = NULL; local
1225 XsiSemaphore *semaphore = NULL; local
1260 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/kernel/posix/
H A Drealtime_sem.h8 #include <semaphore.h>
/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/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...]
/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/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/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.cpp165 sem_id semaphore = -1; local
167 semaphore = cookie->blocking_semaphore;
171 if (semaphore >= 0) {
173 "releasing blocking sem %" B_PRId32 "\n", cookie, semaphore));
175 release_sem(semaphore);
/haiku/src/add-ons/kernel/drivers/tty/
H A Dtty.cpp176 sem_id semaphore = -1; local
178 semaphore = cookie->blocking_semaphore;
182 if (semaphore >= 0) {
184 "releasing blocking sem %" B_PRId32 "\n", cookie, semaphore));
186 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
/haiku/src/apps/haikudepot/ui/
H A DMainWindow.cpp565 SemaphoreReleaser(sem_id semaphore) argument
567 fSemaphore(semaphore)
575 // Make sure acknowledge semaphore is released even on error,
1166 // it will let us know by releasing the semaphore.

Completed in 230 milliseconds

12