简体   繁体   English

哪个进程获得了信号量

[英]Which process has acquired semaphore

I have created two processes which are accessing same global shared memory. 我创建了两个正在访问相同全局共享内存的进程。 For synchronization purpose, I have used global semaphore. 出于同步目的,我使用了全局信号量。 Can we find out without debugging(using any windows tool) which process had acquired semaphore? 我们可以不调试(使用任何Windows工具)找出哪个进程获取了信号量吗?

Print a message in your program each time the semaphore is acquired. 每次获取信号量时,在程序中打印一条消息。 Why don't you want you/can't you debug? 为什么不想要/不能调试?

Really, without more information about what you're trying to do, this is all that can be said. 的确,如果没有更多关于您要做什么的信息,这就是全部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM