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
Ludwig Ortmann
f677f70836
core/hwtimer: add HWTIMER_WAIT_OVERHEAD
2014-10-01 19:53:43 +02:00
Ludwig Ortmann
0a8be81526
core/hwtimer: clean up header
...
- break/shorten overlong lines
- improve grammar
2014-10-01 19:53:42 +02:00
Ludwig Ortmann
da550bc913
introduce HWTIMER_SPIN_BARRIER (API change)
...
Boards should define HWTIMER_SPIN_BARRIER that is used to decide
whether it makes sense to set a timer and yield or call hwtimer_spin
instead.
Used by `core/hwtimer.c` and `sys/vtimer/vtimer.c`.
A default value is provided and a warning is printed when it is used.
2014-10-01 19:53:42 +02:00
René Kijewski
749db8d0dd
core: Provide functions for different byte orders
...
Rationale: see #1586 .
2014-09-29 21:07:02 +02:00
René Kijewski
4e50d74272
core: Provide ssize_t in a common place
...
Now you can include `kernel_types.h` if you need the `ssize_t`, without
facing problems due to the terrible MSP toolchain.
2014-09-26 14:04:30 +02:00
René Kijewski
1df0b5644a
core: sched_switch only switch for higher priority
...
sched_switch() is called by some library functions when a call unblocks
another thread. Then it needs to be tested if the current thread should
be preempted for the newly runnable thread.
A non-volutarily yield should only happen if the unblocked thread has a
_higher_ priority than the current thread. The current implementation,
which tests if the other thread has the same or a higher priority, does
not fit the documentation.
2014-09-25 10:16:33 +02:00
Ludwig Ortmann
289c4c0ee4
doc: add license headers to some .h files
2014-09-18 17:45:11 +02:00
Martine Lenders
1cc82b6aa7
core: priority_queue: simplify inheritance
2014-09-05 18:17:12 +02:00
Kévin Roussel
d1cf9c4bfd
Ensure hwtimer_spin() won't wait for an unreachable stop counter value
...
without using a costly MOD operation
2014-08-28 15:01:58 +02:00
Ludwig Ortmann
b7992922ce
fix license headers in non-.c files
2014-08-23 16:16:26 +02:00
003dd1969c
Merge pull request #1566 from Kijewski/undef_is_null
...
core: let PIDs begin with 1
2014-08-22 00:43:04 +02:00
René Kijewski
a5c9d4572d
core: clist without explicit thread
...
Right now the core component `clist` is a generic cyclic doubly-linked list.
In the core it is used in `tcb_t::rq_entry`.
Further it is used `net_if.c`.
This commit removes the member `clist_node_t::data` which stored the
pointer to the `tcb_t` instance of which the clist is already a member.
The needless member added `sizeof (int)` bytes to every instance of
`tcb_t`.
In `net_if.c` the clist was used in a type-punned way, so that the
change won't affect it.
2014-08-21 21:10:04 +02:00
René Kijewski
27e393621a
core: clist is a cyclic list
2014-08-21 21:10:03 +02:00
8538670e12
Merge pull request #1583 from Kijewski/issue-1399
...
core: SCHED_PRIO_LEVELS==16 for every board
2014-08-21 20:04:57 +02:00
René Kijewski
b4f105f178
core: SCHED_PRIO_LEVELS==16 for every board
...
Closes #1399 .
> Using a different value for SCHED_PRIO_LEVELS for 16 and 32 bit
platforms hurts portability, one thing that we heavily advertise about
RIOT. if you want to write a portable application, then you have to
assume the lower value.
This PR defaults `SCHED_PRIO_LEVELS` to 16 for every board.
2014-08-18 10:43:41 +02:00
René Kijewski
2cb4166c3e
all over the place: use sched_active_pid
...
In many places we needlessly use `sched_active_thread->pid` whilst we
already have `sched_active_pid` with the same value, and one less
indirection.
`thread_getpid()` is made `static inline` so that there is no penalty in
using this function over accessing `sched_active_pid` directly.
2014-08-17 21:04:25 +02:00
René Kijewski
427a5fbaef
core: let valid PIDs start with 1
2014-08-17 19:51:03 +02:00
René Kijewski
b31e5a8675
core: introduce KERNEL_PID_FIRST and KERNEL_PID_LAST
2014-08-17 19:50:34 +02:00
René Kijewski
a7e5157fd9
core: add thread_get()
...
Remove PID check duplication in `thread_getstatus()` and
`thread_getname()`.
2014-08-15 01:16:13 +02:00
René Kijewski
bf6548ca30
core: shadowing in priority_queue_print
...
The variable `node` shadows the parameter `node`. The access of
`node->first` would not compile, because there is no member `first` in
`priority_queue_t`.
2014-08-11 18:42:25 +02:00
Oleg Hahm
c2b0423918
core: renamed KERNEL_PID_NULL to KERNEL_PID_UNDEF
...
As @authmillenon pointed out the "null" in the old name is somewhat
misleading, since the actual value is -1.
2014-08-07 16:31:27 +02:00
Oleg Hahm
0836cd0b18
core: moved definition of KERNEL_PID_NULL
...
kernel_pid_t is defined in kernel_types.h, thus it makes sense to move
the macro for an invalid kernel pid there, too.
2014-08-07 16:31:27 +02:00
René Kijewski
a5fe9078c8
Merge pull request #1293 from Kijewski/issue-1287
...
core: only store the stack size for DEVELHELP (implementation)
2014-08-05 18:56:29 +02:00
Ludwig Ortmann
1efdf99dfe
core/priority_queue: add dynamic initializers
...
- priority_queue_init
- priority_queue_node_init
2014-08-05 17:57:45 +02:00
Ludwig Ortmann
c2b2e4554b
core/queue: queue -> priority_queue
...
Rename queue to priority queue, because that's what it is.
2014-08-05 17:57:45 +02:00
Ludwig Ortmann
2e190d21ed
doc: fix spelling in core/include
2014-08-05 17:08:53 +02:00
René Kijewski
f7bdc7e4fe
core: thread_measure_stack_free() is only useful for DEVELHELP
2014-08-02 00:35:41 +02:00
René Kijewski
9e3830a72b
core: only store the stack size for DEVELHELP
...
`tcp_t::stack_size` is only examined by the shell command `ps` and
`DEBUG_PRINT`. For the latter one only if `DEVELHELP` was enabled.
This PR guards the member `tcp_t::stack_size` in `#ifdef DEVELHELP`.
Only if DEVELHELP was activated its value get printed by `ps`.
Closes #1287 .
2014-08-02 00:35:41 +02:00
Ludwig Ortmann
c216d2870f
doc: add detailed scheduler documentation
2014-08-01 18:57:31 +02:00
Oleg Hahm
983d056c75
core: harmonizes the data type for the process ID
...
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
2014-08-01 12:02:54 +02:00
Ludwig Ortmann
3ca4f18479
doc: use lgplv2.1-short license header instead of lgpl-short-riot
2014-07-31 22:57:20 +02:00
Cenk Gündoğan
5e8c0c9058
converting tabs to spaces in core ( #1439 )
...
This PR converts tabs to white spaces.
The statement I used for the conversion:
'''find . -name "*.[ch]" -exec zsh -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;'''
Afterwards, I had a quick overview of the converted files to prevent odd indentation.
2014-07-31 20:44:09 +02:00
René Kijewski
4032a22719
queue: add queue_t root type
2014-07-30 21:10:22 +02:00
René Kijewski
4c6a6ee4b3
queue: remove unused generic functions
...
Closes #1153 .
2014-07-30 21:08:15 +02:00
René Kijewski
7035ae0051
queue: remove inttypes clutter from core header
2014-07-30 21:08:15 +02:00
René Kijewski
dacbc0043e
core:queue: remove ancient example
2014-07-30 21:08:15 +02:00
Ludwig Ortmann
b3b6cff587
doc: some more author fixes
...
fix all occurences of INRIA as an author
correct Oliver Hahms authorship and indentation
2014-07-29 18:17:48 +02:00
Ludwig Ortmann
b6846e31fc
doc: fix most occurences of FU as an author
...
.. but only if there are other authors as well
2014-07-29 17:23:11 +02:00
Ludwig Ortmann
ce4aaa6970
doc: little mutex.h fixes
...
- a university is not an author
- move internal tags to the right place
2014-07-29 14:37:41 +02:00
René Kijewski
6fae042a60
core: remove unneeded calls to mutex_init()
2014-07-29 09:33:24 +02:00
René Kijewski
e03e20b7f6
core: simplify mutex initializer
2014-07-29 09:33:23 +02:00
René Kijewski
e5d6142823
core: simplify mutex signatures
2014-07-29 09:32:16 +02:00
Ludwig Ortmann
a585eaf752
core/sched: remove MODULE_NSS helpers (API CHANGE)
...
remove thread_getlastpid and last_pid from the API, it is unused
2014-07-12 07:30:31 +02:00
Ludwig Ortmann
147c285365
core/sched: fix pid/tcb & refactor SCHEDSTATISTICS
...
pid and tcb_t were compared instead of pid and pid
SCHEDSTATISTICS:
- reduce hwtimer_now calls
- dont use thread_last_pid anymore
- increase readability
2014-07-12 07:29:52 +02:00
Ludwig Ortmann
9cabdb3043
core/sched: clean up
...
- remove stray spaces
- remove TODOs:
- MODULE_HWTIMER is not a module anymore
- checking for NULL is necessary, at least without API changes:
`sched_task_exit` sets `sched_active_thread` to `NULL`, then exits,
afterwards `cpu_switch_context_exit` calls `sched_run`
2014-07-12 06:51:51 +02:00
René Kijewski
919cddef19
make: rename VERSION into RIOT_VERSION
...
Building MSP boards gives an error, because `VERSION` is somewhere
defined in their toolchain as an integer.
This PR renames `VERSION` into `RIOT_VERSION`, because that's what it
is.
2014-07-10 21:48:22 +02:00
Oleg Hahm
b78a1b32d0
Merge pull request #1387 from LudwigOrtmann/msg_fixup
...
core/msg: clean up after #1285
2014-07-10 16:54:01 +02:00
Hauke Petersen
9001e0c2fb
core: removed duplicated hwtimer_arch.h
2014-07-09 21:08:13 +02:00
Ludwig Ortmann
5ebdf6e745
core/thread: remove thread_create_arg from header
...
It's just a leftover from #856
2014-07-09 18:01:31 +02:00
René Kijewski
ba1a15535b
core: remove extra thread_create_arg() function
2014-07-09 10:28:23 +02:00
René Kijewski
867246a09f
Add argument to thread_create
2014-07-09 10:07:54 +02:00
Ludwig Ortmann
2a859c78cd
SQUASHME: do it right
2014-07-08 18:00:54 +02:00
Ludwig Ortmann
d8a5ee1ec8
core/msg: set m->sender_pid before it is used
...
fixes `msg_send_to_self` condition
2014-07-08 17:49:16 +02:00
Ludwig Ortmann
b6f2426d16
core/msg: revert part of #1285
...
use m->sender_pid instead of sched_active_pid again
undoes the optimization intended by #1285
fixes uint/int warning
2014-07-08 17:26:25 +02:00
Ludwig Ortmann
5c9a975afb
core/msg: fix, optimize and improve
...
fixes:
fix race conditions by reordering dINTs
prevent null pointer dereference by adding forgotten target check
add forgotten eINTs
replace printf with DEBUG
fix debug messages
optimizations:
optimize pid access
reorder msg_send switches
improvements:
add debug statements
add missing return value to msg_send_to_self documentation
2014-07-08 11:57:38 +02:00
Martine Lenders
6d1365c5d8
Merge pull request #1324 from Kijewski/make-automatic-module-name
...
make: much less clutter for "standard layout" modules
2014-06-18 23:52:49 +02:00
Ludwig Ortmann
564f980cf4
Merge pull request #1306 from Kijewski/issue-19
...
core: remove unnecessary tests in sched.c
2014-06-18 13:09:44 +02:00
Thomas Eichinger
8637fe107e
Merge pull request #975 from Kijewski/issue-974
...
core: change in bitarithm implementation
2014-06-18 11:11:57 +02:00
René Kijewski
840c0f0a57
make: detect their module name automatically
...
For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.
This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.
2014-06-17 15:49:32 +02:00
René Kijewski
3c5f8b0f9e
Merge pull request #1308 from N8Fear/fix-typo-and-whitespaces
...
core/include/arch/irq_arch.h: fix typo and trailing whitespaces
2014-06-10 18:14:05 +02:00
Hinnerk van Bruinehsen
6da0c31265
core/include/arch/irq_arch.h: fix typo and trailing whitespaces
2014-06-10 18:07:41 +02:00
René Kijewski
a21c3f45bc
core: remove unnecessary tests in sched.c
...
The scheduling gets activated by `kernel_init()` calling
`cpu_switch_context_exit()`. Before this `sched_run()` won't be called.
When it gets called, at least the main thread and the idle thread are
spawned. The idle thread won't die / get killed. So there always is at
least one thread in `runqueue_bitcache`.
Closes #19 .
2014-06-10 17:04:39 +02:00
René Kijewski
b6dc5c9b76
core/cortex-m: add missing NORETURNs to thread_arch
2014-06-05 21:01:35 +02:00
René Kijewski
ed7e233876
core: faster bitarithm_msb
2014-06-05 20:19:10 +02:00
Oleg Hahm
c679a051d9
core: fix variable name for sched_pidlist
2014-06-04 02:13:06 +02:00
René Kijewski
aab2311205
Merge pull request #1248 from thomaseichinger/debug_h_doc_fix
...
core:debug: documentation for `DEBUG_PRINT` was confusing and wrong
2014-06-03 22:42:39 +02:00
René Kijewski
05a4bf7f04
Merge pull request #1057 from Kijewski/sched_switch-current_prio
...
core: imply current_prio in `sched_switch()`
2014-06-03 15:59:23 +02:00
Thomas Eichinger
cf93dc6590
core:debug: documentation for DEBUG_PRINT
was confusing and wrong
2014-05-27 16:29:35 +02:00
Martin Lenders
2362623490
Fix trailing whitespaces
...
Fixes #1138
2014-05-26 14:54:23 +02:00
René Kijewski
a6fd5bff92
core: imply current_prio in sched_switch()
...
There is no need to supply the current priority to `sched_switch()`,
when this function can easily tell the value of
`active_thread->priority` itself.
2014-05-24 16:48:35 +02:00
René Kijewski
1b89f334e3
msp430: provide oneway-malloc implicitly
...
For MSP430 boards oneway-malloc is already used *if* `malloc.h` was
included. The problem is that `malloc.h` is not a standard header, even
though it is common. `stdlib.h` in the right place to look for
`malloc()` and friends.
This change removes this discrepancy. `malloc()` is just named like
that, without the leading underscore. The symbols now are weak, which
means that they won't override library functions if MSP's standard
library will provide these functions at some point. (Unlikely, since
using `malloc()` on tiny systems is less then optimal ...)
Closes #1061 and #863 .
2014-05-22 15:40:25 +02:00
Thomas Eichinger
5808662d05
Merge pull request #1193 from LudwigOrtmann/issue-924
...
core/hwtimer: disable interrupts in hwtimer_remove
2014-05-20 14:51:08 +02:00
Christian Mehlis
67428b5814
core: kernel: improved doxygen documentation
...
also added param[in] to irq.h and fix order of doxygen endguards
2014-05-20 14:47:41 +02:00
Oleg Hahm
ef5ec344fd
core: prefix API functions correctly
...
Also changed names for bitarithm functions and rename thread_pid to sched_active_pid.
2014-05-18 08:53:20 +02:00
Ludwig Ortmann
9d4a92003c
core/hwtimer: disable interrupts in hwtimer_remove
...
Before only the hardware timer's own interrupt was being disabled.
This led to a race condition in the following scenario:
```
Thread1:
hwtimer_remove()
hwtimer_arch_disable_interrupt();
// INTERRUPT -> Thread2 (which has a higher priority than Thread1) gets scheduled
Thread2:
...
hwtimer_remove()
hwtimer_arch_disable_interrupt(); // hwtimer interrupt is already disabled
...
hwtimer_arch_enable_interrupt();
...
// yield | terminate -> Thread1 gets scheduled again
Thread1:
... // these instructions are being run with the hwtimer interrupt enabled
hwtimer_arch_enable_interrupt(); // hwtimer interrupt is already enabled
```
Fixes #924
2014-05-16 15:48:48 +02:00
Oleg Hahm
5d7f7dd686
Merge pull request #1079 from BytesGalore/add_NORETURNs
...
core: and cpu: Added NORETURN to functions that should not return
2014-05-16 00:33:20 +02:00
Ludwig Ortmann
98bbb80571
documentation: append my email to my name everywhere
2014-05-15 18:07:17 +02:00
Ludwig Ortmann
a0e9f3680b
core/doc: complete io.h
2014-05-15 13:48:56 +02:00
Ludwig Ortmann
c42a56181b
core/doc: complete queue.h
2014-05-15 13:48:56 +02:00
Ludwig Ortmann
93647306d7
core/doc: complete hwtimer.h and hwtimer_arch.h
2014-05-15 13:48:55 +02:00
Hauke Petersen
7df411e7b7
core: improved doxygen documentation
...
improved files complient to issue #950
- thread.h
- flags.h
- debug.h
- crash.h
2014-05-15 10:52:34 +02:00
René Kijewski
8038e96d09
Merge pull request #1119 from Kijewski/error_old-style-definition
...
Exterminate old-style function definitions
2014-05-14 13:31:30 +02:00
Ludwig Ortmann
2314915ff2
license: fix license header grammar
...
insert missing "is"
2014-05-14 09:49:09 +02:00
Martin Lenders
71a632520b
Fix documentation for mutex.h
2014-05-13 08:33:38 +02:00
Martin Lenders
24db4eee8c
Fix documentation for msg.h
2014-05-13 08:33:38 +02:00
Martin Lenders
c35a7555a3
Fix documentation for lpm.h
2014-05-13 08:33:36 +02:00
Martin Lenders
8048a57e53
Fix documentation for lifo.h
2014-05-13 08:31:05 +02:00
René Kijewski
9a9caf2c68
Exterminate old-style function definitions
2014-05-12 21:57:09 +02:00
Hauke Petersen
608afc4777
Introduced a cleaned-up cpu/core interface
...
- Included a collection of cpu-dependent headers in core/include/arch
- Extracted all interfaces that need to be implemented for a cpu
- Created a mapping between those interfaces and the old ones
- added flag for disabling arch interface
- added missing state to lpm_arch interface
- added arch interface for reboot
- fixed newline issues that were pointed out
- documentation fixes to cpu-core interface
2014-05-09 16:01:13 +02:00
Martin
4e73169b38
added NORETURNs to functions that should not return
...
and added `UNREACHABLE();` to hint the compiler unreachable lines
added right signature for first parameter of `thread_stack_init()`
added `UNREACHABLE();` macro to `cpu/lpc1768/atom.c` and `cpu/msp430-common/cpu.c`
2014-05-08 06:25:25 +02:00
René Kijewski
6f3d0871aa
core/cpu: put __builtin_unreachable() into one place
2014-05-07 19:24:55 +02:00
Hauke Petersen
7545eff784
core/cpu/board: moved F_CPU define to board
2014-05-06 10:36:09 +02:00
Oleg Hahm
13c615ac17
documentation: fixed doxygen for schedstats
2014-05-05 14:09:08 +02:00
Oleg Hahm
6e27e1cdbb
bitarithm: remove unused macros
2014-05-05 14:09:08 +02:00
Oleg Hahm
81fe4b6afc
documentation: extend description for CONST attribute
2014-05-05 14:09:08 +02:00
Oleg Hahm
5a63f3ab1c
core: documentation: fixed typo in license header
2014-05-05 14:09:08 +02:00
Oleg Hahm
50c9d2da90
core: documentation: replaced task w/ thread
2014-05-05 14:09:08 +02:00
Oleg Hahm
2d338feac4
core: documentation: fixed bitarithm documentation
2014-05-05 14:09:08 +02:00
Oleg Hahm
25a2122f83
core: documentation: updated, improved, and completed doxygen comments
2014-05-05 14:09:01 +02:00
Oleg Hahm
d8c8583d9b
Merge pull request #1058 from Kijewski/issue-726
...
core: Remove `STATUS_TIMER_WAITING`
2014-04-30 19:03:09 +02:00
René Kijewski
055053a4d7
core: Remove STATUS_TIMER_WAITING
...
Closes #726 .
The thread state `STATUS_TIMER_WAITING` is not used anymore.
This PR removes the value.
The number in `STATUS_ON_RUNQUEUE` is replaced by a reference.
2014-04-30 18:30:22 +02:00
Kévin Roussel
f763cb9ec2
Make implementation of hwtimer_spin() easier to read and understand
2014-04-28 13:39:30 +02:00
Christian Mehlis
67d7d1fa96
core: improved doxygen documentation
2014-04-26 14:01:52 +02:00
Christian Mehlis
7b91ea9349
core: fix warning about discarding volatile
2014-04-18 12:11:05 +02:00
Thomas Eichinger
082a583ec6
Merge pull request #955 from thomaseichinger/fix_doc
...
core: documentation: fix doxygen documentation in cib.h clist.h config.h tcb.h
2014-04-17 11:51:48 +02:00
Thomas Eichinger
d566ae9a28
fix doxygen documentation for clist.h, config.h, tcb.h and cib.h
2014-04-17 11:50:52 +02:00
Kévin Roussel
24f5cfafbb
Add the ability to send a message to the current thread's message queue
...
(without raising an error)
2014-04-11 10:43:11 +02:00
Martin Lenders
8d1537a99c
Remove duplicate function definition in queue.h
2014-04-01 19:44:45 +02:00
Hauke Petersen
8a937e1a1c
hwtimer: clean up of interfaces to board/cpu
2014-03-26 13:19:18 +01:00
Oleg Hahm
85bd8cae17
check for existence of active_thread
2014-03-19 16:27:54 +01:00
Oleg Hahm
20b5230466
additional debug macro
2014-03-19 16:27:49 +01:00
Oleg Hahm
2ef9b78ccf
add stacksize checker for DEBUG macro
2014-03-19 16:26:52 +01:00
Oleg Hahm
58aa0da315
added missing ENABLE_DEBUG define in mutex.c
2014-03-19 16:19:08 +01:00
René Kijewski
e6d8c6bb99
Merge pull request #859 from Kijewski/mutex-trylock-error
...
core:mutex: allow idle thread to use mutexes
2014-03-19 15:18:15 +01:00
Ludwig Ortmann
e688efdfcf
core: kernel_init: call config_load in kernel_init
2014-03-18 08:10:33 +01:00
Ludwig Ortmann
063a15ce9b
Change reboot signature.
...
Change from `void reboot(void)` to `int reboot(int mode)`.
Move reboot definition to core, rename architecture implementations
from reboot to reboot_arch.
Declare reboot mode(s) in kernel.h, reboot_arch in kernel_internal.h
Currently only one reboot mode is handled, its use is enforced.
Rationale:
A reboot function is already defined in <unistd.h> on BSD systems.
(See: http://www.openbsd.org/cgi-bin/man.cgi?query=reboot&sektion=2 )
This patch not only allows native to build sensibly on these systems
but also streamlines RIOTs compatability with existing software.
2014-03-10 11:14:27 +01:00
René Kijewski
83988b2d03
Merge pull request #725 from kaspar030/optimize_thread_status_usage
...
core: sched: thread: optimize thread status field usage
2014-03-05 17:30:31 +01:00
René Kijewski
114eedd764
core:mutex: allow idle thread to use mutexes
2014-03-05 16:46:42 +01:00
René Kijewski
3c65b38881
core:mutex: remove refactor remnant
2014-03-05 01:49:31 +01:00
René Kijewski
80263b2fc0
Merge pull request #728 from BytesGalore/add_unlock_mutex_and_sleep
...
core:mutex: enable atomic execution of unlock a mutex and sleep for a thread
2014-03-04 01:38:50 +01:00
Martin
35106e3391
add test for mutex_unlock_and_sleep()
2014-03-03 18:48:46 +01:00
Martin
05f085d51a
add mutex_unlock_and_sleep()
2014-03-03 18:48:35 +01:00
402fae5bbe
Merge pull request #698 from Kijewski/thread_wakeup-dint
...
Changes to `thread_wakeup`
2014-03-03 18:17:18 +01:00
Ludwig Ortmann
470bd7f17f
Fixup for #685
...
- use DEVELHELP for native as well
- fix function name in documentation
- improve documentation language/spelling
2014-02-26 21:49:54 +01:00
Oleg Hahm
0c14597ec2
Merge pull request #685 from rousselk/panic
...
Panic
2014-02-26 16:26:27 +01:00
René Kijewski
791f1cb90f
Changes to thread_wakeup
...
`thread_wakeup` did not check if target pid is invalid.
`thread_wakeup` used `dINT` and `eINT` directly.
It should use `disableIRQ` and `restoreIRQ` instead, because there might
be other (good) reasons why one might want to call `thread_wakeup` with
interrupts disabled.
`thread_wakeup` yielded even if the other thread had a lower priority
than the current thread.
2014-02-26 14:55:50 +01:00
cc0de63289
Merge pull request #713 from OlegHahm/sched_switch_simplification
...
core: move inISR check into sched_switch
2014-02-25 19:13:41 +01:00
Kévin Roussel
d007207f3e
Add a mechanism for handling fatal errors (and reboots)
2014-02-25 10:49:57 +01:00
Oleg Hahm
32f918abe8
simplified sched_switch
...
sched_switch can check ISR itself.
2014-02-25 09:47:58 +01:00
Oleg Hahm
24f5ec929c
removed duplicate inISR prototype
2014-02-24 18:42:13 +01:00
Oleg Hahm
93e32953b3
always build and initialize hwtimer
...
Eliminates special treatment of the hwtimer module and makes it a
mandatory part of the kernel.
2014-02-24 18:36:28 +01:00
Christian Mehlis
6501707bcb
core: lifo: added the right author
2014-02-23 15:09:43 +01:00
Christian Mehlis
0309fecc19
fix warning: invalid suffix on literal
...
C++11 requires a space between
literal and identifier [-Wliteral-suffix]
2014-02-18 17:05:01 +01:00
Oleg Hahm
7235f9e92c
Merge pull request #729 from BytesGalore/remove_unnecessary_includes
...
core:mutex removed unnecessary includes
2014-02-18 13:52:21 +01:00
Martin
ff36df6847
migrated tcb.h include to .c file
2014-02-18 12:50:30 +01:00
Martin
88c7c47c46
removed unnecessary includes
2014-02-18 10:54:34 +01:00
36981c95b9
core: sched: thread: optimize thread status field usage
...
see PR #716 for discussion
2014-02-17 12:28:54 +01:00
Kévin Roussel
dc6f920f33
Merge remote-tracking branch 'origin/reboot' into reboot
2014-02-17 12:00:19 +01:00
Christian Mehlis
3dce0cbb97
Merge pull request #662 from Kijewski/remove-sched_init
...
Do not zero out sched_threads needlessly
2014-02-16 11:37:05 +01:00
Kévin Roussel
ca6db02530
Function attributes are now defined elsewhere ("attributes.h")
2014-02-14 10:58:17 +01:00
622d473eb3
core: msg: yield after queueing of a message if REPLY_BLOCKED
...
When setting the running task reply_blocked, it is implicitly removed
from the runqueue. But if queueing of a msg is actually successful, the
thread exits msg_send without yielding, continuing to run even if it's
not supposed to.
Nice example of why multiple function exit points lead to weird
errors...
2014-02-13 11:33:18 +01:00
8d07b131db
core: msg: add some debug statements
2014-02-12 19:16:42 +01:00
210a20b807
core: msg: don't wake up sender after receive if it's REPLY_BLOCKED
...
solves issue #100
If the sender is reply-blocked, waking it up after its message has been
delivered is wrong. It needs to stay reply-blocked until the reply has
been delivered.
2014-02-12 19:16:41 +01:00
Kévin Roussel
e7d19fd2be
Add a reboot() function to kernel.h definitions.
2014-02-12 15:26:02 +01:00
Kévin Roussel
8ca607bd70
Portable definition of function attributes
2014-02-12 14:58:59 +01:00
Ludwig Ortmann
2525920426
remove trailing whitespace and newlines
2014-02-11 18:45:06 +01:00
René Kijewski
7e685d6b36
Do not zero out sched_threads needlessly
...
The function sched_init() zeroes out sched_threads needlessly. All
static variables can be assumed to be initialized with zero, anyways.
The C standard mandates it, and all at other places in the code it is
assumed.
2014-02-11 16:47:00 +01:00
Benjamin Valentin
bbe616f167
add name to sysconfig
...
there is still quite some space left on the persistent flash config area, make it possible to give nodes a name (e.g. hostname of the meshrouter) for nicer debugging
2014-02-06 18:13:48 +01:00
Christian Mehlis
8519dcceed
added @author fields
...
authors found in:
https://github.com/RIOT-OS/RIOT/commits/master/core/cib.c
http://ukleos.org/projects/ukleos/repository/revisions/master/changes/core/cib.c
2014-02-02 22:48:51 +01:00
56ee585c81
update Kaspar's email address
...
kaspar.schleiser@fu-berlin.de is obsolete.
(2nd try, first try was overwritten by some overzealous documenter)
2014-01-28 11:53:19 +01:00
Oleg Hahm
d5fd29a658
created doxygen link to STATUS_STOPPED
2014-01-22 19:20:13 +01:00
Oleg Hahm
2cc01bab3f
added documentation for scheduler statuses
2014-01-22 19:20:07 +01:00
Ludwig Ortmann
bcbe6bf5c8
thread_measure_stack_ usage -> free
...
Rename the function as its name suggests the opposite of what it does.
2014-01-20 10:46:20 +01:00
Ludwig Ortmann
81608bdab5
thread_measure_stack_usage documentation
...
fix documentation - the return value is the opposite of what it said
add and improve comments
renamed space to space_free (the name is documentation as well)
2014-01-20 10:42:59 +01:00
Ludwig Ortmann
c42aa8993f
fix regression from #251
...
remove thread_measure_stack_usage from kernel_internal.h again
2014-01-20 10:34:06 +01:00
Oleg Hahm
9eebc532ef
Merge pull request #459 from rousselk/msp430-lpm-freq
...
Msp430 lpm freq
2014-01-16 04:57:27 -08:00
Kévin Roussel
e6d4a0b73a
Added the LPM_UNKNOWN constant to the enum 'lpm_mode'
...
for respresenting unknown/unavailable LPM-related status.
2014-01-08 09:56:51 +01:00
Oleg Hahm
c7d985d371
removed redundant include pathes from Makefiles
2014-01-05 16:11:08 +01:00
Oleg Hahm
593ee623b6
simplify and unify include pathes
...
additional:
* exporting include path in sys is mandatory for subfolders
* removed duplicate object file in linker call
2014-01-05 16:11:07 +01:00
Ludwig Ortmann
2fb884a5af
refine DEVELHELP section
...
more efficient to be better suited for ISR
made testcase more clear
2013-12-20 11:51:52 +01:00
Ludwig Ortmann
13bb8df91b
fix typo, improve doc
2013-12-20 00:27:46 +01:00
Ludwig Ortmann
6eb829c680
documentation, remove LIFO_DEBUG, break main
...
add documentation to lifo.h
remove LIFO_DEBUG and use DEVELHELP instead
make the main method which is included break
2013-12-20 00:00:29 +01:00
Ludwig Ortmann
eac60d666f
make reset of freed slots optional
...
addresses https://github.com/RIOT-OS/RIOT/pull/433#discussion_r8472602
2013-12-19 18:53:06 +01:00
Ludwig Ortmann
1a99a44e01
macro consistency and more DEBUG
...
addresses https://github.com/RIOT-OS/RIOT/pull/433#discussion_r8437084
add missing debug statement
2013-12-19 18:53:06 +01:00
Ludwig Ortmann
6021b9f36a
reset unused lifo slots
2013-12-19 18:53:06 +01:00
Ludwig Ortmann
1dac115c68
add debug statements to lifo
2013-12-19 18:53:04 +01:00
Oleg Hahm
903ec54a43
making include directives consistent
2013-12-19 15:31:37 +01:00
Ludwig Ortmann
8dd9db3c45
add some documentation to lpm.h
2013-12-19 13:04:08 +01:00
Oleg Hahm
9eb1daf31e
added thread.h include (necessary since 227c847135
)
2013-12-19 12:16:35 +01:00
Oleg Hahm
227c847135
put prototype for thread_yield() in core/include
2013-12-18 17:47:49 +01:00
Oleg Hahm
891eebd361
Merge pull request #427 from mehlis/hwtimer-debug
...
added some debug output
2013-12-16 08:31:03 -08:00
Hauke Petersen
2df82017a8
Fixed doxygen inconsistensies in sys
2013-12-16 15:09:18 +01:00
Hauke Petersen
edcabf7cb6
Fixed a lot of comments by removing tabs and correcting format.
2013-12-16 14:00:33 +01:00
Hauke Petersen
3785fe956b
Fixed doxygen comments, focused on file headers and group definitions
2013-12-16 14:00:24 +01:00
Christian Mehlis
2527d3d636
added some debug output
2013-12-16 11:13:43 +01:00
Oleg Hahm
07da7b2d45
reverted 18e97f6dd5
2013-12-09 22:44:53 +01:00
aaf325c290
Merge pull request #400 from kaspar030/msg_cleanup
...
msg.c cleanup
2013-12-05 04:16:00 -08:00
23ecbde1a3
core: msg: whitespace fixes
2013-12-04 20:36:21 +01:00
94283789a7
core: msg: rename "n" to something more expressive ("queue_index")
2013-12-04 20:33:53 +01:00
af542058ee
core: msg: whitespace fixes
2013-12-04 20:33:53 +01:00
f85adf608f
change my email address
...
kaspar.schleiser@fu-berlin.de will be obsoleted soon. Replace it with
kaspar@schleiser.de , which will (hopefully) stay.
2013-12-04 15:09:56 +01:00
Thomas Eichinger
dfdfb448f4
enforce KERNEL_CONF_STACKSIZE_PRINTF in kernel.h
2013-12-03 22:19:09 +01:00
Christian Mehlis
863c0a7e14
Merge pull request #378 from OlegHahm/version_string
...
include version string
2013-12-03 02:54:02 -08:00
Christian Mehlis
05c05661e6
Merge pull request #337 from LudwigOrtmann/hwtimer_cleanup
...
hwtimer.h remove cruft, document, rearrange
2013-12-03 02:12:13 -08:00
Oleg Hahm
529f3fb278
include version string
2013-11-25 17:35:26 +01:00
Ludwig Ortmann
d6c213fb47
fix grammar in license header
2013-11-23 13:11:56 +01:00
Ludwig Ortmann
ed0d108da6
hwtimer.h remove cruft, document, rearrange
...
remove unsused hwtimer_t0* declarations
document hwtimer_now
move hwtimer_now outside the internal section
2013-11-23 11:25:42 +01:00
Oleg Hahm
7c979751e5
Merge pull request #368 from mehlis/findings
...
(non critical) findings
2013-11-22 18:52:13 -08:00
Christian Mehlis
a83a6f2b49
fix some defines in tcb.h
2013-11-21 21:38:02 +01:00
Christian Mehlis
f5d412bf9f
removed unnecessary stdlib.h include
2013-11-21 00:26:13 +01:00
Ludwig Ortmann
d06e0d8717
rename runtime to reflect the unit of measurement
2013-11-18 12:14:43 +01:00
Ludwig Ortmann
ffd8088d1d
proper inttype runtime, declare to import
...
define runtime long as hwtimer_now() uses long
import hwtimer.h instead of declaring hwtimer_now()
2013-11-16 19:26:02 +01:00
Ludwig Ortmann
05431e9e86
improve comments, rename variable
2013-11-14 12:06:53 +01:00
Ludwig Ortmann
2d419e6648
save one long
2013-11-14 12:06:52 +01:00
Ludwig Ortmann
e8a03a8287
improve fix and comment
2013-11-14 12:06:52 +01:00
Ludwig Ortmann
1ef31b3813
fix race condition in hwtimer_spin
2013-11-14 12:06:52 +01:00
Oleg Hahm
cc45909ffc
Merge pull request #236 from OlegHahm/telosb
...
Telosb
2013-11-14 01:55:47 -08:00
Oleg Hahm
5fea3af233
Merge pull request #294 from authmillenon/rewrite_bitarithm
...
Use GCC/Clang builtins for bit arithmetics
2013-11-04 12:08:02 -08:00
Oleg Hahm
e44412d0c1
added debug information to msg_send (similar to msg_send_int)
2013-11-03 06:46:13 -08:00
authmillenon
18e97f6dd5
Use GCC/Clang builtins for bit arithmetics
2013-11-03 15:14:28 +01:00
Ludwig Ortmann
4b02701ad0
document msg_init_queue return values
2013-10-28 12:57:10 +01:00
Ludwig Ortmann
37c9b8ebfd
fix spelling in msg.h
2013-10-28 12:57:05 +01:00
Ludwig Ortmann
f1b89df8d8
explain the "brainfuck condition"
2013-10-28 12:57:02 +01:00
Ludwig Ortmann
5e6cc92291
harmonize msg.c DEBUG statements
...
Use same order (function: [thread_name:] message) throughout msg.c.
Begin message with a capital letter.
2013-10-27 08:37:18 +01:00
Ludwig Ortmann
2d1303763e
fix spelling in msg.c
2013-10-27 08:13:27 +01:00
Ludwig Ortmann
089a15c110
merge thread_measure_stack_usage declarations
2013-10-24 16:22:55 +02:00
Christian Mehlis
495246d2d4
add thread_getname function
2013-10-17 15:25:43 +02:00
Christian Mehlis
9c70e4501c
only include debug functions if needed
2013-10-11 14:21:47 +02:00
Kévin Roussel
d2535f3841
Added missing definition of 'PRIu32' in some RIOT include files
...
to avoid a bug in mspgcc's standard library
2013-10-09 15:10:22 +02:00
Christian Mehlis
9ace6b4807
add missing inttypes include for PRI macros
2013-09-26 21:10:57 +02:00
Christian Mehlis
21ffebc197
add check for a not existing thread
2013-09-11 19:58:54 +02:00
Christian Mehlis
6da0375197
fix macros in the hwtimer
2013-08-26 21:36:34 +02:00
Oleg Hahm
3ad55cce8b
changed default stacksize
...
* the default stacksize no longer set for a thread using printf
* the stacksize for the main thread therefore adds the necessary space
2013-08-14 18:04:25 +02:00
Oleg Hahm
4d2de87724
Merge pull request #135 from OlegHahm/sched_fixes
...
Improving sched.h documentation
2013-08-14 06:43:09 -07:00
Oleg Hahm
2981fe0844
Improving sched.h documentation
2013-08-14 14:39:09 +02:00
Oleg Hahm
9fac7c3f5f
Merge pull request #134 from OlegHahm/sched_fixes
...
Scheduler callback
2013-08-14 04:55:27 -07:00
Oleg Hahm
1709fa600c
re-added the scheduler callback (the actual call was missing)
2013-08-14 13:53:49 +02:00
Oleg Hahm
7dbb97e376
added documentation for sched.h
2013-08-14 13:53:43 +02:00
Oleg Hahm
932c626c6b
moved prototype for sched_register_cb() from C file to header
2013-08-14 13:09:43 +02:00
Oleg Hahm
570c0e717d
removed unused (and ambiguous) definitions of active_thread and sched_threads in kernel_init.c
2013-08-14 13:09:43 +02:00
Oleg Hahm
b6fe284331
fix priority comparison in sched_switch
2013-08-12 19:27:04 +02:00
Christian Mehlis
735c41786d
remove unused static function
2013-08-12 11:25:07 +02:00
Christian Mehlis
6428bd5546
use std include style
2013-08-12 11:24:57 +02:00
Christian Mehlis
00d618634c
add missing include for mutex
2013-08-12 11:24:48 +02:00
Christian Mehlis
a1ce242ffe
Merge pull request #113 from mehlis/oneway-calloc
...
add oneway calloc
2013-08-12 00:55:53 -07:00
Martin Lenders
78db093d09
Merge pull request #105 from OlegHahm/hwtimer_wait
...
fix for #25 by using mutexes for hwtimer_wait
2013-08-11 11:55:08 -07:00
Christian Mehlis
764e0027f1
add oneway calloc
2013-08-10 11:21:25 +02:00
Martin
63146190b3
fix changed prototype parameter 1 of thread_stack_init from void* to void(*)(void)
2013-08-09 12:19:03 +02:00
Oleg Hahm
3f95d72828
fix for #25 by using mutexes for hwtimer_wait
2013-08-08 20:11:57 +02:00
Oleg Hahm
88d2357295
fix warnings from #62
2013-08-08 18:34:51 +02:00
LudwigOrtmann
07c7e8ccd3
Merge pull request #90 from OlegHahm/milestone_1_0_fixes
...
Milestone 1 0 fixes
2013-08-08 06:29:22 -07:00
Oleg Hahm
39a4dc684e
fixes for #62 : eliminate unused parameter warnings
...
NOTE: this commit introduces a kernel API change for mutex_unlock
2013-08-04 04:10:33 +02:00
Oleg Hahm
836ae0d291
fix #11 : initialize queue_node_t n.next in msg_send()
2013-08-02 01:31:00 +02:00
Christian Mehlis
62994314aa
in msg_send_receive: return result from msg_send
2013-08-01 22:03:55 +02:00
Oleg Hahm
f7ecc704a4
fixed includes and include pathes
2013-07-29 01:24:02 +02:00
Oleg Hahm
0bd81f14a4
remove header guard from debug.h and repaired debugging on a per file base
2013-07-25 21:56:37 +02:00
Oleg Hahm
ca75d3c36c
fixed some includes
2013-07-24 00:44:28 +02:00
Oleg Hahm
599e266b55
Revert "removed redefined ENABLE_DEBUG"
...
This reverts commit 69c526f44d
.
Instead of removing ENABLE_DEBUG, define it as zero and replacing the
ifdef preprocessor commands by a simple #if
2013-07-24 00:38:43 +02:00
Oleg Hahm
37467de0d2
fixed printf formatter
2013-07-23 13:39:50 +02:00
Christian Mehlis
837bad38eb
rename kernel_intern.h
...
german "intern" to english "internal"
2013-07-16 16:36:37 +02:00
Christian Mehlis
b8176f4488
fixed printf patterns
2013-07-16 15:27:19 +02:00
Christian Mehlis
c5e62e238b
add missing include
2013-07-16 15:27:19 +02:00
Christian Mehlis
69c526f44d
removed redefined ENABLE_DEBUG
2013-07-16 15:27:19 +02:00
Christian Mehlis
190e24116d
use int explicitly
2013-07-09 13:41:08 +02:00
Christian Mehlis
96cbf4019e
make internal function static
2013-07-09 13:40:52 +02:00
Ludwig Ortmann
7dd9ac6be0
Add msg_try_receive
2013-07-05 23:32:07 +02:00
Christian Mehlis
9549c29ccb
fix missing includes
2013-06-30 01:53:53 +02:00
Oliver Hahm
57cc002c67
Merge branch 'wsn430'
...
Conflicts:
core/include/queue.h
core/queue.c
cpu/msp430-common/hwtimer_cpu.c
cpu/msp430x16x/hwtimer_msp430.c
sys/lib/hashtable.c
sys/net/ieee802154/ieee802154_frame.c
sys/shell/commands/sc_cc110x_ng.c
sys/transceiver/transceiver.c
sys/vtimer/vtimer.c
2013-06-25 15:33:40 +02:00
Oliver Hahm
c8bee9e554
fixed coding style (space after most keywords)
2013-06-24 22:37:35 +02:00
Oliver Hahm
5bae4f841d
added one-time-initialization guard to transceiver
2013-06-24 22:12:57 +02:00
Oliver Hahm
f359453083
fixed doxygen value
2013-06-21 22:37:14 +02:00
Oliver Hahm
ffeb6f8523
fixed coding conventions (correctly this time)
2013-06-20 18:18:29 +02:00
Oliver Hahm
0d6d8390c0
* updated copyright and license headers in various files
2013-06-18 17:21:38 +02:00
Oliver Hahm
d640cf4298
fixed missing include
2013-06-14 19:41:48 +02:00
Oliver Hahm
fdd1d21e8d
Merge branch 'master' into wsn430
2013-06-14 19:41:23 +02:00
Christian Mehlis
a57c25499b
remove recursive include
2013-06-13 21:23:14 +02:00
Oliver Hahm
40edc25022
* cast main function in kernel_init to match prototype
2013-06-10 16:23:42 +02:00
Christian Mehlis
8f74612762
main should always return int
...
this fixes some compiler warnings
2013-06-09 18:02:58 +02:00
Christian Mehlis
b41fd19216
prevent double include of debug.h
2013-06-09 18:02:30 +02:00
Christian Mehlis
42063530c0
clarify: while loop without body is correct here
2013-06-09 17:52:02 +02:00
Milan Babel
df13d9e0fc
Merge branch 'master' of github.com:overflowed/RIOT
...
Conflicts:
drivers/cc110x_ng/Makefile
2013-06-06 08:41:30 +02:00
Milan Babel
edb34b73c0
fixes for the wsn430
...
fixed vtimer for the msp430
added spi module for the wsn430 v1.3b
changed some variables to uintXX_t, fixes overflow on msp430
2013-06-06 08:35:17 +02:00
Ludwig Ortmann
b36ddd7fd7
Merge remote-tracking branch 'upstream/master'
2013-05-15 10:18:08 +02:00
Ludwig Ortmann
c6553f6492
interrupt handling rewrite
...
(including uart0 integration, rt-extension removal)
2013-05-14 18:31:47 +02:00
Oliver Hahm
e69da952de
* forbid the usage of '0' as an parameter for number_of_the_lowest_bit()
2013-04-16 14:00:49 +02:00
Martin Lenders
07e8ac9c19
Remove swtimer
...
see #4
2013-04-11 15:24:15 +02:00
Oleg Hahm
349bec1f0f
* added documentation to kernel_intern.h
2013-03-27 16:58:07 +01:00
Oleg Hahm
e8af0c42c3
* created prototype for cpu_switch_context_exit()
2013-03-27 14:53:38 +01:00
Oliver Hahm
e6177e811a
* moved cpu and board specific parts to corresponding Makefiles
...
* introduced variable for cpu folder
2013-03-23 18:38:12 +01:00
Ludwig Ortmann
f8973bb007
Merge remote-tracking branch 'upstream/master'
2013-03-12 15:23:24 +01:00
Oliver Hahm
0d06e1bc18
Merge branch 'master' of github.com:RIOT-OS/RIOT
2013-03-10 16:46:46 +01:00
Oliver Hahm
7a4dec1830
* replaced new Makefile name in Makefiles
2013-03-09 23:47:21 +01:00
Oliver Hahm
5ffe5a9c27
* renamed makefiles to Makefile
2013-03-09 23:45:56 +01:00
Oleg Hahm
2ed63bd5c6
* removed outdated (and probably confusing) FeuerWhere project as an author
2013-03-08 11:30:23 +01:00
Oleg Hahm
2277b366b2
* removed outdated occurrences of (u|µ)kleos and FeuerWare
2013-03-07 20:51:26 +01:00
Oleg Hahm
68c9a60348
* fixed a copy&paste error in hwtimer_arch.h
2013-03-07 16:33:33 +01:00
Ludwig Ortmann
d65536f77b
native cpu initial import
2013-03-06 01:08:15 +01:00
Oleg Hahm
48e5df9bef
* some clean up
...
* assert active_thread pointer before saving it
2013-02-28 18:11:20 +01:00
Oleg Hahm
5aa00a4f8b
* fixed typo in readme
...
* fixed documentation in irq.h
* moved tools folder to dist
* added check for disk space in build_gnuarm script
* fixed gcc check in this script, too
2013-02-27 20:22:19 +01:00
Oleg Hahm
d31ee82518
* removed legacy projects folder and Jamfiles
2013-02-27 19:08:16 +01:00
Oliver Hahm
9df46b3507
* fixed makefiles for msb-430h support
2013-02-15 22:17:42 +01:00
Oliver Hahm
82f2e3d4e0
* added missing makefiles for msb430h
...
* updated some makefiles and fixed includes for msb430h
2013-02-11 22:10:03 +01:00
Oleg Hahm
5df0bd0cc4
* updated and integrated makefiles
...
* added some auto dependencies
2013-02-08 17:37:02 +01:00
Oleg Hahm
3791039974
* integrated makefiles
...
* fixed some prototypes
* restructured sys
2013-02-06 13:20:21 +01:00
Oliver Hahm
4162a2aff8
[core thread]
...
* added thread_getlastpid() to header
2012-11-13 17:26:43 +01:00
Oliver Hahm
bf96b81f53
[core include]
...
* added header for low-level io operations
2012-11-08 18:56:03 -05:00
Oliver Hahm
e49a17f4f7
Merge branch 'feuerware-integration'
2012-11-07 15:25:25 -05:00
Oliver Hahm
92281753ad
Merge branch 'stable'
...
Conflicts:
core/sched.c
sys/auto_init.c
2012-11-05 19:15:57 -05:00
Oliver Hahm
a20088f6e8
[core sched]
...
* fixed thread_getlastpid()
* enable interrupts again in thread_sleep() to avoid getting stuck w/
disabled interrupts
[cpu lpc2387]
* added hwtimer as dependency for MCI driver
[project test_*]
* fixed some expect scripts
2012-11-01 13:18:17 +01:00
Oliver Hahm
2109f7dc86
[core thread]
...
* added thread_getlastpid
2012-10-18 18:08:40 +02:00
Oliver Hahm
a30a18b3a8
[core msg]
...
* updated documentation of msg_send_receive()
2012-06-28 16:48:17 +02:00
Oliver Hahm
ffc7976aea
[core config]
...
* added prototype for config_load to header
2012-06-06 10:51:38 +02:00
Oliver Hahm
918a31cf8c
[core hwtimer] [cpu arm]
...
* adapted core and arm cpu
2012-03-08 18:58:39 +01:00
Oliver Hahm
551d684155
Merge branch 'master' of ssh://ukleos.org:2222/home/git/ukleos
2012-02-24 14:49:58 +01:00
Oliver Hahm
0d6d3e2c43
[board msba2-common] [sys chardev_thread] [sys shell] [driver cc110x_ng] [core msg]
...
* some cosmetics and cleanups
2012-02-16 21:33:41 +01:00
Oliver Hahm
961b4df179
[core cib] [projects default] [sys shell]
...
* fixed some minor issues found by splint
2012-02-14 14:49:45 +01:00
Oliver Hahm
59a46e0e88
Merge branch 'sixlowpan'
...
Conflicts:
cpu/arm_common/hwtimer_cpu.c
sys/include/vtimer.h
sys/vtimer.c
2012-01-11 17:02:43 +01:00
Oliver Hahm
75b4c946ac
[core hwtimer]
...
* removed double function prototype
2012-01-04 17:44:14 +01:00
Oliver Hahm
e89dc07a05
core/
2011-12-28 11:41:33 +01:00
Oliver Hahm
0fd8127fab
[core msg]
...
* updated IPC documentation
2011-12-01 16:27:23 +01:00
Oliver Hahm
1e0516fe73
[core msg]
...
* updated documentation
2011-12-01 14:11:09 +01:00
Oliver Hahm
a5d1d6d26b
[core scheduler]
...
* added optional callback for scheduler timing statistics
2011-10-05 15:13:34 +02:00
mlenders
9521142842
merged
2011-07-10 22:49:41 +02:00
Oliver Hahm
706d982705
[core kernel]
...
* fixed include search directive for internal header file
2011-06-27 11:34:21 +02:00
Oliver Hahm
5a0e412249
[core sched]
...
* removed declaration from header file
2011-06-24 17:53:09 +02:00
Oliver Hahm
fa94cecf1f
[core mutex]
...
* fixed bug from r5b3209ea
2011-04-14 13:47:24 +02:00
Oliver Hahm
23cd123bdb
[core thread]
...
* fixed wrong struct name in macro
2011-04-04 13:15:21 +02:00
Stephan Zeisberg
5abef6daf2
changed types irq_callback, hashtable, posix_io, s_display_flags, seq_buffer_entry, tcb, toprint to type_t"
2011-03-08 11:43:21 +01:00
Stephan Zeisberg
6a96de0d2f
changed msg to msg_t
2011-03-08 10:54:40 +01:00
Stephan Zeisberg
4bce433513
branch merge
2010-12-13 11:21:22 +01:00
5838ce604b
* hwtimer: switched to lifo
2010-12-10 16:50:16 +01:00
d5ff633d07
* initial checkin of last in first out array queue (lifo)
2010-12-10 16:49:29 +01:00
88ccc555dc
* moved config to sys, split away board specifics
2010-12-06 17:32:27 +01:00
Oliver Hahm
fb1cb91c75
[board/msp-430-common board/msba2 core/]
...
* introduced dummy function for msp-430 config-save
* moved sysconfig from board to core
[sys/transceiver cpu/]
* moved some buffer size defines to cpu dependent parts
* some cleanups
2010-12-03 18:42:03 +01:00
Oliver Hahm
a46cdf189a
* introduced identifiers (include shell commands to get and set)
...
* introduced a system wide configuration
2010-12-01 16:26:48 +01:00
Stephan Zeisberg
9efaa3bbb6
branch merge fixes
2010-11-30 11:37:44 +01:00
Stephan Zeisberg
8264cde342
branch merge
2010-11-30 11:04:57 +01:00
3e70da172e
* removed unneccessary double definition of struct
2010-11-26 15:12:47 +01:00
3a83ef0824
* msg queue optimization
2010-11-26 15:02:15 +01:00
5467d08536
* hwtimer: export hwtimer_now
2010-11-26 14:34:10 +01:00
cb79a7a237
* first implementation of msg queues
2010-11-26 14:21:48 +01:00
cb1d5c7ab3
* added circular index buffer implementation
2010-11-26 13:15:01 +01:00
d40052e24b
* cosmetics
2010-11-25 16:22:46 +01:00
0441c5a4a4
* some more mutex related changes
2010-11-11 11:22:45 +01:00
21e6aaff24
* fix priority queue insert
2010-11-11 11:21:58 +01:00
dad5bf866c
* removed unused prio function
2010-11-11 09:57:54 +01:00
8b242c74a8
* mutex changes
2010-11-11 09:55:08 +01:00
9122445c27
* align tcb on 32bit boundary
2010-11-09 17:01:52 +01:00
Oliver Hahm
3b9e9befa9
* some cosmetics and lpm flags for UART
2010-11-08 21:39:30 +01:00
Oleg
88c0ec84ee
* added set offset shell command for sht11
...
* introduced command separator for pyterm
* some cosmetics
2010-11-07 23:18:41 +01:00
Oleg
416029d2c0
* changed default project from "hello-world" to "default"
...
* increased main priority to the half of maximum priority
* introduced define for minimum stack size
* decreased stack size for uart0 thread
* merged commands for rtc shell module to one command (date)
* cleanup of header includes
2010-11-05 19:33:45 +01:00
ba03f610c4
* fix status size
2010-11-04 17:06:03 +01:00
2bf64ea4d0
* make doc reflect latest API change
2010-11-04 16:51:04 +01:00
67f72d43ee
Merge branch 'master' of ssh://ukleos.org/home/git/ukleos
2010-11-04 16:48:14 +01:00
eff0b1980f
* API CHANGE! changed thread_create so it allocates tcb on stack, removing first argument
2010-11-04 16:47:24 +01:00
Oliver Hahm
d1bff5cb3d
Merge branch 'master' of ssh://ukleos.des-mesh.net/home/git/ukleos
2010-11-04 16:23:11 +01:00
Oliver Hahm
e335ccfb43
* fixed wrong return value for thread_wakeup
...
* changed hwtimer_wait to use thread_sleep instead of mutexes
2010-11-04 16:21:39 +01:00
7f8baa8818
* removed unneccessary priority names
2010-11-04 14:21:12 +01:00
dc094d442b
* fix msg_reply_int
2010-11-03 11:37:32 +01:00
d48c1e6e16
* fix msg_reply_int
2010-11-03 11:37:20 +01:00
711ae3b686
* thread: add some more debug statements
2010-11-02 11:40:10 +01:00
3b46b2d2af
* fix stack assignment mixup for main / idle threads
2010-11-02 11:06:58 +01:00
62035f36c8
* add some more debug statements
2010-11-01 15:53:33 +01:00
0f4a72974a
* hwtimer.c cosmetics
2010-11-01 15:50:31 +01:00
cc800bcb13
* honour previous IRQ state in error path
2010-11-01 13:45:30 +01:00
Oliver Hahm
5b3209ea19
* check for null pointer in mutex wake waiters function
2010-11-01 13:29:40 +01:00
Oliver Hahm
f38f32f6cc
* added support for sht11 for msb-430-common
...
* fixed some jamfile isssues for msb-430
* fixed arch32 detection for scheduler
* changed sht11 driver to be platform independent
2010-10-29 17:32:03 +02:00
11bc939d67
* merge fixes
2010-10-28 11:31:19 +02:00
1e238e4131
* massive name changes
2010-10-28 11:29:03 +02:00
1206f6fd5e
* massive name changes
2010-10-28 11:22:57 +02:00
273f281a2f
* msg: fix msg_reply
2010-10-28 10:20:06 +02:00