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
How do we create threads?
What is thread injection?
Explain the difference between ntfs4 and ntfs5?
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 is windows daemon?
What is thread safety? How do you achieve it?
Explain which one is not needed for multi-program environment?
if thread a,b,c have Max,Min,Normal priorty what is N0. in below set they correspond to.Something like (2,0,1)
Explain thread.sleep?
How would you implement a thread pool?
What is the difference between a computer process and thread?
Explain how to kill a particular process in windows?
what are the different types of codes in thread in windows os?
How to stop a thread?
How do you kill tasks?