文件名称:Mutex
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:943.73kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
首先,在主线程中使用InitializeCriticalSection()初始化临界分区。然后建立两个子线程,在两个子线程中使用全局变量count的前、后分别使用 EnterCriticalSection()进入临界区及LeaveCriticalSection()退出临界区。等两个子线程运行完毕,主线程使用DeleteCriticalSection()删除临界区并撤销线程。-First of all, in the main thread InitializeCriticalSection () to initialize the critical partition. Then create two sub-threads, in two sub-thread count of global variables, respectively, using the EnterCriticalSection () to enter the critical section, and LeaveCriticalSection () to exit the critical section. The two sub-thread has finished running, the main thread to use DeleteCriticalSection () to delete the critical section and revoke the thread.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Mutex/Debug/Mutex.exe
Mutex/Debug/Mutex.ilk
Mutex/Debug/Mutex.pdb
Mutex/Mutex/Mutex.cpp
Mutex/Mutex/Mutex.h
Mutex/Mutex/Mutex.rc
Mutex/Mutex/Mutex.vcxproj
Mutex/Mutex/Mutex.vcxproj.filters
Mutex/Mutex/Mutex.vcxproj.user
Mutex/Mutex/ReadMe.txt
Mutex/Mutex/Resource.h
Mutex/Mutex/stdafx.cpp
Mutex/Mutex/stdafx.h
Mutex/Mutex/targetver.h
Mutex/Mutex.sln
Mutex/Mutex.suo
Mutex/ipch/mutex-720a10c3
Mutex/Debug
Mutex/ipch
Mutex/Mutex
Mutex
Mutex/Debug/Mutex.ilk
Mutex/Debug/Mutex.pdb
Mutex/Mutex/Mutex.cpp
Mutex/Mutex/Mutex.h
Mutex/Mutex/Mutex.rc
Mutex/Mutex/Mutex.vcxproj
Mutex/Mutex/Mutex.vcxproj.filters
Mutex/Mutex/Mutex.vcxproj.user
Mutex/Mutex/ReadMe.txt
Mutex/Mutex/Resource.h
Mutex/Mutex/stdafx.cpp
Mutex/Mutex/stdafx.h
Mutex/Mutex/targetver.h
Mutex/Mutex.sln
Mutex/Mutex.suo
Mutex/ipch/mutex-720a10c3
Mutex/Debug
Mutex/ipch
Mutex/Mutex
Mutex
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.