zephyr/include
Nicolas Pitre c8bfc2afda riscv: make arch_is_user_context() SMP compatible
This is painful. There is no way for u-mode code to know if we're
currently executing in u-mode without generating a fault, besides
stealing a general purpose register away from the standard ABI
that is. And a global variable doesn't work on SMP as this must be
per-CPU and we could be migrated to another CPU just at the right
moment to peek at the wrong CPU variable (and u-mode can't disable
preemption either).

So, given that we'll have to pay the price of an exception entry
anyway, let's at least make it free to privileged threads by using
the mscratch register as the non-user context indicator (it must
be zero in m-mode for exception entry to work properly). In the
case of u-mode we'll simulate a proper return value in the
exception trap code. Let's settle on the return value in t0
and omit the volatile to give the compiler a chance to cache
the result.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2022-03-21 07:28:05 -04:00
..
app_memory everywhere: fix typos 2022-03-14 20:22:24 -04:00
arch riscv: make arch_is_user_context() SMP compatible 2022-03-21 07:28:05 -04:00
audio audio: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
bluetooth Bluetooth: Host: Validate security on GATT subscription 2022-03-21 10:14:53 +01:00
canbus everywhere: fix typos 2022-03-18 13:24:08 -04:00
console drivers: console: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
crypto everywhere: fix typos 2022-03-18 13:24:08 -04:00
data everywhere: fix typos 2022-03-14 20:22:24 -04:00
debug everywhere: fix typos 2022-03-14 20:22:24 -04:00
devicetree devicetree: add devicetree/can.h 2022-03-15 14:32:29 -05:00
dfu
display drivers: display: grove_lcd_rgb: move to misc 2022-02-22 11:58:33 -08:00
drivers drivers: can: add struct device argument to callback functions 2022-03-19 14:31:22 -04:00
dt-bindings everywhere: fix typos 2022-03-18 13:24:08 -04:00
fs everywhere: fix typos 2022-03-18 13:24:08 -04:00
ipc ipc_service: Extend RPMsg structs and misc fixes 2021-11-22 23:03:23 -05:00
kernel kernel: Add "per thread" timeslice mechanism 2022-03-09 13:49:44 -05:00
linker linker: Create sections from zephyr,memory-region nodes 2022-03-19 14:32:17 -04:00
logging logging: fix msg2 creation in __LOG_VA 2022-03-15 12:20:03 +01:00
lorawan lorawan: allow setting of DevNonce for OTAA re-join 2022-03-19 14:29:01 -04:00
math math: introduce macro for integer log2 2022-01-11 16:10:53 -05:00
mgmt everywhere: fix typos 2022-03-14 20:22:24 -04:00
modbus everywhere: fix typos 2022-03-14 20:22:24 -04:00
multi_heap multi_heap: Introduce shared multi-heap memory pool manager 2021-10-12 07:44:46 -04:00
net everywhere: fix typos 2022-03-18 13:24:08 -04:00
pm everywhere: fix typos 2022-03-18 13:24:08 -04:00
portability lib/os: bitarray: introduce SYS_BITARRAY_DEFINE_STATIC() 2021-11-24 14:22:23 -05:00
posix net: sockets: Implement getpeername() function 2022-03-16 16:23:16 +01:00
random
settings everywhere: fix typos 2022-03-14 20:22:24 -04:00
shell shell: Add MQTT backend 2022-03-15 10:01:12 +01:00
stats stats: i2c: I2C stats 2021-12-04 07:22:56 -05:00
storage storage/flash_map: Use larger type for alignment 2021-12-30 16:32:02 -05:00
sys everywhere: fix typos 2022-03-18 13:24:08 -04:00
task_wdt
timing
toolchain everywhere: fix typos 2022-03-14 20:22:24 -04:00
tracing everywhere: fix typos 2022-03-14 20:22:24 -04:00
usb everywhere: fix typos 2022-03-18 13:24:08 -04:00
xen everywhere: fix typos 2022-03-18 13:24:08 -04:00
zephyr everywhere: fix typos 2022-03-14 20:22:24 -04:00
cache.h
device.h device: improve (z_)device_is_ready docs 2022-01-07 10:41:23 -05:00
devicetree.h devicetree: add devicetree/can.h 2022-03-15 14:32:29 -05:00
exc_handle.h
fatal.h fatal: fix missing extern "C" 2021-12-14 11:47:13 -06:00
init.h
irq_nextlevel.h drivers: interrupt_controller: remove @return doc for void funcs 2022-01-12 16:02:16 -05:00
irq_offload.h arch: Add IRQ_OFFSET_NESTED feature 2022-02-21 22:10:03 -05:00
irq.h drivers: interrupt_controller: remove @return doc for void funcs 2022-01-12 16:02:16 -05:00
kernel_includes.h
kernel_structs.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
kernel_version.h
kernel.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
shared_irq.h
smf.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
spinlock.h doc: spinlock: ensure spinlock api is added to doxygen 2022-02-02 08:57:14 -05:00
sw_isr_table.h
sys_clock.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
syscall_handler.h
syscall.h
timeout_q.h
toolchain.h toolchain: introduce macro TOOLCHAIN_HAS_C_AUTO_TYPE 2022-02-28 10:52:51 +01:00
wait_q.h
zephyr.h