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