Commit Graph

2993 Commits (40c939882dfee20b337bd331797ab8c422e877eb)
 

Author SHA1 Message Date
Kaspar Schleiser 40c939882d tests: add test_vtimer_msg_diff
This test sets three timers and renews them periodically, showing the
difference they accumulate.
9 years ago
René Kijewski e8bf4ef6a2 Merge pull request #1182 from Kijewski/msp-oneway-malloc
msp430: provide oneway-malloc implicitly
9 years ago
René Kijewski 9f40d019e3 Merge pull request #1201 from Kijewski/exclusive-make-clean
make: make clean usable together with `-j`
9 years ago
René Kijewski d52651f61d Merge pull request #1215 from Kijewski/tlsf
Add TLSF (two level segregated fit) PKG
9 years ago
René Kijewski f3eeb98a01 msp/tests: remove blacklist from test_bloom_bytes
Issue #1061 was fixed.
9 years ago
René Kijewski 75f71992e5 Add doxygen comments to MSP's oneway malloc 9 years ago
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.
9 years ago
Oleg Hahm f54b363b6c Merge pull request #1015 from OlegHahm/sixlowpan_doxygen_fix
Some doxygen fixes
9 years ago
Oleg Hahm 6dbeacd2ce documentation: fixed sixlowpan doxygen filename 9 years ago
Oleg Hahm f8168c86d3 documentation: fixed organization of 6LoWPAN doxygen 9 years ago
Oleg Hahm 9efc0d2255 documentation: added missing doxygen header to transceiver interface 9 years ago
Oleg Hahm ce73fa56e2 documentation: moved network documentation to top level 9 years ago
Oleg Hahm bf00b019e4 documentation: CMSIS cleanup
Put all CMSIS documentation into a dedicated subgroup of cpu.
9 years ago
Kévin Roussel e9ff3e6cf8 Merge pull request #1211 from rousselk/complete-radio_driver_h
Completing low-level radio driver definition.
9 years ago
Kévin Roussel 2a02203067 Complete the definition of low-level radio driver API 9 years ago
Thomas Eichinger 5808662d05 Merge pull request #1193 from LudwigOrtmann/issue-924
core/hwtimer: disable interrupts in hwtimer_remove
9 years ago
Thomas Eichinger 1e12d5896b Merge pull request #977 from mehlis/doxygen-irq
core: kernel: improved doxygen documentation
9 years ago
Christian Mehlis 67428b5814 core: kernel: improved doxygen documentation
also added param[in] to irq.h and fix order of doxygen endguards
9 years ago
Christian Mehlis 0aa87a8ee7 Merge pull request #1208 from Kijewski/issue-1199
documentation: fix doxygen for `pthread_*.h`
9 years ago
René Kijewski 06eb95d687 Merge pull request #1216 from LudwigOrtmann/issue-1215
native: set _native_pid correctly in daemon mode
9 years ago
Oleg Hahm 8aa78edb0a Merge pull request #1213 from OlegHahm/ubuntu_msp430_errno_fix
msp430: workaround: define errno values if not provided by MSP430 lib
9 years ago
Ludwig Ortmann c9f68e79b9 native: set _native_pid correctly in daemon mode
This fixes a bug that leads to all unix sockets being created as
`/tmp/riot.tty.0`.
9 years ago
René Kijewski 88e8915dfe Add TLSF (two level segregated fit) PKG
This is my second take on #669, because I was asked to separate it from #764.

This change adds a malloc implementation as a PKG, which uses *TLSF* (two
level segregated fit).

The patch file removes the 64bit capatibilities, debug functions, and the
option to have multiple "control blocks" (a control block holds multiple
memory pools). It wraps `malloc()` and friends in `disableIRQ() … restoreIRQ()`.

The implemention does not support 16bit platforms, yet, but probably only some
constants would need fixing. I limited the maximum size of a memory pool to
2**30 bytes = 1GB.

This PKG is not meant to be used by applicitions directly, but by the boards.
The board's initialition code needs to call
`int tlsf_add_pool(void *mem, size_t bytes)` for every free memory region it
has. If the board in using newlib, then this call needs to happen before the
first call to `puts`, `printf`, and friends, because newlib allocates the
control data IO streams (stdin, stdout, stderr) on the heap. Adding a small
(e.g. 1kB) pool before proper board initialization would be a possible solution.

Please read the additional information in the website of the implementator,
http://tlsf.baisoku.org/:

> TLSF (two level segregated fit) is a relatively new memory
allocator designed for embedded systems. It boasts constant
time O(1) malloc/free response time and a 4-byte block
overhead. Though it typically is slightly slower than other
allocators such as dlmalloc, it has no worst-case behavior.

> The original implementation, which comes alongside the white
paper, is distributed under the GNU GPL/LGPL. The code found
here is an original implementation, released into the public
domain, therefore is not subject to any licensing restrictions.

