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

435 Commits

Author SHA1 Message Date
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