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?
What is the difference between a computer process and thread?
What are three ways in which a thread can enter the waiting state?
Where is taskkill located?
How do we create threads?
What is multi programming?
What are the benefits of multithreaded programming?
What is thread injection?
What is a p-thread?
Which one is not needed for multi-program environment?
How would you implement a thread pool?
Explain yielding in threading?
What are types of threads?
Purposes, features and functions of windows 98 and xp. i am struggling with this because i have to compare their strenths and weaknesses, please can i get help?
What's the difference in using runnable and extends in threads?