Vincent Dupont
e8619b327b
thread: allow overriding THREAD_PRIORITY_MAIN
2019-03-20 14:09:16 +01:00
Marian Buschsieweke
4c3e92f183
core: Made thread state an enum
...
- Introduced enum type `thread_state_t` to replace preprocessor macros
- Moved thread states to `sched.h` for two reasons:
a) Because of the interdependencies of `sched.h` and `thread.h` keeping it in
`thread.h` would result in ugly code.
b) Theses thread states are defined from the schedulers point of view, so it
actually makes senses to have it defined there
2019-02-13 13:31:52 +01:00
82b2362bc3
core/msg: add assert for problem identified in #10881
2019-01-28 17:14:16 +01:00
Kees Bakker
920d8b8805
core: remove redundant casts
2019-01-09 23:00:50 +01:00
Sebastian Meiling
52bc2b86fa
doxygen: use initial capitals for group names
2019-01-09 08:42:59 +01:00
Sebastian Meiling
dceff6c22f
doxygen: use ingroup instead of addtogroup in core
2019-01-09 08:42:59 +01:00
Sebastian Meiling
81e293422c
doxygen: refine core_sync grouping
...
- Move `@defgroup core_sync` group definition to doc.txt
- Adapt usage of `@ingroup core_sync` accordingly
2019-01-09 08:42:59 +01:00
f2194a8e26
core/irq: fix 2 missing words in documentation
2019-01-07 20:50:59 +01:00
4878cf2119
Merge pull request #10400 from miri64/core/enh/thread_has_queue_func
...
core: provide function to check msg queue initialization
2018-12-19 18:41:39 +01:00
Martine Lenders
c8937f8d40
core: use thread_has_msg_queue() for message queue check
2018-12-19 15:39:50 +01:00
Martine Lenders
7835db5ec3
core: provide function to check msg queue initialization
...
This makes it easier to refactor that part of the `thread_t` structure
later on.
2018-12-19 15:39:50 +01:00
2a03e6fdbd
Merge pull request #10264 from gebart/core/schedstats_t
...
core: Rename typedef schedstat -> schedstat_t
2018-12-18 12:51:29 +01:00
Hauke Petersen
0e4f5bf894
core/clist: add missing function to table in doc
2018-12-11 11:15:18 +01:00
Sebastian Meiling
43d39b7a33
Merge pull request #8333 from samkumar/feature-condition-variable
...
core: condition variable implementation
2018-11-30 21:15:53 +01:00
Sam Kumar
fb8edbb610
core: condition variable implementation
2018-11-30 11:22:07 -08:00
Martine Lenders
28572d7d21
core: mutex: fix DEBUG pointer output
2018-11-09 08:41:50 +01:00
Joakim Nohlgård
5b68bbb2cf
core: Rename typedef schedstat -> schedstat_t
...
To follow naming conventions
2018-10-26 09:10:21 +02:00
PeterKietzmann
0ecaaf021c
core/bitarithm: add explicit 32-bit function
2018-10-08 13:57:21 +02:00
smlng
5b1cd0475f
core/clist: add cppcheck-suppress nullPointer
...
This was found by cppcheck 1.6x used in Travis-CI, however this
seems to be a false positive, as it is not found by newer versions
of cppcheck.
2018-09-25 12:03:58 +02:00
smlng
59e299635b
cppcheck: add/correct reason for cppcheck-suppress
...
Adding and correcting description/rational on why certain cppcheck
warnings or errors are intentionally suppressed.
2018-09-25 12:03:58 +02:00
Martine Lenders
2350c46740
Merge pull request #9826 from kaspar030/fix_byteorder_bebuf
...
core/byteorder: fix bebuftohs() / htobebufs() on big endian
2018-09-03 14:35:29 +02:00
Joakim Nohlgård
ab05acbf89
core: Mark openocd info variables read-only
2018-08-25 14:44:45 +02:00
2d27b32567
Merge pull request #9364 from gschorcht/thread_arch
...
core: add architecture dependent thread information
2018-08-24 12:10:20 +02:00
accf50ce07
core/byteorder: fix byteorder_htobebufs, byteorder_bebuftohs
...
Logic was swapping byte order on Big Endian platforms
2018-08-23 22:07:44 +02:00
Martine Lenders
ec7bf7a854
core: rmutex: include stdint.h
...
For some reason the LLVM/clang version of `stdatomic.h` does not include
`stdint.h`, though it uses types from it.
2018-08-03 18:34:56 +02:00
Gunar Schorcht
9db03537b9
core/pthread: make them compilable with g++
2018-07-21 14:24:57 +02:00
Gunar Schorcht
e75e0a5fe6
core: architecture dependent part in thread_t
2018-07-05 09:22:59 +02:00
Gunar Schorcht
c71f40370b
core: add architecture dependent extension
2018-07-05 09:22:59 +02:00
Hauke Petersen
36e0d4883d
core/byteorder: to/from bufs funcs are big endian
2018-07-04 17:41:04 +02:00
Joakim Nohlgård
69fb02c3fc
core: uncrustify thread_flags.h
2018-06-27 12:43:29 +02:00
2b1ed99a49
core: add more stacksize defines
2018-06-14 23:29:03 +02:00
2212850fbb
core/mbox: doc typo fixes
2018-06-13 12:13:24 +02:00
bd2845adf6
core: fix doxygen grouping
2018-06-11 19:12:02 +02:00
Hauke Petersen
f68b243dfc
core/byteorder: add uint16 from/to buffer funcs
2018-06-06 13:18:48 +02:00
Matthew Blue
2bd1d7f045
core/assert: provide static_assert for c99
2018-06-03 03:15:17 -04:00
Matthew Blue
38a30b68c2
core/debug: fix debug.h use within ISRs
2018-05-17 17:06:44 -04:00
8fd013635f
Merge pull request #9136 from jcarrano/fix-assert
...
core: make assert() an expression.
2018-05-15 21:38:14 +02:00
Juan Carrano
09d1b2eac7
core: Make assert be an expression.
...
The "verbose" alternative for assert() is now an expression and
can be used in all the places that a funcion call can be used.
2018-05-15 14:25:55 +02:00
7c7bb45ce7
core/clist: make clist_foreach() return break-causing node
2018-05-12 00:07:13 +02:00
d9993cc8d2
Merge pull request #8642 from OTAkeys/feat/static_assert
...
assert: add static_assert if using c11
2018-04-03 22:10:46 +02:00
Pieter Willemsen
729441fdb6
assert: add static_assert if using c11
2018-04-03 16:09:31 +02:00
Joakim Nohlgård
1fdfa6480d
core/mutex: fix -fpermissive warning in C++ mode
...
g++ gives the error message "error: invalid conversion from ‘void*’ to
‘list_node*’ [-fpermissive]"
2018-03-25 09:11:26 +02:00
aa57ea5b74
core: instead of cpp-style, use C-style comments
2018-02-06 16:59:58 +01:00
Sebastian Meiling
3bb169307b
Merge pull request #8364 from smlng/osx/debug/fix_output
...
macOS: fix debug output
2018-01-22 15:14:48 +01:00
smlng
e017f8a5f1
core: fix format errors in debug output
2018-01-17 15:25:11 +01:00
499c1812b2
core/bitarithm: provide multiple implementations for bitarithm_lsb()
2018-01-16 22:55:26 +01:00
e6a9a760a7
core/thread: add thread_getname() dummy available without DEVELHELP
2018-01-15 14:37:04 +01:00
c001e14f9d
core: debug: rely on optimizer to kick out unused debug code
2018-01-12 13:38:06 +01:00
Martine Lenders
4013adcf65
Merge pull request #8277 from miri64/doc/fix/must-not-may-not-wording
...
doc: Fix 'must not'/'may not' wording
2018-01-10 20:34:17 +01:00
MichelRottleuthner
ee17dae5af
pkg/fatfs: add vfs integration
2018-01-09 14:46:40 +01:00
Martine Lenders
2e93ba1c50
doc: Fix 'must not'/'may not' wording
...
I applied the following terminology and changed the wording in the doc
accordingly:
* must not: If the parameter is of the value it *must not* be it either
hits an assert or crashes the system.
* may not: The value can be that value, but the function will return an
error.
2017-12-19 09:00:12 +01:00
a8ec624ac4
core: cib: fix overflow handling
2017-11-22 17:53:16 +01:00
Martine Lenders
4952ffbae7
Merge pull request #6698 from Lotterleben/doc_thread_h
...
thread.h: extend doc for msg_waiters and msg_array
2017-11-16 19:25:52 +01:00
Lotte Steenbrink
9cc3641b75
thread.h: extend doc for msg_waiters and msg_array
2017-11-16 10:15:46 -08:00
24e7869484
core/include/panic.h: fix typos
2017-11-16 14:40:16 +01:00
32c10ae2c9
core, cpu: rename thread_start_threading() -> cpu_switch_context_exit()
2017-11-16 14:40:16 +01:00
bb4a5c5cdf
core: remove COREIF_NG
2017-11-16 14:39:54 +01:00
615b1e60bc
core/clist: add argument to clist_foreach
2017-11-06 12:49:22 +01:00
f142908f4e
Merge pull request #7655 from kaspar030/add_list_sort
...
core/clist: add clist_sort()
2017-11-06 12:46:01 +01:00
Joe Kroesche
5b6d311830
core/include/ringbuffer.h: add doc ref to tsrb.
...
Updated file comment header to comply with coding standard;
added brief module description and reference to tsrb to guide reader
who might be looking for thread-safe implementation
2017-10-29 08:08:15 -05:00
Joakim Nohlgård
317b013319
core/thread_flags: Remove unused THREAD_FLAG_MUTEX_UNLOCKED
...
and improve docs for THREAD_FLAG_TIMEOUT
2017-10-12 14:30:59 +02:00
Travis Griggs
2fd324a52f
correct print_stack macro
2017-10-03 14:39:25 -07:00
de784961fa
core/clist: add clist_sort()
2017-10-03 00:36:14 +02:00
5cc8204e10
Merge pull request #7048 from smlng/enh/ps/schedstats
...
schedstats: revert to 32Bit, and enhance output of schedstats
2017-09-28 16:08:51 +02:00
smlng
6ac0922c7d
doc: replace dashes
2017-09-06 08:49:05 +02:00
Joakim Nohlgård
a67694a8c0
core: thread_flags: Set sched_status_switch_request after waking a waiting thread
2017-08-31 22:51:28 +02:00
Joakim Nohlgård
5dd38c68e2
Merge pull request #7536 from kaspar030/improve_thread_flags_docs
...
core: thread_flags: improve documentation
2017-08-30 20:44:04 +02:00
ee945978e9
core: thread_flags: improve documentation
2017-08-30 13:43:02 +02:00
Joakim Nohlgård
ef01efc387
core/msg: Set THREAD_FLAG_MSG_WAITING when queueing messages
2017-08-30 12:04:47 +02:00
Joakim Nohlgård
87d322556a
core/thread: fix Doxygen nesting
...
Everything below the thread states was cut off in the module
documentation because Doxygen does not handle nested @name tags.
2017-08-11 07:47:09 +02:00
68f13467d3
core: remove redundant includes
2017-08-02 14:27:55 +02:00
7a0fcc30c8
sys: add initial SSP support
2017-06-27 18:05:14 +02:00
smlng
e7136e2dde
schedstats: revert #6975 , use 32Bit again
2017-06-08 14:33:47 +02:00
Raul Fuentes
f21d497be4
tread.h: Minor examples compile
2017-05-30 20:48:57 +02:00
0fcc7d3834
cleanup: apply headerguard script output
2017-05-24 17:54:02 +02:00
Sebastian Meiling
dd4f8f7704
Merge pull request #6975 from OTAkeys/pr/ps_schedstatistics_fix
...
ps: fix schedstatistics
2017-05-17 13:50:42 +02:00
Vincent Dupont
6d5b95517d
ps: fix schedstatistics
...
Fix xtimer_now() usage and fix columns alignment in ps command when
module schedstatistics is used.
2017-05-16 10:33:42 +02:00
Hauke Petersen
f914ae4876
core/panic: enable panic modes for Cortex-M7
2017-05-08 09:16:11 +02:00
89390a83d4
core: byteorder.h: rename HTON* -> hton*, NTOH* -> ntoh*
2017-04-13 10:59:39 +02:00
smlng
4ffbbfb8f6
doc: correct naming of doxygen group in core
2017-04-10 16:11:49 +02:00
0b10dccf64
core: adapt to Makefile.submodule
2017-03-28 20:50:48 +02:00
smlng
1b69f281f9
core, log: fix tautology compare error with toolchain llvm
2017-03-17 09:04:09 +01:00
Simon Brummer
68581a8fbe
core: bugfix: ringbuffer_remove
2017-03-01 22:01:26 +01:00
8d207ca724
Merge pull request #5731 from melshuber/master
...
core: recursive mutex implementation
2017-02-21 14:03:14 +01:00
Martin Elshuber
6cd3d34686
Removed duplicated code, fixed comment
2017-02-20 12:11:02 +01:00
Joakim Nohlgård
47e970635b
core: Fix assert printf format string
...
cppcheck said: core/assert.c:23: warning (invalidPrintfArgType_sint): %d in
format string (no. 2) requires 'int' but the argument type is 'unsigned
int'.
2017-02-16 17:11:22 +01:00
smlng
f4d9972574
llvm: hide redefines of atomic sync operations
2017-02-14 10:53:12 +01:00
Martin Elshuber
b9c2fc8254
Added reentrant mutex implementation
...
In contrast to normal mutexes, reeentrant mutexes allow to be relocked
multiple times from the same thread.
2017-02-09 15:17:39 +01:00
Joakim Nohlgård
4fdd2ea41a
core: Remove atomic in favour of C11 stdatomic
2017-02-08 16:23:50 +01:00
Joakim Nohlgård
4297e06fe5
core: add __sync_x library helpers for <gcc-4.7
2017-02-08 16:23:47 +01:00
Joakim Nohlgård
fcdb157228
core: rename c11_atomic -> atomic_c11
2017-02-08 16:23:47 +01:00
Joakim Nohlgård
6d20ac084b
core/c11_atomic.c: Add remaining C11 atomic library helpers for GCC
2017-02-08 16:23:47 +01:00
Joakim Nohlgård
d322af3fe5
core/include/mutex.h: remove unused #include "atomic.h"
2017-02-08 16:23:47 +01:00
Joakim Nohlgård
985afd8d80
core/mutex.c: remove unused #include "atomic.h"
2017-02-08 16:23:47 +01:00
smlng
0d4855c256
core: fix osx compile issue
2017-02-01 09:06:48 +01:00
Oleg Hahm
c5abb08316
Merge pull request #4058 from daniel-k/pr/gdb_threads_openocd
...
cortex_m: Add debug symbols for OpenOCD/GDB thread support
2017-01-25 17:49:42 +01:00
smlng
66c02daeae
core: doc typos
2017-01-20 13:35:57 +01:00
Oleg Hahm
7ee7801c10
*: remove trailing underscores from header guards
2017-01-19 18:30:53 +01:00
daniel-k
9d403d95ce
cortex_m: Add debug symbols for OpenOCD/GDB thread support
2017-01-16 20:50:35 +01:00
Oleg Hahm
4e068bc1a4
doc: core: fix formatting
2017-01-16 18:04:04 +01:00
Oleg Hahm
d8574c15e9
doc: core: exclude MUTEX_LOCKED from documentation
2017-01-16 18:04:04 +01:00
Hauke Petersen
a7502355b8
core: remove reboot.h
...
with the new PM, the reboot.h is deprecated and pm_reboot() from
periph/pm.h should be used.
2017-01-13 10:17:58 +01:00
Hauke Petersen
6270283033
Merge pull request #6160 from kaspar030/introduce_new_power_management
...
Introduce new power management
2017-01-12 17:31:49 +01:00
ca7bf15ac4
core: panic: adapt to pariph/pm
2017-01-12 16:26:01 +01:00
1b31fc75c4
core: reboot: map to periph/pm
2017-01-12 16:26:01 +01:00
6150e2753a
drivers: periph: pm: introduce new power management API
2017-01-12 11:24:15 +01:00
0194091673
remove obsolete lpm code
2017-01-12 11:24:15 +01:00
Victor Arino
bba8cf4c03
core/list: uncrustify
2017-01-11 09:00:25 +01:00
Victor Arino
be146741c9
core/list: add remove method
2017-01-11 09:00:25 +01:00
Victor Arino
ea12433a8d
core/mutex: support locked initialization
2016-12-14 10:24:45 +01:00
Francisco Acosta
84d0d61279
Merge pull request #5608 from gebart/pr/xtimer-ticks
...
xtimer: Allow arbitrary timer frequency, second attempt
2016-11-29 23:00:31 +01:00
Martine Lenders
235375f664
native: always assert() verbosely
2016-11-29 19:28:23 +01:00
Joakim Nohlgård
0ba6c9f3a4
core/sched: Use xtimer ticks for sched statistics
2016-11-28 11:00:42 +01:00
Martine Lenders
8406164ece
core: fix stdio.h include for assert
2016-11-18 15:44:25 +01:00
Peter Kietzmann
11a8969ab0
Merge pull request #6003 from miri64/core/doc/msg-init-queue-power-of-two
...
doc: make the 2^x requirement for msg_queue more visible
2016-11-01 12:16:09 +01:00
Martine Lenders
f93ab1a1f6
doc: make the 2^x requirement for msg_queue more visible
2016-11-01 11:07:59 +01:00
Martine Lenders
61daeff04c
Merge pull request #5881 from miri64/core/enh/add-verbose-assert
...
core: define macro for verbose behavior for assert()
2016-10-31 20:13:59 +01:00
Martine Lenders
65a11162fe
core: define macro for verbose behavior for assert()
...
Since this is also done for MSP430 specifically that file can be
removed.
2016-10-31 13:51:54 +01:00
Ian Martin
28a7ddc9a8
core: save the stack_start in the thread context for mpu_stack_guard
2016-10-24 12:36:15 -04:00
057274b1fb
Merge pull request #5877 from miri64/core/doc/assert-addr2line
...
core: add documentation on how to get line of failed assert()
2016-10-18 12:06:41 +02:00
Lotte Steenbrink
8bd0bd17f3
thread.h: rearrange docs, add small tutorial
2016-10-16 12:46:54 -07:00
Martine Lenders
d724b7c9aa
core: add documentation on how to get line of failed assert()
2016-10-11 09:06:41 +02:00
25a6ef5273
core: sched: mark sched_run() as used
2016-08-29 13:30:17 +02:00
Ludwig Knüpfer
49e76997a5
core/panic: add missing #ifdef NDEBUG
...
In case NDEBUG is not defined, `crash_code` is used later on
2016-07-26 19:37:35 +02:00
7a3c63fddb
core: clist: clist_lpeek(): add missing return statement
2016-07-20 22:25:48 +02:00
Martine Lenders
e16bbda5f6
Merge pull request #5629 from kaspar030/improve_clist
...
core: improve clist
2016-07-18 19:36:16 +02:00
3a6f95008d
core: mbox: introduce thread decoupled message queues
2016-07-18 16:56:41 +02:00
d86c141842
core, tests: adapt to changed clist function names
2016-07-18 16:20:40 +02:00
9bfea9410e
cib: add unsafe operations
2016-07-18 16:14:19 +02:00
6d12a9166a
core: clist: API enhancements
...
- renamed clist_insert() -> clist_rpush()
- renamed clist_remove_head() -> clist_lpop()
- renamed clist_advance() -> clist_lpoprpush()
- added clist_lpush(),
clist_rpop(),
clist_remove(),
clist_find(),
clist_find_before(),
clist_lpeek(),
clist_rpeek()
- improved documentation
2016-07-18 13:18:15 +02:00
ec897a868c
core, gnrc_netreg: remove redundant or unneeded clist.h include
2016-07-18 13:17:31 +02:00
Victor Arino
de173ff48f
core/cib: add peek capabilities
2016-07-14 16:47:03 +02:00
Joakim Nohlgård
b02e0eca47
ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP)
2016-07-12 10:17:49 +02:00
7718f114cb
all: remove pointer casts for msg.content.ptr
2016-06-02 23:13:42 +02:00
f0b44d5175
core: change type of msg.content.ptr to void*
2016-06-02 20:17:50 +02:00
MohmadAyman
53df3e8b57
core: cpu: provide function to acquire ISR stack usage
2016-06-01 23:01:35 +02:00
Martine Lenders
c313c26dbb
Merge pull request #5444 from OlegHahm/msg_send_receive_fix
...
core: msg_send_receive if receiver is not ready
2016-05-31 20:45:57 +02:00
Oleg Hahm
dc7d191748
core: msg_send_receive if receiver is not ready
2016-05-31 20:06:35 +02:00
Andreas "Paul" Pauli
c805853c34
Merge pull request #5376 from OlegHahm/doxy_fixes
...
doc: document THREAD_STACKSIZE correctly and fix PRNG documentation
2016-05-18 15:00:10 +02:00
Oleg Hahm
1319c5e874
doc: add a hint to cpu_conf.h
2016-05-18 12:48:35 +02:00
Martine Lenders
15130e8674
Merge pull request #5298 from cgundogan/pr/cib/cib_get_check_fix
...
cib: check (write > read) explicitly
2016-05-17 23:02:13 +02:00
Oleg Hahm
435685cf4a
doc: add missing information about thread_create
2016-04-21 14:38:13 +02:00
Oleg Hahm
06e5c13b3d
core: doc: do not exclude CPU specific values
...
This patch ensures that doxygen will add the CPU dependent defines for stack sizes.
2016-04-20 18:46:14 +02:00
Hauke Petersen
f977654a70
Merge pull request #5270 from authmillenon/core/fix/mutex-debug
...
core: allow DEBUG in mutex.c to run without DEVELHELP
2016-04-20 15:05:11 +02:00
Martine Lenders
1750e1bad8
core: mutex: piggy-back some style fixes
2016-04-18 17:23:55 +02:00
Oleg Hahm
8690a888f5
Merge pull request #5295 from OlegHahm/msg_init_queue_assert
...
core: assert correct msq queue size on creation
2016-04-17 14:49:54 +02:00
Martine Lenders
85dfed3249
Merge pull request #5283 from kaspar030/make_msg_use_list
...
core: msg: use new list instead of priority_queue
2016-04-17 14:48:50 +02:00
Oleg Hahm
bb35913840
core: assert correct msq queue size on creation
...
The return value was never checked. Hence, this runtime check was rather
pointless. Better assert the correct size during development.
2016-04-17 13:55:21 +02:00
Martine Lenders
ccb4521599
core: allow DEBUG in mutex.c to run without DEVELHELP
2016-04-17 13:38:49 +02:00
Cenk Gündoğan
e7b86361e2
cib: check (write > read) explicitly
2016-04-12 08:06:13 +02:00
DipSwitch
4e8834ae87
core: Remove _t from struct names
2016-04-11 21:46:53 +02:00
Oleg Hahm
57e9a25e2b
doc: a note about creating threads w/ same prio
2016-04-11 12:11:48 +02:00
Cenk Gündoğan
aa15ec59dc
Merge pull request #5275 from cgundogan/pr/cib/doc_fix
...
cib: doc fix
2016-04-11 07:39:30 +02:00
Cenk Gündoğan
2f21c623ab
core/thread_flags: remove superfluous bitarithm.h include
2016-04-10 13:01:19 +02:00
dc8f55df7e
core: msg: use new list instead of priority_queue
2016-04-10 00:16:48 +02:00
Cenk Gündoğan
2adc0eae75
cib: doc fix
2016-04-09 13:01:32 +02:00
Oleg Hahm
c09190b979
Merge pull request #3851 from kaspar030/make_messaging_optional
...
core: make messaging optional
2016-03-30 23:56:55 +02:00
58a12e5034
core: make messaging optional
2016-03-30 23:27:09 +02:00
46143c6bdc
core: thread_flags: optimize thread_flags_wait_one, fix doxygen
2016-03-30 17:11:49 +02:00
abff2e3fb7
core: introduce thread flags
2016-03-30 10:38:53 +02:00
f9f6adb48d
core: clist: make singly linked
2016-03-30 00:27:49 +02:00
f626ee5969
Merge pull request #4557 from kaspar030/introduce_intrusive_singly_linked_list
...
core: mutex: several optimizations
2016-03-29 22:25:43 +02:00
350c341ce1
core: mutex: use of intrusive linked list instead of priority queue
2016-03-29 21:50:17 +02:00
7c39134d5d
core: introduce intrusive singly linked list
2016-03-29 21:50:17 +02:00
Yonezawa-T2
1ce140d910
debug: fix compilation error for %p formatter
2016-03-29 11:46:29 +09:00
DipSwitch
0bb4748a94
core: Fix/refactor function naming in core/incude/irq.h
2016-03-20 16:47:34 +01:00
Martine Lenders
5a415a91e2
Merge pull request #4052 from IldarValiev/patch-1
...
Added thread existence check at thread_wakeup
2016-03-16 12:19:08 +01:00
Joakim Nohlgård
0cf0278e0f
core/lpm.h: Fix Doxygen typo
2016-03-14 23:09:49 +01:00
cc1771787e
core: panic: use LOG_ERROR instead of printf
2016-03-11 00:42:11 +01:00
René Kijewski
818d703810
Merge pull request #5004 from OlegHahm/core_kernel_macros_attributs_merge
...
core: merge kernel_macros.h and attributes.h into kernel_defines.h
2016-03-10 16:47:10 +01:00
IldarValiev
475b1af26d
core: added assert to cib_init()
2016-03-10 13:32:00 +01:00
Oleg Hahm
bdcf8879fd
core: merged kernel_macros.h and attributes.h
...
Merged into new kernel_defines.h and updated all includes.
2016-03-09 22:29:06 +01:00
IldarValiev
a8391e346e
core: added documentation to cib.h
...
size can be equal 0 or 2^n only. Because else mask won't consist of consecutive '1' only (e.g., 0b00111111) and functions cib_get() and cib_put() will return wrong values.
2016-03-09 01:53:12 +01:00
IldarValiev
4f5bea7d99
core: thread: Added stack size validation
2016-03-07 18:56:51 +05:00
IldarValiev
bad2b5c187
core: thread: Added validation of pid
2016-03-07 18:56:47 +05:00
2b010b5337
core: rename tcb_t -> thread_t, move into thread.h
2016-03-05 18:20:17 +01:00
Joakim Nohlgård
e088403ce0
Merge pull request #4082 from daniel-k/pr/msg_reply_missing_irq_restore
...
core/msg: add missing irq restoration in msg_reply()
2016-03-04 15:59:06 +01:00
Oleg Hahm
76c397f252
Merge pull request #4924 from kaspar030/smaller_core_types
...
core: reduce types of tcb->status and tcb->priority
2016-03-02 11:15:38 +01:00
daniel-k
4295d028ec
core/msg_reply: only assert target tcb, no error handling
2016-03-01 21:34:01 +01:00
a8865a2808
core: reduce types of tcb->status and tcb->priority
2016-02-29 01:48:08 +01:00
9082273746
core: header cleanup
2016-02-28 22:46:28 +01:00
bdfc76a052
core: msg: fix msg_try_receive not checking msg_waiters
2016-02-23 14:43:42 +01:00
Martine Lenders
c9f05efbb7
doc: atomic: provide explanation about why atomic_int_t is struct
...
See also https://github.com/RIOT-OS/RIOT/pull/2321#issuecomment-72088818
2016-02-16 13:43:10 +01:00
Hauke Petersen
35eb99a46e
Merge pull request #3984 from kaspar030/simplify_reboot
...
core: cpu: sys: simplify reboot()
2016-01-29 14:24:08 +01:00
938ff5c5e7
core: cpu: sys: simplify reboot()
2016-01-27 13:30:01 +01:00
Martine Lenders
febcac6d43
core: add capability to output message queue
2016-01-23 15:33:48 +01:00
1d22374196
Merge pull request #4475 from authmillenon/doc/enh/msg
...
core: msg: update detail section on IPC
2015-12-16 23:00:15 +01:00
Martine Lenders
49167a4b7d
core: msg: piggy-back some style fixes by uncrustify
2015-12-15 17:10:17 +01:00
Martine Lenders
512448ba12
core: msg: update detail section on IPC
2015-12-15 11:46:47 +01:00
64674d21d5
core: irq.h: remove dINT/eINT traces
2015-12-14 21:34:35 +01:00
Hauke Petersen
cf53aeddd8
Merge pull request #4382 from haukepetersen/rm_core_flagsh
...
core: move thread flags from flags.h to thread.h
2015-12-08 11:36:43 +01:00
Hauke Petersen
22428f6cfb
core: adapted to renamed THREAD_FLAGS
2015-12-07 22:09:46 +01:00
Hauke Petersen
7dcb40b46a
core/thread.h: renamed thread creation flags
2015-12-07 22:09:46 +01:00
Hauke Petersen
7f5ab0cd5f
core: moved flags.h to thread.h
2015-12-07 22:09:46 +01:00
Oleg Hahm
a82835a72b
core: mute compiler warning
2015-12-07 20:28:52 +01:00
Oleg Hahm
6de92b0843
Merge pull request #4378 from haukepetersen/fix_core_includeguards
...
core: fixed include guards a minor style/doxygen
2015-12-07 11:33:31 +01:00
René Kijewski
0906c729a4
Merge pull request #4379 from haukepetersen/fix_core_doc
...
core/atomic.h: fix doxygen to get rid of warning
2015-12-02 11:35:32 +01:00
Hauke Petersen
0f43fb9023
core/atomic.h: fix doxygen to get rid of warning
2015-12-02 11:14:07 +01:00
Hauke Petersen
f326beb3f7
core/native_sched.h: style and doxygen fixes
2015-12-02 11:11:00 +01:00
Hauke Petersen
6fc26f8d18
core: fixed include guards for selected headers
2015-12-02 11:08:23 +01:00
Oleg Hahm
349d333ede
Merge pull request #3997 from DipSwitch/core_msg_avail_support
...
core: add support to see if there are messages available for the curr…
2015-12-02 11:07:17 +01:00
DipSwitch
15e8f4e3d1
core: add support to see if there are messages available for the current thread
2015-12-02 09:08:15 +01:00
5c0154b5de
core: msg: remove pointless warning in doxygen
2015-11-28 23:59:09 +01:00
Cenk Gündoğan
acd7728dea
Merge pull request #4357 from OlegHahm/assert_WARNER
...
core: make assertions easier to spot
2015-11-27 23:01:11 +01:00
Oleg Hahm
d86f1af34b
core: make assertions easier to spot
2015-11-27 18:09:40 +01:00
Martine Lenders
5d524f947c
Merge pull request #3689 from OlegHahm/priority_queue_not_add_twice
...
core: assertion not to add twice to priority_queue
2015-11-27 16:29:44 +01:00
Martine Lenders
0532d98b51
Merge pull request #3934 from locicontrols/sched-test-stack2
...
core: fix stack test when SCHED_TEST_STACK=1 but DEVELHELP=0
2015-11-27 16:25:43 +01:00
Oleg Hahm
07e2505ebd
core: assertion not to add twice to priority_queue
2015-11-27 14:57:17 +01:00
BytesGalore
2b2408ddb3
core: fix typo in kernel_macros.h (alternative to #3364 )
2015-11-24 17:42:10 +01:00
Ludwig Knüpfer
8320a121ee
core/log: add @file doxygen command
...
Without this command the `log.h` documentation gets mangled with the
`core_util` documentation.
2015-11-01 15:21:46 +01:00
Oleg Hahm
bb306038ae
core: disallow msg_send_receive() on same thread
2015-09-29 12:45:27 +02:00
Ludwig Knüpfer
eda6328e21
documentation: update my name (Ortmann -> Knüpfer)
2015-09-27 18:58:30 +02:00
Ian Martin
2579e64e9f
core: fix stack test when SCHED_TEST_STACK=1 but DEVELHELP=0
2015-09-22 11:59:21 -04:00
Cenk Gündoğan
8aa04e82a0
core/panic: call cpu_print_last_instruction before printing other messages
2015-09-22 14:54:55 +02:00
Joakim Nohlgård
98c465008b
all: Update @gebart family name, email
2015-09-20 13:47:39 +02:00
Oleg Hahm
e15bdd257a
debug: replace __FILE__ by RIOT_RELATIVE_FILE
2015-09-20 01:51:47 +02:00
Oleg Hahm
ac88d7960c
core: remove DEBUGF macro
2015-09-20 01:51:47 +02:00
Hauke Petersen
3b26f742cd
core/lpm: removed hwtimer dependent flag
2015-09-17 11:26:45 +02:00
085383bfae
core: remove hwtimer, switch schedstatistics to xtimer
2015-09-16 10:58:51 +02:00
Oleg Hahm
ef5a7e7d05
core mutex: use ATOMIC_VALUE for debug output
2015-09-16 03:30:05 +02:00
Martine Lenders
93f555ef69
Merge pull request #3782 from OlegHahm/RIOT_assert
...
core: RIOT's own assert macro
2015-09-12 13:12:34 +02:00
Oleg Hahm
49917a5797
core: cpu: fix check for DEVELHELP
2015-09-12 12:43:15 +02:00
Oleg Hahm
f3245cecac
core: panic: last instruction's address for assert
2015-09-11 23:23:31 +02:00
René Kijewski
888e146fe4
core: define assertion failed message in one place
2015-09-11 23:23:30 +02:00
Oleg Hahm
c4ba1c53ed
core: added RIOT's own assert macro
2015-09-11 16:09:28 +02:00
Hauke Petersen
5e7a026365
core: optimized output on kernel-init
...
This PR saves some memory by ommiting redundant output. The printing
of "jumpint into first task..." is obsolete, as the thread_create
calls are not checked for errors anymore.
Further the version print is moved into the main_trampoline. This
prevents the STDLIB from using precious stack space on the ISR
stack, on which it is running before jumping into main - hence
opening the option to decrease the stacksize for the ISR stack.
2015-09-09 16:23:46 +02:00
Oleg Hahm
e2639d7f83
core: use enums for panic
2015-09-04 16:14:35 +02:00
René Kijewski
c0c2d8660f
core: missing restoreIRQ in mutex_unlock
...
`mutex_unlock()` did not restore IRQsbefore yielding for the woken up
thread.
2015-08-21 09:16:54 +02:00
afd68d1f31
core: remove needless thread creation checks in kernel_init
2015-08-14 01:35:48 +02:00
Oleg Hahm
705e70e6c6
Merge pull request #3322 from gebart/pr/add-missing-inttypes-includes
...
Add missing inttypes.h includes
2015-07-07 16:49:39 +02:00
c762b43221
debug: add DEBUG_EXTRA_STACKSIZE define
2015-07-07 11:47:32 +02:00
Joakim Gebart
555085acdc
core/sched: Add missing inttypes.h include when debugging.
2015-07-07 00:53:26 +02:00
Joakim Gebart
23e01dd4c8
core: Add C11 atomic helpers for GCC
...
These functions are required for std::atomic in C++11 on Cortex-M0.
The functions are only used if GCC does not know how to generate any
lock-free atomic hardware operations.
2015-07-06 12:17:57 +02:00
Martine Lenders
ed5b960928
Merge pull request #3192 from kaspar030/fix_hwtimer_warning
...
core: hwtimer: fix debug message newline
2015-06-14 17:49:07 +02:00
ximus
5f422a9d07
Fix write of thread stack end marker
...
Only the lower half of the stack end marker is being writtem
to the stack buffer end.
2015-06-12 16:02:40 -07:00
a7e50d3c4d
core: hwtimer: fix debug message newline
2015-06-11 21:31:58 +02:00
Lotte Steenbrink
738c700daf
Merge pull request #3141 from Lotterleben/panic_warn
...
core: get rid of warning: unused parameter 'crash_code'
2015-06-11 16:44:32 +02:00
Martine Lenders
905aacd87f
core: include missing thread.h to debug.h
2015-06-02 18:01:16 +02:00
Lotte Steenbrink
6274a2b982
get rid of warning: unused parameter 'crash_code'
2015-06-01 12:41:07 -07:00
f953ae8187
core: optimize panic.c
2015-05-29 17:17:11 +02:00
Hauke Petersen
9943f51080
global: renamed cpu-conf.h into cpu_conf.h
2015-05-28 15:45:05 +02:00
Joakim Gebart
41ef11c215
core: Remove atomic_set_return()
2015-05-26 21:24:10 +02:00
Joakim Gebart
748499b737
core/mutex: Use atomic_int_t for lock variable.
2015-05-26 21:23:48 +02:00
Joakim Gebart
13832d8e62
everything: Remove filename from @file Doxygen command
2015-05-22 07:34:41 +02:00
Lucas Jenss
426170b064
Improve naming of thread stacksize/priority constants
...
As discussed in #2725 , this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:
* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00
Joseph Noir
bddaee751d
Add replacement headers for thread, mutex and cond
...
These headers do not provide full stl functionality,
but a small subset:
* thread and this_thread
* condition_variable (some timed functions are missing)
* mutex, lock_guard and unique_lock
2015-05-18 13:57:02 +02:00
c944d54171
core: log: introduce logging API
2015-05-17 21:49:22 +02:00
Oleg Hahm
4e7b89599b
core: print thread table on crash
2015-05-12 07:46:10 +02:00
Oleg Hahm
cb1f047f59
core: unified core_panic implementation
2015-05-10 11:58:43 +02:00
Oleg Hahm
828839316b
core: renamed crash.h to panic.h
2015-05-09 18:44:10 +02:00
Joakim Gebart
215ccc1213
core: Introduce atomic counters
...
- Move generic implementation of atomic_set_return to core/atomic.c
- Generic implementation of atomic compare and swap in core/atomic.c
- atomic_cas is used to implement atomic counters in core/include/atomic.h
- atomic_int_t is an atomic integer type
- ATOMIC_INIT can be used as an initializer for atomic_int_t
- ATOMIC_VALUE gets a reference to the value of an atomic integer
2015-05-07 18:52:13 +02:00
Oleg Hahm
89e871e7e3
doc: fixes doxygen warnings in core
2015-04-21 18:53:36 +02:00
Martine Lenders
4e7a32efc1
core: Allow debug messages without DEVELHELP
2015-04-10 09:15:34 +02:00
Martine Lenders
5214e14e66
Revert "debug.h: check stacksize fixed"
2015-03-31 22:38:04 +02:00
Simon Brummer
b495c24609
debug.h: check stacksize fixed
2015-03-31 13:26:21 +02:00
altairpearl
a409191b71
core: Updated include guards to remove leading underscores
2015-03-30 06:10:58 +05:30
Ludwig Ortmann
d701cefd5e
Revert "core: limit message queue size"
2015-03-27 22:46:40 +01:00
Martine Lenders
2bb5468df4
Merge pull request #2674 from Darredevil/patch-1
...
core: limit message queue size
2015-03-27 22:40:34 +01:00
Darredevil
d5542beb91
core/include/cib: repaired file include guards
2015-03-24 22:38:29 +02:00
Alexandru Caciulescu
a53e06a772
core: limit message queue size
2015-03-24 22:19:38 +02:00
Hauke Petersen
3ccfe60092
core: remove lagacy tests from clist and lifo
2015-03-22 16:12:08 +01:00
Oleg Hahm
70c014d698
doc: additional hint for msg_send_receive()
2015-03-18 14:26:03 +01:00
2acd216d5a
Merge pull request #2589 from kushalsingh007/isr
...
Core: doc: add note advising against creation of threads from within ISR
2015-03-17 10:58:26 +01:00
kushalsingh007
3b7e54b441
Core: Change in description of thread_create function.
...
- Fixes #2136
- Adds warning about creating threads from within an ISR.
2015-03-13 19:55:08 +05:30
Oleg Hahm
4fec8fd31e
doc: improvement to IPC documentation
...
Per default, doxygen will take only the part until the first dot into
account for the brief description. In this case this leads to an
ambiguous overview over the IPC send functions.
2015-03-13 10:15:41 +01:00
Ludwig Ortmann
0b8271a08a
Merge pull request #2429 from authmillenon/all/doc/enable-helper-macros
...
doc: enable helper macros for doxygen
2015-03-07 11:32:04 +01:00
Oleg Hahm
e75d9505ae
core: added missing semicolon in header
2015-03-05 17:08:52 +01:00
Oleg Hahm
b441cdfb3a
core: documentation: document msg_reply_int()
2015-03-05 16:03:08 +01:00
Oleg Hahm
460dcdf8bb
core: documentation: msg_reply returns -1 on error
2015-03-05 15:54:43 +01:00
Martine Lenders
21dd2eb21d
doc: enable helper macros for doxygen
2015-03-03 17:53:32 +01:00
Ludwig Ortmann
cec87139a5
core, cpu, drivers, tests: remove trailing space
2015-02-18 13:52:48 +01:00
Martine Lenders
ffe9678bd1
core: expand documentation of thread_create()
...
Adds specific documentation for the error return values of
thread_create().
2015-02-13 21:34:33 +01:00
Martine Lenders
29c3fe9830
[SQUASH ME] fix typo
2015-02-12 14:30:36 +01:00
Martine Lenders
da10435a61
debug: Make DEBUGF more platform-independent
2015-02-12 12:57:21 +01:00
Martine Lenders
0eb2d78dda
doc: use my real name
2015-02-08 18:52:16 +01:00
BytesGalore
714ee38355
boards: core: cpu: drivers: sys: added missing header guards
2015-01-27 19:10:57 +01:00
René Kijewski
5f29fed076
core: introduce msg_sent_by_int()
...
msg_send_int() sets `m->sender_pid = target_pid`. This was used to flag a
message as having been sent by an ISR.
This PR introduces a static inline function `msg_sent_by_int()` and a
specific define for this purpose.
2014-12-18 23:04:03 +01:00
Ludwig Ortmann
ad14b60fe7
Merge pull request #1958 from Kijewski/sched_switch-on-run-queue
...
core: `sched_switch()` switch if not on runqueue
2014-12-16 11:41:39 +01:00
Ludwig Ortmann
093085b4ff
native: workaround for missing __builtin_bswap16
...
Implements a workaround for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624
This is present in current versions of ubuntu 12.04 and debian 7.7 (stable).
2014-12-15 09:27:40 +01:00
René Kijewski
310ea35018
Don't evaluate inISR() if not needed
2014-12-11 17:39:17 +01:00
René Kijewski
370f926bad
core: sched_switch()
switch if not on runqueue
...
Fixes #1935 .
`sched_switch()` should not only switch if the other priority is higher,
but also if the current thread was moved from the runqueue.
2014-12-11 17:39:17 +01:00
Ludwig Ortmann
6c9e892927
Merge pull request #2139 from OlegHahm/doxygen_fix_core_warnings
...
doc: core: sched: add some references
2014-12-05 16:56:53 +01:00
b0d98dd8bd
Merge pull request #2141 from LudwigOrtmann/core_dint_final
...
core: remove remaining dINT occurences
2014-12-04 20:23:12 +01:00
Oleg Hahm
07fe5bcc9f
Merge pull request #1709 from benpicco/hwtimer_fix
...
allow HWTIMER_SPEED > 1000000
2014-12-04 19:00:38 +01:00
Oleg Hahm
000450c894
Merge pull request #2117 from OlegHahm/doxygen_eliminate_warnings
...
Doxygen eliminate warnings pt. 2
2014-12-04 17:18:42 +01:00
Ludwig Ortmann
86189d600e
core: remove remaining dINT occurences
2014-12-04 17:17:24 +01:00
Oleg Hahm
0ccf1043de
doc: fixed broken doxygen references
2014-12-04 17:16:57 +01:00
Oleg Hahm
bca78dedd5
Merge pull request #2108 from LudwigOrtmann/thread_new_irq_api
...
Thread new IRQ api
2014-12-04 16:53:58 +01:00
Oleg Hahm
5adb43cc75
doc: add some references
2014-12-04 16:50:21 +01:00
Oleg Hahm
6310927ed7
doc: document internal cib init macro
2014-12-04 15:11:42 +01:00
Oleg Hahm
e9426ef9ab
core: undefining ENABLE_DEBUG is no longer required
2014-12-03 22:56:15 +01:00
Ludwig Ortmann
0adba81d2e
core/thread: use disableIRQ/restoreIRQ
2014-12-03 20:45:00 +01:00
Ludwig Ortmann
e6c808d5fa
Merge pull request #1970 from Kijewski/optimize-cib
...
core: inline `cib.c`
2014-12-03 17:12:48 +01:00
Martine Lenders
c0b0110de9
core: Fix msg_send_receive
...
Fixes #1935
2014-12-03 15:42:37 +01:00
Oleg Hahm
d92e9af91c
doc: fixed broken param descriptions
2014-11-30 22:34:50 +01:00
Ludwig Ortmann
68e1db938c
core/hwtimer: fix HWTIMER_SPIN_BARRIER doc
2014-11-28 13:53:23 +01:00
René Kijewski
8a9220a85c
core: cib size must not exceed MAXINT/2
2014-11-26 18:04:54 +01:00
Oleg Hahm
d34e14424e
Revert "core: faster bitarithm_msb"
...
This reverts commit ed7e233876
.
2014-11-26 17:20:47 +01:00
Ludwig Ortmann
b4d9c9e6b7
core/msg: coding convention cleanup
2014-11-25 19:38:36 +01:00
Ludwig Ortmann
535839f2d5
core/msg: use disable/restoreIRQ
...
* needed to change internal `msg_send` to allow external disabling of interrupts
2014-11-25 19:38:36 +01:00
Hauke Petersen
2220a9fab0
core/cpu/boards: removed fw_puts from RIOT
2014-11-21 13:09:02 +01:00
Oleg Hahm
459f550be5
Merge pull request #2042 from Kijewski/restrict
...
c++: `s/restrict/__restrict/`
2014-11-19 15:29:23 +01:00
Oleg Hahm
771b3a4506
Merge pull request #1984 from Kijewski/net_help-is-odd
...
core: move NTOHL and friends into byteorder.h
2014-11-19 15:11:43 +01:00
René Kijewski
f89e1f4a3d
c++: s/restrict/__restrict/
...
`restrict` is not a keyword in C++, but `__restrict` is understood by
GCC-ish compilers.
2014-11-19 14:27:19 +01:00
9ce0b676b4
core: sys: move ringbuffer to core
2014-11-19 14:18:39 +01:00
René Kijewski
2c370862b7
core: allow inclusion of byteorder.h in C++ code
2014-11-19 00:47:25 +01:00
René Kijewski
434d6a1f65
core: move NTOHL and friends into byteorder.h
2014-11-19 00:46:41 +01:00
René Kijewski
ff2a1dc61b
core: remove needless test in msg.c
...
`thread.c` initializes a thread with an empty message queue. `cib_put()`
will `return -1` for an empty CIB, so there is no need to test if
`thread->msg_array != NULL`.
2014-11-14 10:54:33 +01:00
René Kijewski
a07b44781d
C++ -_-
2014-11-11 21:07:40 +01:00
Ludwig Ortmann
e4fec18bdc
core/sched: unify DEBUG text syntax, nomenclature
2014-11-11 17:55:09 +01:00
René Kijewski
ab545f83b0
core: inline cib.c
...
The functions in `cib.h` are only used in `msg.c`. They are very small,
and proper function calls have a bigger overhead than inlining these
functions.
The difference in .text size (worst to best):
```
+104 native
+69 qemu-i386
+32 mbed_lpc1768
+28 samr21-xpro
-54 chronos
-54 z1
-56 iot-lab_M3
-56 msb-430
-56 msb-430h
-56 msba2
-56 openmote
-56 spark-core
-56 telosb
-56 wsn430-v1_3b
-56 wsn430-v1_4
-58 arduino-mega2560
-60 airfy-beacon
-60 arduino-due
-60 f4vi1
-60 msbiot
-60 pca10000
-60 pca10005
-60 stm32f0discovery
-60 stm32f3discovery
-60 stm32f4discovery
-60 udoo
-60 yunjia-nrf51822
-72 avsextrem
-72 pttu
-120 redbee-econotag
```
2014-11-11 17:40:18 +01:00
René Kijewski
b579372605
Merge pull request #1962 from Kijewski/sched-fix-debug-1
...
core: sched.c did not compile with DEBUG=1
2014-11-11 17:01:49 +01:00
René Kijewski
23177e5326
Remove special case for atmega in kernel_types.h
2014-11-11 11:42:44 +01:00
Oleg Hahm
a262de0678
core: always set sender_pid in msg_send_int
2014-11-10 09:29:16 +01:00
René Kijewski
12d157247c
core: sched.c did not compile with DEBUG=1
2014-11-07 12:45:12 +01:00
René Kijewski
c3ba66781d
core: put more intelligence into queue_msg()
...
Fixes #1942 .
There were two instances were it was not checked the target thread has a
message queue before queuing the message.
This PR centralizes the check into `queue_msg()`.
2014-11-07 12:32:15 +01:00
Oleg Hahm
8dab420321
Merge pull request #1835 from OlegHahm/msg_receive_yield
...
core: msg_receive should yield
2014-11-06 16:27:32 +01:00
Oleg Hahm
4fd3d62f2a
core: msg_receive should yield
...
If a thread sends blocking, but the target thread is not currently in
receive mode, the sender gets queued. If it has a higher priority it
should run again as soon as the target goes into receiving mode.
2014-11-06 15:35:28 +01:00
feb550f17a
Merge pull request #1885 from OlegHahm/thread_yield_higher_cleanup
...
core: thread_yield_higher cleanup
2014-10-30 23:22:27 +01:00
Oleg Hahm
6b39ce9650
config: moved from core to sys
...
There's no need to run config_load from core directly, can be done by
auto_init.
2014-10-30 22:27:11 +01:00
Oleg Hahm
09f225f6ed
config: use radio_address_t
2014-10-30 22:27:11 +01:00
René Kijewski
9ddbf57709
core: refactor sched_run
...
`sched_run()` was cluttered. Many individual changes were done without a
proper refactoring.
2014-10-30 21:00:09 +01:00
Oleg Hahm
9a61d8cf1c
core: move optional tcb members to DEVELHELP
2014-10-30 16:37:10 +01:00
Oleg Hahm
4885690874
core: update irq_arch documentation
2014-10-30 16:11:11 +01:00
Oleg Hahm
9b1e180cd8
core: eliminate warning
...
This initialized has actually no relevance and is just needed to
suppress a compiler warning.
2014-10-30 16:11:11 +01:00
benpicco
37d8cabbe8
Merge pull request #1883 from kaspar030/hwtimer_new_irq_api
...
core: hwtimer: use disable/restoreIRQ
2014-10-28 15:53:50 +01:00
Oleg Hahm
93ac114bc3
core: move thread_yield*() to thread.[ch]
...
Although it might conceptionally rather belong to the scheduler, the
yield functions are prefixed with thread_ and thus, belong there.
2014-10-28 00:56:37 +01:00
Oleg Hahm
6f53cd484d
core: make sched_runqueue public
...
Reverting b604832
, because thread_yield() needs to access this
information.
2014-10-28 00:56:14 +01:00
cbab2efe7e
core: hwtimer: use disable/restoreIRQ
2014-10-27 17:44:33 +01:00
Ludwig Ortmann
eceb656c49
core,sys: fix storage types for irq API usage
...
* should not have any effect as long as `unsigned` and `int` are compatible
* also fix two cosmetic `unsigned int` -> `unsigned` for consistency
2014-10-27 16:25:23 +01:00
Oleg Hahm
c33e1b5dad
Merge pull request #1844 from OlegHahm/doxygen_cleanup
...
Doxygen cleanup
2014-10-24 16:04:01 +02:00
Oleg Hahm
9b819c4dd6
Merge pull request #1836 from Kijewski/yield-less
...
core: introduce sched_yield(), yield less
2014-10-24 10:05:37 +02:00
René Kijewski
677d690e2b
core: introduce thread_yield_higher(), yield less
...
Fixes #1708 .
Currently involuntary preemption causes the current thread not only to
yield for a higher prioritized thread, but all other threads of its own
priority class, too.
This PR adds the function `thread_yield_higher()`, which will yield the
current thread in favor of higher prioritized functions, but not for
threads of its own priority class.
Boards now need to implement `thread_yield_higher()` instead of
`thread_yield()`, but `COREIF_NG` boards are not affected in any way.
`thread_yield()` retains its old meaning: yield for every thread that
has the same or a higher priority.
This PR does not touch the occurrences of `thread_yield()` in the periph
drivers, because the author of this PR did not look into the logic of
the various driver implementations.
2014-10-24 00:09:56 +02:00
René Kijewski
c0ce346a12
cppcheck: don't needlessly assign sched_active_pid
2014-10-23 20:50:31 +02:00
Oleg Hahm
206b75933e
doc: fixed remaining doxygen warnings in core
...
Only one warning remains and will be fixed in a separate commit.
2014-10-23 18:30:09 +02:00
Oleg Hahm
db8f3d2650
cpu: use typed function pointer for thread_arch_init
2014-10-23 18:26:21 +02:00
Oleg Hahm
18381661dc
doc: fix documentation for hwtimer
...
@verbatim was used incorrectly and a closing html tag was missing
2014-10-23 17:29:25 +02:00
René Kijewski
b604832777
core: make sched_runqueues static
...
PR #1000 overlooked to rename `runqueues` into `sched_runqueues` in
`sched.h`. This shows that the variable is not used outside of
`sched.c`.
As the list should not be accessed outside of the scheduler, so it
can be `static`.
2014-10-22 16:55:50 +02:00
5146c66786
core: adapt to msg_try_send
2014-10-22 12:37:33 +02:00
bdcac07faa
core: msg: introduce msg_try_send
2014-10-22 12:37:33 +02:00
DangNhat Pham-Huu
e6c7414357
Merge pull request #1805 from BytesGalore/extern_C_in_headers_core_unguard_includes
...
core: moved `#include`s outside the `extern "C"` guards
2014-10-22 07:09:57 +07:00
Martine Lenders
a7ed27130d
byteorder: silence warnings in clang
2014-10-21 19:50:37 +02:00
BytesGalore
74161f0f2d
core: moved #include
s outside the extern "C"
guards
2014-10-21 13:46:04 +02:00
René Kijewski
862000b715
core: align stack on a 32bit boundary
...
Fixes #1267 .
2014-10-17 18:22:37 +02:00
Ludwig Ortmann
cd3dff3f2e
core/msg: add DEVELHELP checks for valid pid
2014-10-13 19:44:35 +02:00
Ludwig Ortmann
ab418faa34
core: add doxygen header for kernel_types
2014-10-13 19:44:35 +02:00
Ludwig Ortmann
2fe2a39602
core: refactor check for valid pid
...
move into header and remove redundant condition
2014-10-13 19:44:35 +02:00
Martine Lenders
42f96b0d60
Merge pull request #1699 from Kijewski/issue-1586
...
core: Provide functions for different byte orders
2014-10-10 07:38:57 +02:00
Pham Huu Dang Nhat
2ded32dee7
c++: core: add extern C in header files
2014-10-09 06:18:16 +07:00
Benjamin Valentin
d6ca7c44c2
prevent rounding 0 if HWTIMER_SPEED > 1000000L
...
The current macros in hwtimer.h expect HWTIMER_SPEED to be < 1000000L, otherwise integer arithmetic will round the result down to 0.
Add a case to prevent that.
2014-10-06 22:13:48 +02:00