samples: hello_world_user: fail in compilation if userspace is not enabled

The sample depends on CONFIG_USERSPACE.

Signed-off-by: Wojciech Sipak <wsipak@antmicro.com>
This commit is contained in:
Wojciech Sipak 2023-12-12 15:32:59 +01:00 committed by Anas Nashif
parent 37158ebf15
commit 12f4f4dc86
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@
#include <stdio.h>
#define USER_STACKSIZE 2048
#ifndef CONFIG_USERSPACE
#error This sample requires CONFIG_USERSPACE.
#endif
struct k_thread user_thread;
K_THREAD_STACK_DEFINE(user_stack, USER_STACKSIZE);