lkml.org 
[lkml]   [2003]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectget into sleep and release the lock in an atomic operation
From
Date
Consider the few lines of code:

spinlock()

if (num == 0) {
sleep and release the spinlock in an atomic operation.
}

In the OS like HP-UX there was a sleep lock concept, the
code would look like:

get_sleeplock()

if (num== 0) {
sleep and release the lock
}

Is there any primitive that implements this kind of spinlock and
sleep in linux? I could not find it.
I know it can be implemented.


Kallol

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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