lkml.org 
[lkml]   [1996]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Behavior of semaphore's down/up functions (2.0.24)

Bo Liu wrote:
>
> Hi, any experts there willing to help:
>
> I am a new grad learning to write linux device drivers and want to
> understand some kernel codes related to driver programming.
>
> I have a question on the behavior of semaphore's down/up functions..... :
>

> giving the result in /var/adm/syslog:
>
> process 0 down
> process 0 got device
> process 1 down
> process 0 up
> process 0 down
> process 0 got device
>
> while what is expected on the last line is "precess 1 got device" because
> precess 1 did the down before process 0 did it the second time.

Don't confuse the ordering of your messages in the syslog with the
actual execution sequence. AFAIK, the relationship between the two will
not be deterministic.

Steve

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.078 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site