Skip to content
Snippets Groups Projects
Commit e1f71f98 authored by Masayuki Ishikawa's avatar Masayuki Ishikawa
Browse files

sched/semaphore/spinlock.c: Add memory barrier operations in spin_unlock()


In ARM document regarding memory barrires, SP_DMB() must be issued
before changing a spinlock state to SP_UNLOCKED. However, we found
that SP_DSB() is also needed to ensure that spin_unlock() works
correctly for network streaming aging test.

Signed-off-by: default avatarMasayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
parent 5414d681
No related branches found
No related tags found
No related merge requests found
......@@ -165,8 +165,9 @@ void spin_unlock(FAR volatile spinlock_t *lock)
sched_note_spinunlock(this_task(), lock);
#endif
*lock = SP_UNLOCKED;
SP_DMB();
*lock = SP_UNLOCKED;
SP_DSB();
}
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment