[lkml]   [2007]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectDo not deprecate binary semaphore or do allow mutex in software interrupt contexts
Peter Zijlstra <>:
> Yes it is.

Why do you think it is broken?

> If you have to wait a long time in an atomic context you've done
> something wrong.

I saw an implementation where there were two atomic contexts, one to initiate reading and another to complete the reading.
That way, there was no busy wait for a long time in an atomic context.

> If you're only reading it from an atomic context you
> might consider storing a copy that can be quickly updated and protect
> that using a spinlock.

You suggested that a user-space task read from the device.
But that includes more context switching and therefore consumes more resources than reading just from an atomic context.

> Not being too familiar with the timer stuff, it smells wrong what you
> say.


Wissenswertes für Bastler und Hobby Handwerker. BE A BETTER HEIMWERKER!
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: 2007-09-11 19:51    [W:0.026 / U:0.924 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site