benpicco
aabd5eaca5
Merge pull request #15506 from kaspar030/refactor_thread_info
...
core: refactor thread info
2020-11-26 13:01:09 +01:00
ceea0ba949
core/thread: add thread_is_active()
2020-11-25 20:49:00 +01:00
1d5e2e9cd9
all: remove traces of kernel_types.h
...
Automatically removed using:
$ git grep -l kernel_types | xargs sed -i '/^#include .kernel_types/d'
2020-11-25 17:52:34 +01:00
017e9e9d4d
core/thread: add thread_get_status()
2020-11-25 14:39:22 +01:00
5321bcde89
core: thread: move thread_state_to_string() from ps.c
2020-11-25 14:35:00 +01:00
65f997026f
core: drop kernel_types.h
2020-11-25 13:18:53 +01:00
1711b4b649
core/include/kernel_types.h: re-add c++ compat parts
2020-11-23 17:13:35 +01:00
0b801c4de0
all: adapt to moved sched defines
2020-11-23 16:56:34 +01:00
7fa8b69912
core: include inttypes.h in sched.h
...
sched.h now defines PRIkernel_pid to PRIi16, which in turn is defined in
inttypes.h.
2020-11-23 16:56:34 +01:00
1ca0c23173
core/msg: adapt to changed thread define location
2020-11-23 16:56:34 +01:00
369e9b30e2
core: move scheduler defines to sched.h
2020-11-23 16:56:34 +01:00
91111555a6
core/mbox: add mbox_size() and mbox_avail()
2020-11-20 10:38:17 +01:00
Marian Buschsieweke
a06a7978d3
core/mutex: clean up mutex_lock()
...
- Split out handling of the blocking code path of mutex_lock() into a static
`_block()` function. This improves readability a bit and will ease review of
a follow up PR.
- Return `void` instead of `int`.
2020-11-18 11:58:49 +01:00
Marian Buschsieweke
90103f2a6a
core/mutex: consistent debug output
2020-11-18 09:13:00 +01:00
c4ef8b71e1
Merge pull request #15327 from maribu/mutex_cleanup_splitout
...
core/mutex: Cleanup
2020-11-13 18:37:27 +01:00
Benjamin Valentin
eea2df99a3
core/msg_bus: enhace documentation
2020-11-09 21:13:08 +01:00
Marian Buschsieweke
d760e931ae
core/mutex: Cleanup
...
- Use static inline function for `mutex_try_lock()`
- The implementation is trivial enough with the inline-able IRQ API to just
always be inline-ed
- Rename `_mutex_lock()` to `mutex_lock()` and drop the blocking parameter
- This was possible to the stand-alone `mutex_try_lock()` implementation
- This yields a measurable performance bump
2020-11-06 23:27:13 +01:00
benpicco
f7d9e2f1ab
Merge pull request #15398 from maribu/mutex-doc
...
core/mutex: improve documentation
2020-11-06 19:15:10 +01:00
Marian Buschsieweke
876d500846
core/mutex: improve documentation
2020-11-06 18:23:26 +01:00
Leandro Lanzieri
1e41c6453a
core/sched_cb: add module to Kconfig
2020-11-06 15:57:56 +01:00
Martine Lenders
dd81a070f0
Merge pull request #15365 from miri64/core/enh/debug-IS_ACTIVE
...
core: debug: remove parenthesis around ENABLE_DEBUG define
2020-11-03 17:49:14 +01:00
benpicco
ee7a52db2f
Merge pull request #14023 from benpicco/core/msg_bus-bus_flag
...
core/msg_bus: allow to differ between messages form bus and from thread
2020-11-03 13:51:19 +01:00
Martine Lenders
2df29a6806
core: debug: remove parenthesis around ENABLE_DEBUG define
2020-11-03 13:01:08 +01:00
Benjamin Valentin
d6a6c218a3
core/msg_bus: allow to differ between messages form bus and from thread
...
Currently it is not possible to check if a message was sent over a bus
or if it was send the usual way using `msg_send()`.
This adds a flag to the `sender_pid` if the message was sent over a bus.
`MAXTHREADS` is currently set to 32, so there is still plenty of room in
the PID space. (`kernel_pid_t` is `int16_t`)
The message type for bus message type is already accessed through a getter
function, so it's just consistent to do the same for sender_pid.
2020-11-03 10:52:43 +01:00
Bas Stottelaar
cc2e6b08d1
core/*: ENABLE_DEBUG not needed for inttypes.h
2020-11-02 21:49:39 +01:00
Bas Stottelaar
2d3d047fd6
core/*: replace #if ENABLE_DEBUG with IS_ACTIVE
2020-11-02 21:34:12 +01:00
Bas Stottelaar
e675b6379e
core/*: realign ENABLE_DEBUG
2020-10-23 00:45:56 +02:00
Bas Stottelaar
ff53307599
core/*: reorder ENABLE_DEBUG after last include
2020-10-23 00:41:18 +02:00
benpicco
c979fda1f3
Merge pull request #14367 from basilfx/feature/cortex_m33
...
cpu/cortex: add initial support for Cortex-M33
2020-10-08 22:55:06 +02:00
Bas Stottelaar
0f8cecb50b
cpu/cortexm_common: add support for Cortex-M33
2020-10-06 17:11:26 +02:00
c59349482a
core/msg_bus: fix typo 'busses' -> 'buses'
...
Also fix typo 'seach' -> 'search'
2020-10-02 07:52:18 +02:00
benpicco
ab15d67e80
Merge pull request #15059 from maribu/core-thread-cast-align
...
core/thread.c: Silence -Wcast-align flase positives
2020-09-26 16:31:58 +02:00
Marian Buschsieweke
e028f6bbe6
core/thread: thread_measure_stack_free() const arg
...
Add `const` to stack pointer passed to thread_measure_stack_free()
2020-09-25 14:30:33 +02:00
Marian Buschsieweke
59321065db
core/thread.c: Silence -Wcast-align flase positives
...
Verified that each warning generated by -Wcast-align is indeed a false positive
and used an (intermediate) cast to `uintptr_t` to silence the warnings.
2020-09-22 15:15:28 +02:00
Marian Buschsieweke
85e506e893
core/include/kernel_defines.h: Fix container_of()
...
container_of() is safe to use in regard to alignment requirements, when used
correctly. Using `uintptr_t` instead of `char *` for applying the offset results
in -Wcast-align not complaining.
2020-09-22 15:13:03 +02:00
Francisco
64f6b7ffa4
Merge pull request #14702 from maribu/sched_active_thread
...
treewide: Fix direct access to scheduler internals
2020-09-21 09:09:59 +02:00
Jim O'Brien
bd149e7db9
thread: Add THREAD_NAMES make flag
...
Separate thread names from DEVELHELP so thread names can be
enabled in non-development/debug builds when required/desired.
THREAD_NAMES will be enabled by default then DEVELHELP is set to 1.
2020-09-10 10:08:27 +02:00
Marian Buschsieweke
2d8bdf9b83
core/sched: Drop declaration of sched_active_{pid,thread}
...
This should increase odds that developers use thread_get_active() and
thread_getpid() instead.
2020-09-07 12:59:55 +02:00
77735e7e10
Merge pull request #14709 from bergzand/pr/sched/return_thread
2020-09-03 10:18:47 +02:00
495644adc0
sched: return the new thread on sched_run
2020-09-02 13:32:14 +02:00
f68f19a73f
Merge pull request #14722 from bergzand/pr/sched/runqueue_clz
...
sched: Reverse runqueue order when CLZ is available
2020-09-01 22:57:30 +02:00
Cenk Gündoğan
538155c344
Merge pull request #14904 from leandrolanzieri/pr/kconfig/change_prefix_convention
...
treewide: modify Kconfig symbol prefixes
2020-09-01 15:57:06 +02:00
c83b78a567
Merge pull request #14762 from maribu/move_byteorder
...
core/byteorder: Moved to sys
2020-09-01 15:02:11 +02:00
Vincent Dupont
96b018d8dd
core/panic: callback app during panic
2020-08-31 16:45:13 +02:00
Leandro Lanzieri
2e79e00ca7
treewide: change Kconfig prefix for module symbols
...
This changes the prefix used for the symbols that reprensent modules
(not the ones generated from USEMODULE).
MOD_ => MODULE_
2020-08-31 09:57:28 +02:00
dd45eaa472
sched: simplify MODULE_CORE_IDLE_THREAD conditional
2020-08-25 14:00:01 +02:00
764b3102e4
sched: Early exit when scheduling same thread after sleep
2020-08-25 13:59:58 +02:00
benpicco
f3e1032f6e
Merge pull request #14827 from keith-packard/pr/libc/picolibc
...
Pr/libc/picolibc
2020-08-24 18:06:56 +02:00
Keith Packard
531050ada2
picolibc: Enable TLS support [v4]
...
Allocate and initialize a thread-local block for each thread at the
top of the stack.
Set the tls base when switching to a new thread.
Add tdata/tbss linker instructions to cortex_m and risc-v scripts.
Signed-off-by: Keith Packard <keithp@keithp.com>
---
v2:
Squash fixes
v3:
Replace tabs with spaces
v4:
Add tbss to fe310 linker script
2020-08-24 08:26:16 -07:00
Marian Buschsieweke
8745d820ba
core/thread_flags: Fix code indention
...
Apply coding convention on the indent in the single switch statement within
core.
2020-08-23 21:18:10 +02:00