Path: utzoo!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac,att!pacbell.com!ames!bionet!hayes.ims.alaska.edu!milton!grasp1.univ-lyon1.fr!wolf From: wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) Newsgroups: comp.os.os2.programmer Subject: Is this a good programming style? Message-ID: <18595@milton.u.washington.edu> Date: 18 Mar 91 14:49:42 GMT Sender: news@milton.u.washington.edu Organization: INSA Departement Informatique, Lyon, France Lines: 15 I have a small piece of code (yeah really small: less than 100 clock cycles) that will be run only a few times per hour (say 10 or 20). This code accessed a shared segment that must be locked. Due to the fast execution time of the critical section is it a bad behavior to use DosEnterCritSec() & DosExitCritSec() instead of locking the shared memory (I'm afraid locking will take much more time that the treatement itself). Any suggestions welcome. -- Christophe Wolfhugel (on irc: Zolf) | Email: wolf@grasp1.univ-lyon1.fr INSA Lyon - Departement Informatique | "Take care when driving, 90% of the" 69621 Villeurbanne Cedex, France | "births are accidents!"