void signal(int n) {
ReleaseSemaphore(fSemaphore, n, nullptr/*returns previous count, optional*/);
} void wait() { WaitForSingleObject(fSemaphore, INFINITE/*timeout in ms*/); }
}; #else // It's important we test for Mach before this. This code will compile but not work there. #include <errno.h> #include <semaphore.h> struct SkSemaphore::OSSemaphore {
sem_t fSemaphore;
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.