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

Explain the reasons of rebooting the system?

1171


How do you kill a process using pid?

1121


Explain thread.sleep?

1016


What are multithreading models?

1104


Explain how scheduling and priority works in threads?

1123


How would you implement a thread pool?

1007


How do you taskkill a program?

1005


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

1092


How do I kill a process?

1046


if a min thread has finished execution what happens ? a) it exits b) it wait for other threads c) becomes inactive ... etc etc

3486


What is thread safety?

1012


Describe the actions taken by thread library to context switch between user level threads?

1033


What is thread safety and synchronization?

1026


What is a p-thread?

1010


Explain what is the impact if dns server fails?

1043