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

65 Commits

Author SHA1 Message Date
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
76212cf594 vtimer: no needless type casting
Compare https://github.com/RIOT-OS/RIOT/pull/1639#issuecomment-54713048
and following discussion.
2014-09-07 22:06:05 +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
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
René Kijewski
4032a22719 queue: add queue_t root type 2014-07-30 21:10:22 +02:00
René Kijewski
6fae042a60 core: remove unneeded calls to mutex_init() 2014-07-29 09:33:24 +02:00
René Kijewski
e1705622b7 vtimer: fix crash on spurious hwtimer callback
It seems that there are corner cases where a vtimer was removed, but
still there comes a hwtimer callback. This is a bug somewhere in the
vtimer or hwtimer. If there still was a vtimer set, then the next one
gets called before its time. If there was no other vtimer scheduled,
then `timer->action(timer)` crashes.

This PR simply fixes the crash, but does not attempt to find the more
fundamental bug.
2014-07-18 14:42:52 +02:00
Oleg Hahm
04493cc026 Merge pull request #1407 from LudwigOrtmann/issue-571
sys/vtimer: spin on short duration in vtimer_sleep
2014-07-16 22:14:27 +02:00
Hauke Petersen
7ec61c578d vtimer: renamed e|dINT to disable|restoreIRQ 2014-07-14 18:10:06 +02:00
Ludwig Ortmann
3e965f926a sys/vtimer: spin on short duration in vtimer_sleep
closes #571
2014-07-13 06:56:17 +02:00
Oleg Hahm
a6e97a4f75 Merge pull request #1034 from Kijewski/vtimer-callbacks
vtimer: fix callback usage
2014-07-10 17:12:23 +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
2231a315d4 vtimer: fix callback usage
There is no need to test the "handler" set in the vtimer struct, and
have some code executed then. We just can make the code to execute the
handler. To lengthy `if else if`, just a call.
2014-06-03 21:07:59 +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
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
René Kijewski
77c296cf59 vtimer: fix integer overflow in vtimer_now() for MSP-430 2014-04-17 14:46:21 +02:00
Oleg Hahm
07b0cd8863 added gettimeofday syscall
RIOT's gettimeofday needs to be called from syscalls.c to assure that gcc actually links it.

If an RTC if available and enabled it will be used instead.
2014-02-25 17:41:45 +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
René Kijewski
2349d0806e "Exterminate } else {" 2014-02-16 23:29:47 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +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
Christian Mehlis
5f10d44009 use mutex in vtimer_sleep
this change prevents a race condition in case of
short sleep time

Fixes: https://github.com/RIOT-OS/RIOT/issues/550
2014-01-23 15:20:43 +01:00
Oleg Hahm
ed8a220cd0 Merge pull request #442 from mehlis/vtimer_get_localtime
Vtimer get localtime
2014-01-15 09:19:06 -08:00
Oleg Hahm
01d62a52bc Merge pull request #430 from mehlis/vtimer-now-fix
fix: vtimer_now should return seconds and microseconds
2014-01-15 09:10:29 -08: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
Christian Mehlis
3d67ad3a8a add vtimer_get_localtime 2013-12-23 23:36:03 +01:00
Oleg Hahm
cdb77c2392 Merge pull request #437 from OlegHahm/include_directives
making include directives consistent
2013-12-19 08:38:14 -08:00
Christian Mehlis
63296b759b resort function call and debug output 2013-12-19 16:24:41 +01:00
Christian Mehlis
966c98d11b added comments and debug 2013-12-19 16:24:41 +01:00
Christian Mehlis
cd016e0334 fix: vtimer_now should return seconds and microseconds 2013-12-19 15:37:55 +01:00
Oleg Hahm
903ec54a43 making include directives consistent 2013-12-19 15:31:37 +01:00
Christian Mehlis
169c6fac95 fix printf macro 2013-12-13 21:42:08 +01:00
Christian Mehlis
0cb152c423 added vtimer_msg_receive_timeout 2013-12-09 22:14:59 +01:00
Christian Mehlis
c6073762fa fixed warnings in vtimer 2013-12-04 10:59:13 +01:00
Ludwig Ortmann
92f4aa32c9 fix grammar in license header 2013-12-04 10:59:13 +01:00
Ludwig Ortmann
1c8e9a4ef5 add license header 2013-12-04 10:59:12 +01:00
Ludwig Ortmann
4cb63ee2c5 fix the bloody longterm vtimer bug
You know who you are, I'm looking at you!
2013-12-04 10:59:12 +01:00
Oleg Hahm
24314a2167 Merge pull request #358 from OlegHahm/fix_warnings
Fix warnings
2013-11-25 17:10:55 -08:00
Oleg Hahm
1f50d91332 making the pedantic gcc happy 2013-11-23 03:45:26 +01:00
Christian Mehlis
ffdeb41b4d fix debug output 2013-11-21 21:38:02 +01:00
Oleg Hahm
2f14997124 fixed debug output for ps and vtimer 2013-11-03 07:30:41 -08:00
Christian Mehlis
9c70e4501c only include debug functions if needed 2013-10-11 14:21:47 +02: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
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
Christian Mehlis
b8176f4488 fixed printf patterns 2013-07-16 15:27:19 +02:00
Christian Mehlis
6652ecc87a remove static flag, it's not static 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
9549c29ccb fix missing includes 2013-06-30 01:53:53 +02:00