| commit | ef844cee5551d3adaa021d5bdc6d8e5a3906571a | [log] [tgz] |
|---|---|---|
| author | Rob Barnes <robbarnes@google.com> | Tue Oct 14 16:57:33 2025 +0000 |
| committer | Johan Hedberg <johan.hedberg@gmail.com> | Tue Oct 28 11:52:34 2025 +0200 |
| tree | d9b6bc4ab64dcf982c198cb7bd52fb15529dbfea | |
| parent | 2487fe9a4d38f320c5f6f4c0f4a2831b9dc25535 [diff] |
kernel: make k_is_pre_kernel safe to call from user mode Make k_is_pre_kernel safe to call from user mode. Since z_sys_post_kernel memory is not accessible to user threads, calling k_is_pre_kernel would result in a memory access fault. This change adds k_is_user_context guard. It can be assumed the system is post-kernel if k_is_user_context is true. Signed-off-by: Rob Barnes <robbarnes@google.com>