Skip to content
Commit 4d330074 authored by Jennifer Williams's avatar Jennifer Williams Committed by Anas Nashif
Browse files

kernel: stack: fix stack_push spinlock and return



The z_impl_k_stack_push() has a spinlock that is set after
stack member access, which could cause race conditions and
used multiple return statements. This commit
- moves the lock before the CHECKIF
- implements goto for flow of lock, reschedule, and unlock
- uses ret for single return at the end

Signed-off-by: default avatarJennifer Williams <jennifer.m.williams@intel.com>
parent 2ffbad49
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment