From: "Jonathan Villani" Newsgroups: comp.os.msdos.djgpp Subject: "Locking" code Lines: 33 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Message-ID: Date: Tue, 16 Mar 1999 18:00:13 -0500 NNTP-Posting-Host: 206.231.127.54 X-Complaints-To: abuse AT videotron DOT net X-Trace: weber.videotron.net 921624672 206.231.127.54 (Tue, 16 Mar 1999 17:51:12 EDT) NNTP-Posting-Date: Tue, 16 Mar 1999 17:51:12 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi. I would like to know if the following code can cause problems if there's a swap on the drive. void read_chunk() { ... code fread(sound_fp,.....); } static void SB_interrupt_handler() { code ... read_chunk(); /* <------------- In this function I call fread*/ ... } My question: if I lock the read_chunk function, is this code safe? Does it locks automatically the "fread" in the read_chunk function? Thank you. Jonathan Villani