Which one you will use to implement critical section?
Answer Posted / nirmalraj
Critical Section comes in single process environment they
didn't share accross process boundary.
In C if you wish to implement criticalsection you have to
use windows datastructure CRITICAL_SECTION and create a
object to access its members.
Initialize it
InitializeCriticalSection(&cs);
------------
-----------
function to call();
------------
DeleteCriticalSection(&cs);
.
.
call()
{
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Why thread is called as a lightweight process?
How would you implement a thread pool?
Tell me how to share printer through ftp(fire transfer protocol)?
How to update value using threads. Write code?
How to stop a thread?
What's the difference in using runnable and extends in threads?
How do I kill a program without task manager?
Explain which one is not needed for multi-program environment?
Explain thread.sleep?
What's difference between thread and process?
What are the benefits of multithreaded programming?
What is thread safety? How do you achieve it?
Explain which protocol is working behind dhcp server? And what exactly dora does?
What is multi programming?
How to share printer through ftp(fire transfer protocol)?