zephyr/kernel
Andrew Boie 7f4d006959 kernel: fix errno access for user mode
The errno "variable" is required to be thread-specific.
It gets defined to a macro which dereferences a pointer
returned by a kernel function.

In user mode, we cannot simply read/write the thread struct.
We do not have thread-local storage mechanism, so for now
use the lowest address of the thread stack to store this
value, since this is guaranteed to be read/writable by
a user thread.

The downside of this approach is potential stack corruption
if the stack pointer goes down this far but does not exceed
the location, since a fault won't be generated in this case.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-07-19 16:44:59 -07:00
..
include kernel: Add the old "multi queue" scheduler algorithm as an option 2018-07-03 17:09:15 -04:00
alert.c
atomic_c.c
CMakeLists.txt
compiler_stack_protect.c
device.c
errno.c kernel: fix errno access for user mode 2018-07-19 16:44:59 -07:00
idle.c kernel: idle: Define _sys_soc_resume functions conditionally 2018-07-19 17:12:58 -04:00
init.c coverage: exclude k_call_stacks_analyze from coverage 2018-07-18 10:39:48 -04:00
int_latency_bench.c
Kconfig kernel: minor improve in SYS_CLOCK_HW_CYCLES_PER_SEC help description 2018-07-16 11:01:47 -04:00
Kconfig.event_logger kernel: Kconfig: Remove redundant 'default n' properties 2018-06-22 15:21:14 -04:00
Kconfig.power_mgmt kernel: Kconfig: Remove redundant 'default n' properties 2018-06-22 15:21:14 -04:00
mailbox.c
mem_domain.c
mem_slab.c
mempool.c
msg_q.c
mutex.c
pipes.c
poll.c kernel/poll: Remove POLLING thread state bit 2018-06-11 17:25:38 -04:00
queue.c kernel/drivers: fix compile warnings 2018-07-01 22:58:23 +02:00
sched.c kernel: Cleanup _ms_to_ticks(). 2018-07-03 22:46:39 -04:00
sem.c
smp.c
stack.c
sys_clock.c
system_work_q.c
thread_abort.c
thread.c kernel: fix errno access for user mode 2018-07-19 16:44:59 -07:00
timer.c
userspace_handler.c
userspace.c
version.c
work_q.c