Closed msplr closed 10 years ago
I already got biten by that, so I vote for a naming change. My vote goes to pend
and signal
.
+1 for pend
and signal
From a linguistic point of view, I'd prefer wait
to pend
.
Pend gives the idea of indecision, unlike wait.
So pend
is more appropriate as you don't know if the semaphore will be signaled.
Not really.
pend
It's not indecision as in "Waiting for Godot" but rather indecision as "who knows what will happen to this".
On the other hand:
wait a. To remain or rest in expectation b. To tarry until another catches up.
since semaphores are just somewhat glorified counters what about inc and dec?
P & V #troll
Are
take
andrelease
really the right names for semaphore operations? What about something likepend
orwait
instead oftake
andsignal
orpost
insteadrelease
? In my eyes it looks strange to useos_semaphore_release()
to wake a blocking thread, sincerelease
rather reminds me of a lock and not a signaling method. What do you think?