[lkml]   [2002]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC] New locking primitive for 2.5 wrote:
> llseek:
> atomic_enquee request
> if no room gotta sleep
> else if trylock mutex
> return
> else
> do work
> loop:
> process any pending requests
> release lock;
> if pending_requests && !(trylock mutex) goto loop

This is how printk() works. It was a very powerful and satisfactory
solution to a nasty locking/atomicity problem. It'd be nice to have
a more generic way of expressing that solution.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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