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

107 Commits

Author SHA1 Message Date
Ludwig Ortmann
b7992922ce fix license headers in non-.c files 2014-08-23 16:16:26 +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
Ludwig Ortmann
1df6505db9 boards/cpu: fix some warnings 2014-08-05 18:52:26 +02:00
Cenk Gündoğan
5429035b1c cpu: removing tabs from asm files (#1439)
```find . -name "*.[sS]" -exec grep -l $'\t' {} \;``` and ```ack --asm -l "\t"```
revealed three more files with tabs.
2014-08-02 12:47:02 +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
d55da67fb6 Merge pull request #1329 from LudwigOrtmann/riot_license
RIOT default license header change
2014-07-31 23:12:47 +02:00
Ludwig Ortmann
73aa3739d2 doc: use lgplv2.1-short license header instead of lgplv2-short-v2 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
Ludwig Ortmann
1200c3bc46 doc: fix comment indentation 2014-07-31 22:57:19 +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
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
René Kijewski
867246a09f Add argument to thread_create 2014-07-09 10:07:54 +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
Thomas Eichinger
c70ae14ff0 cleanup licenses to fix #392 2014-05-27 11:54:55 +02:00
Oleg Hahm
ef4fe6616c documentation: unified descriptive text for cpu 2014-05-24 15:56:57 +02:00
Oleg Hahm
a2db556139 cosmetics: cleaned up arm_common.h
* converted tabs to white spaces, fixed indentation, and removed SVN clutter
2014-05-24 15:16:26 +02:00
Oleg Hahm
de6e70c594 copyriot: fixed copyriot header for arm_common 2014-05-24 15:12:36 +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
Jan S
ba907471f3 fixed printf specifiers 2014-05-15 17:42:57 +02:00
René Kijewski
6f3d0871aa core/cpu: put __builtin_unreachable() into one place 2014-05-07 19:24:55 +02:00
René Kijewski
d19e885fb9 arm_common: no needless _gettimeofday() warning
The `arm_common` syscalls implement `_gettimeofday()` for the benefit of
newlib. The syscall call only work if the `rtc` module or the `vtimer`
modules is transcluded. If neither module is used, a warning is printed
by means of `#warning`.

This warning is useless if the user does not invoke `gettimeofday()`.
Further this warning prevents the use of `-Werror`.

This PR puts the function in its own file, that will only be linked if
it was used. And if the function was used, then a link time error occur
if neither `rtc` nor `vtimer` was transcluded.
2014-05-05 14:45:11 +02:00
Oleg Hahm
aeb54158f6 cpu: satisfy compiler in crash.c 2014-04-09 12:27:53 +02:00
René Kijewski
3f59eefbaf Use subfolders in bin dir
Creating all object files in one directory is bound to produce name
clashes. RIOT developers may take care to use unique file names, but
external packages surely don't.

With this change all the objects of a module (e.g. `shell`) will be
created in `bin/$(BOARD)/$(MODULE)`.

I compared the final linker command before and after the change. The
`.o` files (e.g. `startup.o`, `syscall.o` ...) are included in the same
order. Neglecting the changed path name where the `.o` files reside, the
linker command stays exactly the same.

A major problem could be third party boards, because the location of the
`startup.o` needs to the specified now in
`boards/$(BOARD)/Makefile.include`, e.g.
```Makefile
export UNDEF += $(BINDIR)msp430_common/startup.o
```
2014-04-09 00:28:14 +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
Hauke Petersen
8a937e1a1c hwtimer: clean up of interfaces to board/cpu 2014-03-26 13:19:18 +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
Oleg Hahm
0c14597ec2 Merge pull request #685 from rousselk/panic
Panic
2014-02-26 16:26:27 +01:00
Oleg Hahm
b4a8788210 fixed typo 2014-02-26 08:18:17 +01: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
Kévin Roussel
4f8a29d892 Implemented the crash-handling/reboot mechanism for ARM-based MCUs 2014-02-25 10:50:51 +01:00
Kévin Roussel
f6d7910352 Added while(1) to ensure GCC valids NORETURN; fixed indentation 2014-02-14 16:33:47 +01:00
Kévin Roussel
c33087bdcd Implemented reboot() function for ARM-based MCUs 2014-02-14 11:56:18 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Martin
b4f36f4af9 added typecast for starck_start in arm_cpu to ensure correct calculation 2014-02-07 09:17:21 +01:00
Oleg Hahm
02612ff0ca further Makefile cleanup 2014-01-05 16:11:08 +01:00
Oleg Hahm
26c50522d5 simplified and unified cpu build structure 2014-01-05 16:11:07 +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
Oleg Hahm
903ec54a43 making include directives consistent 2013-12-19 15:31:37 +01:00
Oleg Hahm
aabef88d20 fix check for used cpu in arm_common 2013-12-19 15:25:12 +01:00
Oleg Hahm
ead2e117a1 Merge pull request #439 from OlegHahm/thread_yield_prototype
put prototype for thread_yield() in core/include
2013-12-18 13:36:55 -08:00
Oleg Hahm
227c847135 put prototype for thread_yield() in core/include 2013-12-18 17:47:49 +01:00
Oleg Hahm
856548c63d macros are not handled by the preprocessor in ASM 2013-12-18 16:56:13 +01:00
Thomas Eichinger
1fcb47f9ed fixed interrupt handling for hwtimer 2013-12-18 11:11:15 +01:00
Thomas Eichinger
1e39e7e486 change to the mc1322x IRQ handling
since mc1322x lacks a VIC this is a kind of SW VIC with low latency and
compatibility to the VIC API in mind.
2013-12-18 11:11:14 +01:00
Thomas Eichinger
39c69166c5 fixes startup code and adds proper irq handler for mc1322x 2013-12-18 11:10:20 +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
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
Christian Mehlis
ff12887eae Merge pull request #380 from OlegHahm/fix_watchdog
initializes watchdog properly for MSB-A2
2013-12-03 03:17:43 -08:00
Oleg Hahm
9817043ada Merge pull request #375 from LudwigOrtmann/license_header_fix
fix grammar in license header
2013-11-26 10:55:41 -08:00