#ifndef __APPLE__ // Use POSIX semaphores. # include "semaphore_posix.hpp"
#else // OS X doesn't support unnamed POSIX semaphores, so the implementation in os_posix.cpp can't be used. # include "memory/allocation.hpp" # include <mach/semaphore.h>
class OSXSemaphore : public CHeapObj<mtInternal>{
semaphore_t _semaphore;
NONCOPYABLE(OSXSemaphore);
public:
OSXSemaphore(uint value = 0);
~OSXSemaphore();
void signal(uint count = 1);
void wait();
bool trywait();
// wait until the given relative time elapses bool timedwait(int64_t millis);
};
typedef OSXSemaphore SemaphoreImpl;
#endif// __APPLE__
#endif// OS_BSD_SEMAPHORE_BSD_HPP
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-02)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.