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 to kill a particular process in windows?
Why thread is called as a lightweight process?
What is the reason for getting the dialogue box (send this error to microsoft giving options as send to microsoft and dont send) when we abort from the any workwhen it was struck?
What's difference between thread and process?
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?
How do we create threads?
What is thread safety and synchronization?
can any one know about NIC (National Informatics Centre) questions Patterns and full detail about written exam, and interview send to softshikha2005@yahoo.com.in Thank you
How would you implement a thread pool?
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?
Is kill ping a virus?
who among the following is responsible for establishing IS Audit function in the organisation?
Explain how scheduling and priority works in threads?
What is the default kill signal?
How to share printer through ftp(fire transfer protocol)?