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
Explain how scheduling and priority works in threads?
What is wait() and notify()?
In window xp which are the threads. Actually I wanna know if ms word is a process which are the threads? Is spell check is a thread?
What is the default kill signal?
What is multi programming?
Explain what is the impact if dns server fails?
Can you explain too many times when I click on a sentence a caption comes on grr a pop up blocker maybe blocking--however I have pushed the turn off pop up blocker. This only happens on google it does not happen on att.net?
What's difference between thread and process?
Explain cannot copy (file name)- access is denied?
How do I kill a program without task manager?
Where is taskkill located?
Explain what is windows daemon?
Can you explain too many times when I click on a sentence a caption comes on grr a pop up blocker maybe blockiing--however I have pushed the turn off pop upblocker. This only happens on google it does not happen on att.net?
Tell me how to share printer through ftp(fire transfer protocol)?
Why thread is called as a lightweight process?