黑人与沈阳女大学生:wait 函数会改变某些synchronization objects 的状态

来源:百度文库 编辑:九乡新闻网 时间:2024/07/07 12:12:32

 

http://msdn.microsoft.com/en-us/library/windows/desktop/ms687069(v=vs.85).aspx

Wait Functions and Synchronization Objects

The wait functions can modify the states of some types of synchronization objects. Modification occurs only for the object or objects whose signaled state caused the function to return. Wait functions can modify the states of synchronization objects as follows:

  • The count of a semaphore object decreases by one, and the state of the semaphore is set to nonsignaled if its count is zero.
  • The states of mutex, auto-reset event, and change-notification objects are set to nonsignaled.
  • The state of a synchronization timer is set to nonsignaled.
  • The states of manual-reset event, manual-reset timer, process, thread, and console input objects are not affected by a wait function.