mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
okl4: declare read-write-lock as volatile
GCC 4.7.4 and newer seems to optimize the lock-variable accesses more radically, which uncovered the missing volatile qualifier and resulted in: Assertion "(int)locked >= 0" failed in file '.../okl4_x86/kernel/include/kernel/read_write_lock.h', line 151 (fn=f0104771) --- "KD# assert" ---
This commit is contained in:
parent
97d117c89d
commit
ac6c4682f3
13
repos/base-okl4/patches/read_write_lock_volatile.patch
Normal file
13
repos/base-okl4/patches/read_write_lock_volatile.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/pistachio/include/read_write_lock.h b/pistachio/include/read_write_lock.h
|
||||
index d667451..49f7f30 100644
|
||||
--- a/pistachio/include/read_write_lock.h
|
||||
+++ b/pistachio/include/read_write_lock.h
|
||||
@@ -123,7 +123,7 @@ struct read_write_lock_t
|
||||
bool is_locked(void);
|
||||
|
||||
#if defined(CONFIG_DEBUG)
|
||||
- word_t locked;
|
||||
+ word_t volatile locked;
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user