seL4 / seL4_libs

No-assurance libraries for rapid-prototyping of seL4 apps.
https://docs.sel4.systems
Other
52 stars 62 forks source link

Is there someting wrong with sync_cv_broadcast_release in condition_var.h #47

Open lydmcu opened 2 years ago

lydmcu commented 2 years ago

hi In sync_cv_broadcast_release it will call sync_bin_sem_post before seL4_Signal. But In sync_cv_wait, sync_bin_sem_wait(lock) is called after seL4_Wait, when call sync_bin_sem_post in sync_cv_broadcast_release, it will make "lock->value == 2", it will make sync_bin_sem_bare_post trigger assert " assert(*value <= 1)"

`static inline int sync_bin_sem_bare_post(seL4_CPtr notification, volatile int value) { / We can do an "unsafe" increment here because we know we are the only