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

126 Commits

Author SHA1 Message Date
Martine Lenders
41f60aca4c pktbuf: port to use ng_ version 2015-02-19 13:51:27 +01:00
Martine Lenders
9077299d06 msp430: add assert header 2015-02-12 14:24:06 +01:00
Oleg Hahm
db58a8b226 Merge pull request #2214 from rousselk/msp430-fix-intr
Msp430 misc interrupt-related fixes
2014-12-19 16:35:39 +01:00
Kévin Roussel
892268d74b Ensure only GIE bit is touched in splx_() 2014-12-19 11:11:15 +01:00
Kévin Roussel
07b170595c Ensure interrupts are enabled before going in low-power mode 2014-12-19 11:11:14 +01:00
Kévin Roussel
91fd567c8f Use custom assembly code instead of MSP GCC primitives for dINT()/eINT()
and all other functions that enable or disable interrupts
2014-12-19 11:11:14 +01:00
Kévin Roussel
f9b0df7e4b Use TimerB for 'hwtimer' module implementation 2014-12-19 10:53:12 +01:00
Kévin Roussel
25ac0db606 Robust use of TimerA for 'hwtimer' module 2014-12-19 10:53:12 +01:00
Kévin Roussel
d101b30dd8 Make hwtimer_spin() work even with interrupts disabled
by using only 16 significative bits on MSP430 hardware timers
2014-12-17 12:21:07 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
Oleg Hahm
10a4540f2d license: added missing license for msp430 time.h 2014-11-21 15:10:19 +01:00
Oleg Hahm
39abba1bc2 licenses: fix miss-spelled & missing boiler plates 2014-11-10 18:59:55 +01: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
Martine Lenders
a569f2b92c net: Initial import of a global packet buffer 2014-10-16 11:52:30 +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
d4f144eb47 Add license statement to {msp430_types,net_help}.h 2014-09-25 10:14:58 +02:00
Hinnerk van Bruinehsen
4d2ca13fcf lint: lpc1768/msp430: remove arith ops on void ptrs 2014-09-14 02:33:44 +02:00
Kévin Roussel
a691d0798a Fixed comments 2014-09-09 13:18:39 +02:00
Kévin Roussel
4421de003b Fix the race condition when an interruption occured at the beginning
of thread_yield(), i.e.: just after SR(R2) was pushed but before
the rest of the suspended thread's context was pushed!
2014-08-29 15:09:23 +02:00
Kévin Roussel
3df5a2745f Prevent the compiler to add an unwanted prologue in thread_yield() 2014-08-29 15:09:22 +02:00
Kévin Roussel
cf683d9866 Fix thread_yield by avoiding the (too) early re-enablement of IRQ,
that is: before the newly selected thread's context is totally restored
2014-08-29 15:09:22 +02:00
Ludwig Ortmann
2439bd839c doc: fix more license headers
Remove some cruft, set correct lgpl versions, update to lgpl where
this had been overlooked in the past, fix odd comment style...
2014-08-27 19:20:49 +02:00
Ludwig Ortmann
d55da67fb6 Merge pull request #1329 from LudwigOrtmann/riot_license
RIOT default license header change
2014-07-31 23:12:47 +02:00
Ludwig Ortmann
c40b281873 doc: use lgplv2.1-short license header instead of lgplv2-short-v3 2014-07-31 22:57:20 +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
3989945679 converting tabs to spaces in cpu (#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:46:28 +02:00
Hauke Petersen
9001e0c2fb core: removed duplicated hwtimer_arch.h 2014-07-09 21:08:13 +02:00
René Kijewski
867246a09f Add argument to thread_create 2014-07-09 10:07:54 +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
Oleg Hahm
31351a0dc0 msp430: workaround: define errno values if not provided by MSP430 lib 2014-05-19 18:54:20 +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
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
René Kijewski
55b12034a9 msp430: fix missing members in struct tm
Closes #1150.
2014-05-14 19:57:41 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +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
Martin
619039e0e2 add pthread condition variable implementation 2014-04-29 18:39:03 +02:00
René Kijewski
300d6b3e35 Make: exterminate 'clean' buildtarget
Closes #993.

We do not need to descend into the modules to know what to do on
`make clean BOARD=blub`. We can just invoke `rm -rf bin/blub`.

This PR only keeps the descending into the USEPKGs, since they might
want to delete cached/downloaded/extracted data.
2014-04-09 23:07:52 +02:00
Oleg Hahm
aeb54158f6 cpu: satisfy compiler in crash.c 2014-04-09 12:27:53 +02:00
Kévin Roussel
b6fbe33539 Handle race conditions preventing timers to be set correctly on MSP430 MCUs
when the counter is incrementing and/or overflowing
2014-04-09 10:28:39 +02:00
Ludwig Ortmann
91814e52ae make: replace MAKEBASE with RIOTBASE
closes https://github.com/RIOT-OS/RIOT/issues/959
2014-04-01 16:40:28 +02:00
Oleg Hahm
c25b785984 msp430: don't enable Timer 0 by default 2014-03-26 15:00:56 +01:00
Oleg Hahm
ef8bfb38a1 msp430: show overflow counter in hwtimer debug 2014-03-26 14:09:16 +01:00
Oleg Hahm
e93b44e8b5 msp430: remove expensive modulo call 2014-03-26 14:09:16 +01:00
Hauke Petersen
8a937e1a1c hwtimer: clean up of interfaces to board/cpu 2014-03-26 13:19:18 +01:00
Oleg Hahm
a427cce09b Merge pull request #881 from rousselk/msp430-stackptr-align
Ensure that stack pointer is correctly aligned during thread creation on MSP430
2014-03-17 17:37:49 +01:00
Oleg Hahm
3c54edf4d6 Merge pull request #822 from LudwigOrtmann/reboot_signature
core: change reboot signature.
2014-03-16 18:42:23 +01:00
Kévin Roussel
054367c23a Ensure that stack pointer is correctly aligned during thread creation on MSP430 2014-03-13 12:40:57 +01:00
Ludwig Ortmann
9b61d95545 make: don't ignore failures in for loops
Add `|| exit 1` to all constructs like `@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;`, so that compilation stops on the first error.
2014-03-12 11:09:04 +01:00