kernel/msg_q: Spinlockify

One lock per msgq.  Straightforward synchronization.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2018-07-26 10:23:02 -07:00 committed by Anas Nashif
commit be03dbd4c7
2 changed files with 14 additions and 12 deletions

View file

@ -3148,6 +3148,7 @@ static inline unsigned int _impl_k_sem_count_get(struct k_sem *sem)
*/
struct k_msgq {
_wait_q_t wait_q;
struct k_spinlock lock;
size_t msg_size;
u32_t max_msgs;
char *buffer_start;