forked from len0rd/rockbox
Put an end to priority inversion in the ata driver. Gave up trying to have fully atomic dual use mutexes so just replaced the ata driver locking with spins. Maybe I'll have better luck later. Things should run smoothly with database updates and such happening in the background.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12688 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f4b83e6859
commit
dee43ece20
6 changed files with 135 additions and 69 deletions
|
@ -355,3 +355,15 @@ void mutex_unlock(struct mutex *m)
|
|||
{
|
||||
m->locked = false;
|
||||
}
|
||||
|
||||
void spinlock_lock(struct mutex *m)
|
||||
{
|
||||
while(m->locked)
|
||||
switch_thread(true, NULL);
|
||||
m->locked = true;
|
||||
}
|
||||
|
||||
void spinlock_unlock(struct mutex *m)
|
||||
{
|
||||
m->locked = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue