From 3e738661108fb2a8e3474c6336c2a5c2668f82b6 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 21 Jan 2017 14:18:37 -0500 Subject: Add CPU mode asserts to kernel on blocking functions. This scourge finds it's way back in far too often. Right now, only defined for ARM. Have fun! Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644 --- firmware/kernel/thread.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'firmware/kernel/thread.c') diff --git a/firmware/kernel/thread.c b/firmware/kernel/thread.c index ea76421389..29ab9db873 100644 --- a/firmware/kernel/thread.c +++ b/firmware/kernel/thread.c @@ -1234,6 +1234,8 @@ unsigned int create_thread(void (*function)(void), */ void thread_wait(unsigned int thread_id) { + ASSERT_CPU_MODE(CPU_MODE_THREAD_CONTEXT); + struct thread_entry *current = __running_self_entry(); struct thread_entry *thread = __thread_id_entry(thread_id); -- cgit v1.2.3