zephyr/kernel
Leandro Pereira f5f95ee3a9 kernel: sem: Ensure that initial count is lesser or equal than limit
Ensure this value during static initialization (with build assertions),
and dynamic initializations through system calls.

If initial count is larger than the limit, it's possible for the count
to wraparound, causing locking issues.

Expanding the BUILD_ASSERT() macros after declaring a k_sem struct in
K_SEM_DEFINE() is necessary to support cases where a semaphore is
defined statically.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-04-24 04:04:36 +05:30
..
include kernel, posix: Move ready_one_thread() to scheduler 2018-04-24 03:57:20 +05:30
alert.c
atomic_c.c
CMakeLists.txt lib: posix: Move posix layer from 'kernel' to 'lib' 2018-04-05 16:43:05 -04:00
compiler_stack_protect.c kernel: add CODE_UNREACHABLE in _StackCheckHandler 2018-04-17 10:50:12 -07:00
device.c
errno.c
idle.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
init.c build: use git version and hash for boot banner 2018-04-10 10:57:50 -04:00
int_latency_bench.c
Kconfig arch: x86: Use retpolines in core assembly routines 2018-04-24 04:00:01 +05:30
Kconfig.event_logger kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
Kconfig.power_mgmt kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
mailbox.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
mem_domain.c kernel: mem_domain: Fix compile issues 2018-03-05 10:47:00 -06:00
mem_slab.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
mempool.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
msg_q.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
mutex.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
pipes.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
poll.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
queue.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
sched.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
sem.c kernel: sem: Ensure that initial count is lesser or equal than limit 2018-04-24 04:04:36 +05:30
smp.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
stack.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
sys_clock.c kernel: SMP timer integration 2018-02-16 10:44:29 -05:00
system_work_q.c
thread_abort.c kernel: Further unify _reschedule APIs 2018-04-24 03:57:20 +05:30
thread.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
timer.c kernel: Clean up _unpend_thread() API 2018-04-24 03:57:20 +05:30
userspace_handler.c
userspace.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
version.c
work_q.c