semaphore down/up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux