kernel/pipe: Spinlockify

One spinlock per pipe object.  Also removed some vestigial locking
around _ready_thread().  That call is internally synchronized now.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2019-02-05 16:10:18 -08:00 committed by Anas Nashif
commit f582b55dd6
2 changed files with 16 additions and 20 deletions

View file

@ -3631,6 +3631,7 @@ struct k_pipe {
size_t bytes_used; /**< # bytes used in buffer */
size_t read_index; /**< Where in buffer to read from */
size_t write_index; /**< Where in buffer to write */
struct k_spinlock lock; /**< Synchronization lock */
struct {
_wait_q_t readers; /**< Reader wait queue */