- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
windows同步(Windows synchronization)
windows同步(Windows synchronization) 1. critical region CRITICAL_SECTION: Scope of application: it can only synchronize threads in a process, and can not synchronize across processes. Generally use it to do a single process within the code fast synchronization, the efficiency is relatively high. CRITICAL_SECTION _critical; (1) initialize the function that was first called. General windows programming has a similar initialization method InitializeCriticalSection ( _critical); (2) protect the code. When this function is called, other threads cannot access the resources later. EnterCriticalSection ( _critical) (3) leave the critical area to indicate that other threads can come in. LeaveCriticalSection ( _critical) (4) release the resource and make sure that the call is not used when _critical is used. It is usually called when the program exits. DeleteCriticalSection ( _critical) 2.HANDLE hEvent scope of application: more for thread communication, you can cross process synchronization. (1) initialize the method, create an event object, the first parameter represents the security attribute, and in general, the type of parameter is encountered directly to the null, and whether the second parameter is manually reset. There are two modes of operation in kernel time: manual reset and auto reset. The difference will be mentioned below. The third parameter is the initial state, and the fourth parameter event name. HEvent = CreateEvent (NULL, FALSE, FALSE, NULL); (2) wait for a single event to be set, that is, the thread will block in this function until the event is set, SetEvent. If it is an automatic reset event, the system automatically calls ResetEvent (hEvnet) after the return of the function, resetting the event to ensure that other threads cannot access it. If it is a manual reset event, the other threads of the system can continue to access after the function is returned. The second parameter indicates the waiting event, and the INIFINET indicates that it has been waiti
您可能关注的文档
- ps 的精髓(The essence of PS).doc
- ps7.23(ps7.23).doc
- pn码同步原理(Synchronization principle of PN code).doc
- ps后期处理 唐婉老师调色图文教程_风的_20150303_214748(PS post processing teacher Tang Wan color graphic tutorials _ wind _20150303_214748).doc
- ps图层的42个技巧(42 techniques for the PS layer).doc
- ps学习 文本文档(PS learning text documents).doc
- ps制作魔兽界面(PS make Warcraft interface).doc
- ps小呆笔记(PS little note taking).doc
- ps截图方法(PS screenshot method).doc
- ps教程(PS tutorial).doc
- windows常见错误代码解析和解决办法(Windows common error code analysis and Solutions).doc
- windows程序员如何转向linux开发应用(Windows programmers how to shift the development and application of Linux).doc
- windows系统进程全解剖(Windows system process complete anatomy).doc
- windows组策略之软件限制策略(Windows group policy's software restriction policy).doc
- windows蓝屏错误代码解析(Windows blue screen error code analysis).doc
- windows软件限制策略哈希规则(Windows software, restriction policy, hash rule).doc
- windows错误代码大全(Windows error code Daquan).doc
- windows限制策略(Windows restriction policy).doc
- winxp禁用系统(Winxp disable system).doc
- word填空题(字填空题).doc
文档评论(0)