Joakim Nohlgård
985afd8d80
core/mutex.c: remove unused #include "atomic.h"
6 years ago
Victor Arino
ea12433a8d
core/mutex: support locked initialization
6 years ago
Martine Lenders
1750e1bad8
core: mutex: piggy-back some style fixes
7 years ago
Martine Lenders
ccb4521599
core: allow DEBUG in mutex.c to run without DEVELHELP
7 years ago
Kaspar Schleiser
f9f6adb48d
core: clist: make singly linked
7 years ago
Kaspar Schleiser
350c341ce1
core: mutex: use of intrusive linked list instead of priority queue
7 years ago
DipSwitch
0bb4748a94
core: Fix/refactor function naming in core/incude/irq.h
7 years ago
Kaspar Schleiser
2b010b5337
core: rename tcb_t -> thread_t, move into thread.h
7 years ago
Kaspar Schleiser
9082273746
core: header cleanup
7 years ago
Joakim Nohlgård
98c465008b
all: Update @gebart family name, email
7 years ago
Oleg Hahm
ef5a7e7d05
core mutex: use ATOMIC_VALUE for debug output
7 years ago
René Kijewski
c0c2d8660f
core: missing restoreIRQ in mutex_unlock
...
`mutex_unlock()` did not restore IRQsbefore yielding for the woken up
thread.
8 years ago
Joakim Gebart
748499b737
core/mutex: Use atomic_int_t for lock variable.
8 years ago
Joakim Gebart
13832d8e62
everything: Remove filename from @file Doxygen command
8 years ago
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
8 years ago
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.
8 years ago
Ludwig Ortmann
c2b2e4554b
core/queue: queue -> priority_queue
...
Rename queue to priority queue, because that's what it is.
9 years ago
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.
9 years ago
Ludwig Ortmann
3ca4f18479
doc: use lgplv2.1-short license header instead of lgpl-short-riot
9 years ago
René Kijewski
4032a22719
queue: add queue_t root type
9 years ago
René Kijewski
e03e20b7f6
core: simplify mutex initializer
9 years ago
René Kijewski
e5d6142823
core: simplify mutex signatures
9 years ago
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.
9 years ago
Oleg Hahm
ef5ec344fd
core: prefix API functions correctly
...
Also changed names for bitarithm functions and rename thread_pid to sched_active_pid.
9 years ago
Martin Lenders
71a632520b
Fix documentation for mutex.h
9 years ago
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
9 years ago
Oleg Hahm
58aa0da315
added missing ENABLE_DEBUG define in mutex.c
9 years ago
René Kijewski
114eedd764
core:mutex: allow idle thread to use mutexes
9 years ago
René Kijewski
3c65b38881
core:mutex: remove refactor remnant
9 years ago
Martin
35106e3391
add test for mutex_unlock_and_sleep()
9 years ago
Martin
05f085d51a
add mutex_unlock_and_sleep()
9 years ago
Oleg Hahm
32f918abe8
simplified sched_switch
...
sched_switch can check ISR itself.
9 years ago
Christian Mehlis
0309fecc19
fix warning: invalid suffix on literal
...
C++11 requires a space between
literal and identifier [-Wliteral-suffix]
9 years ago
Martin
ff36df6847
migrated tcb.h include to .c file
9 years ago
Martin
88c7c47c46
removed unnecessary includes
9 years ago
Kaspar Schleiser
56ee585c81
update Kaspar's email address
...
kaspar.schleiser@fu-berlin.de is obsolete.
(2nd try, first try was overwritten by some overzealous documenter)
9 years ago
Oleg Hahm
9eb1daf31e
added thread.h include (necessary since 227c847135
)
9 years ago
Hauke Petersen
3785fe956b
Fixed doxygen comments, focused on file headers and group definitions
9 years ago
Kaspar Schleiser
f85adf608f
change my email address
...
kaspar.schleiser@fu-berlin.de will be obsoleted soon. Replace it with
kaspar@schleiser.de, which will (hopefully) stay.
9 years ago
Ludwig Ortmann
d6c213fb47
fix grammar in license header
9 years ago
Oleg Hahm
39a4dc684e
fixes for #62 : eliminate unused parameter warnings
...
NOTE: this commit introduces a kernel API change for mutex_unlock
10 years ago
Oleg Hahm
37467de0d2
fixed printf formatter
10 years ago
Christian Mehlis
b8176f4488
fixed printf patterns
10 years ago
Christian Mehlis
69c526f44d
removed redefined ENABLE_DEBUG
10 years ago
Oliver Hahm
c8bee9e554
fixed coding style (space after most keywords)
10 years ago
Oliver Hahm
ffeb6f8523
fixed coding conventions (correctly this time)
10 years ago
Oliver Hahm
0d6d8390c0
* updated copyright and license headers in various files
10 years ago
Oleg Hahm
3791039974
* integrated makefiles
...
* fixed some prototypes
* restructured sys
10 years ago
mlenders
9521142842
merged
12 years ago
Oliver Hahm
fa94cecf1f
[core mutex]
...
* fixed bug from r5b3209ea
12 years ago