zephyr/include/misc
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
..
__assert.h misc: Add a FORCE_NO_ASSERT kconfig directive 2018-02-16 10:44:29 -05:00
byteorder.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
dlist.h sys: slist, dlist: Improve "not thread safe" docstrings 2017-10-17 17:39:15 -04:00
errno_private.h kernel: fix errno access for user mode 2018-07-19 16:44:59 -07:00
list_gen.h list_gen: slist: mark some APIs are private 2018-05-16 17:32:59 -07:00
mempool_base.h lib: user mode compatible mempools 2018-04-05 07:03:05 -07:00
mempool.h lib: user mode compatible mempools 2018-04-05 07:03:05 -07:00
printk.h printk: add vprintk() 2017-04-22 14:29:33 +00:00
rb.h doc: fix misspellings in API doxygen comments 2018-05-23 15:28:01 -05:00
reboot.h license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
ring_buffer.h lib: move ring_buffer from misc/ to lib/ 2017-12-15 20:02:01 -05:00
sflist.h sflist: slist-alike that stores flags 2018-05-16 17:32:59 -07:00
slist.h list_gen: slist: mark some APIs are private 2018-05-16 17:32:59 -07:00
stack.h doc: do not show undocumented members 2018-03-20 14:01:30 -04:00
util.h logging: subsystem major redesign 2018-06-29 10:16:45 +02:00