Reading and writing signal quantities!

xiaoxiao2021-03-06  74

IF (SemoP (SemID, & Ops, 1)) == - 1) // Wait for the read signal to 0 {Printf ("Semwait Error / N"); return 0;} IF ((SEMOP (SEMID, & Wacquire, 1) ) == - 1) // write signal plus 1 {Printf ("Semacquire Error / N"); return 0;}

If there is a pre-writing signal, the read signal has changed to 0, so that there is a problem,

The solution is: release signal

转载请注明原文地址:https://www.9cbs.com/read-121145.html

New Post(0)