0
這可能是一個微不足道的問題,但我找不到任何明確的答案。你怎樣才能讓兩個進程輪流使用信號量?我不想使用睡眠或其他IPC。結果應該是這樣的:輪流使用信號量
Process 1 did something
Process 2 did something
Process 1 did something
Process 2 did something
Process 1 did something
Process 2 did something
Process 1 did something
Process 2 did something