Let me talk about the issue:
Here are the pseudo-random rand. Solving is also very simple, srand can. Content too lazy to change the ~ ~
Description and ideas:
Code:
operation result:
Readers priority:
Renderings:
fair competition:
Only readers who write thread made some changes. Increase the amount of signal que. sem_init (& que, 0,1).