1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

410 Commits

Author SHA1 Message Date
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
Ludwig Ortmann
e4fec18bdc core/sched: unify DEBUG text syntax, nomenclature 2014-11-11 17:55:09 +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 #includes 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
Ludwig Ortmann
f677f70836 core/hwtimer: add HWTIMER_WAIT_OVERHEAD 2014-10-01 19:53:43 +02:00