<Description>
The function <Ref Func="CreateSemaphore"/> takes an optional argument, which defaults to zero. It is the counter with which the
semaphore is initialized.
<Description>
<Ref Func="WaitSemaphore"/> receives a previously created semaphore as its argument. If the semaphore's counter is greater
than zero, it decrements the counter and returns; if the counter is zero, it waits until another thread increases it via
<Ref Func="SignalSemaphore"/>, then decrements the counter and returns.
<Description>
<Ref Func="SignalSemaphore"/> receives a previously created semaphore as its argument. It increments the semaphore's
counter and returns.
In order to use semaphores to simulate locks, create a semaphore with an initial value of 1. <Ref Func="WaitSemaphore"/> is
then equivalent to a lock operation, <Ref Func="SignalSemaphore"/> is equivalent to an unlock operation.
</Subsection>
</Section>
</Chapter>
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.