Please specify the chapter and section in it. Regards, Gaurav -----Original Message----- From: kernelnewbies-bounce@xxxxxxxxxxxx [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Hinko Kocevar Sent: Tuesday, July 20, 2004 9:57 PM To: kernelnewbies@xxxxxxxxxxxx Subject: semaphore down/up Hi, Looking at scull_read() in LDD2 how is semaphore released if the read operation succeeds ? I mean, up is invoked only if error occours so lines after out: label are called. As I understand this example, out: label could be reached if doing multiple scull_read() in a loop, and it would fail if either EOF is reached or no data is available in private_data. It puzzles me because it is stated on a page before that claimed semaphore must be released as well (that makes sense). regards, h -- hinko<dot>kocevar<at> iskramedical<dot>si Hinko Kocevar, developer "Aì rén" Iskra Medical d.o.o. [Analects XII:22] Stegne 23, 1k LJ, SLO-EU -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/