Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why thread is called as a lightweight process?

1043


How would you implement a thread pool?

959


Tell me how to share printer through ftp(fire transfer protocol)?

952


How to update value using threads. Write code?

1096


How to stop a thread?

954


What's the difference in using runnable and extends in threads?

1086


How do I kill a program without task manager?

946


Explain which one is not needed for multi-program environment?

978


Explain thread.sleep?

976


What's difference between thread and process?

1047


What are the benefits of multithreaded programming?

1073


What is thread safety? How do you achieve it?

970


Explain which protocol is working behind dhcp server? And what exactly dora does?

950


What is multi programming?

1007


How to share printer through ftp(fire transfer protocol)?

1050