> Features:
 -  O(1) cost for malloc, free, realloc, memalign
 -  Extremely low overhead per allocation (4 bytes)
 -  Low overhead per pool (~3kB)
 -  Low fragmentation
 -  Compiles to only a few kB of code and data

> Caveats:
 -  Currently, assumes architecture can make 4-byte aligned accesses
 -  Not designed to be thread safe; the user must provide this

> Known Issues:
Due to the internal block structure size and the implementation
details of tlsf_memalign, there is worst-case behavior when requesting
small (<16 byte) blocks aligned to 8-byte boundaries. Overuse of memalign
will generally increase fragmentation, but this particular case will leave
lots of unusable "holes" in the heap. The solution would be to internally
align all blocks to 8 bytes, but this will require significantl changes
to the implementation. Contact me if you are interested.
9 years ago
Oleg Hahm 05a3570ffe Merge pull request #1189 from Kijewski/compile_test-empty-folders
buildtest: ignore empty folders
9 years ago
Oleg Hahm 31351a0dc0 msp430: workaround: define errno values if not provided by MSP430 lib 9 years ago
René Kijewski 57429954c1 Merge pull request #1212 from authmillenon/fix-application-names
Fix application name for test_bloom_byte application
9 years ago
Martin Lenders 3daa80124e Fix application name for test_bloom_byte application 9 years ago
Oleg Hahm e980f82f99 Merge pull request #1202 from OlegHahm/cortex_doxygen_cleanup
documentation: cleanup doxygen for SAM3x8e and Z1
9 years ago
Oleg Hahm 4f645ecf36 documentation: fix doxygen group for Z1 9 years ago
Oleg Hahm 9bef59cc55 documentation: fix CMSIS doxygen for SAM3x8e 9 years ago
René Kijewski e135bdc266 documentation: fix doxygen for `pthread_*.h`
The pthread header files aren't in the doxygen page anymore after #1137,
because I `@file`'d the `.c` files, not the `.h` files.

This change moves doxygen boilerplate.

Closes #1199.
9 years ago
René Kijewski 79b6c41f5a Merge pull request #1000 from OlegHahm/prefix_core_api_functions
core: prefix API functions correctly
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
Oleg Hahm 94e4ee1611 Merge pull request #1083 from OlegHahm/test_hwtimer_w_thread_sleep
tests: added a thread_sleep() at the end
9 years ago
Oleg Hahm 127801d18d tests: added a thread_sleep() at the end
Letting the main thread exit could cause failing test if thread_exit()
is broken for the tested platform, preventing the actual testing of the
hwtimer.
9 years ago
Martine Lenders f8e329bb80 Merge pull request #1198 from Kijewski/issue-1197
make: fix rebuilding on changes without `clean` or `-B`
9 years ago
René Kijewski 329cc53d2a Merge pull request #1194 from LudwigOrtmann/cortexygen
documentation: fix generation Doxygen documentation after Cortex import
9 years ago
René Kijewski bd1630adca buildtest: ignore empty folders
`compile_test.py` fails if there are empty folders in `/examples` or
`tests`. This is not a problem for Travis, because it always has a clean
repo.

For the average users there is a problem if they work on multiple
branches and one branch has new examples or tests. If they don't delete
the residual `bin` folders, then `compile_test.py` will print out these
applications as having failed.

This change checks for the existence of a `Makefile` in the application
folder. Also I added a progress indicator, because I like it. :)
9 years ago
Ludwig Ortmann aa4e61fab2 documentation: clean up doxygen mess after cortex
fixes #1190
9 years ago
René Kijewski 3d6c7008e5 make: make clean usable together with `-j` 9 years ago
René Kijewski 66a3d7da77 make: fix #1197
Partial revert of 85b7eca19e

Fixes #1197.
9 years ago
Ludwig Ortmann f3a587f43a Merge pull request #1196 from LudwigOrtmann/native_missing_include
native: add missing include
9 years ago
Ludwig Ortmann cbf39bf012 native: add missing include
crash.c was missing native_internal.h
9 years ago
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
9 years ago
Kévin Roussel 988de6b2cd Merge pull request #893 from rousselk/z1-port
Zolertia Z1 port for RIOT OS
9 years ago
Kévin Roussel 2a3033b3ca boards/z1: initial import 9 years ago
René Kijewski 28ff8cebae Merge pull request #1085 from Kijewski/compile_test-process-indicator
Add process indicator to compile_test.py
9 years ago
Oleg Hahm 5d7f7dd686 Merge pull request #1079 from BytesGalore/add_NORETURNs
core: and cpu: Added NORETURN to functions that should not return
9 years ago
René Kijewski 6587fe2b76 Merge pull request #1183 from Kijewski/issue-1104
make: print error if make was executed in the root
9 years ago
René Kijewski e189064171 make: print error if make was executed in the root
Fixes #1104, alternative to #1178.
9 years ago