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

260 Commits

Author SHA1 Message Date
Ludwig Ortmann
2c80f68d62 handle more errors and remove race condition in native_isr_entry 2014-01-29 18:44:42 +01:00
Ludwig Ortmann
a55e85f8d0 guard swapcontext in _native_syscall_leave 2014-01-29 18:44:42 +01:00
Ludwig Ortmann
7f1db86ae2 handle some should-be impossible paths 2014-01-29 18:44:41 +01:00
Ludwig Ortmann
573b154f44 handle select errors EAGAIN | EWOULDBLOCK in lpm 2014-01-29 18:44:18 +01:00
Ludwig Ortmann
3c087107f2 fix call to err() 2014-01-29 16:54:36 +01:00
Ludwig Ortmann
f04c3dc433 Merge pull request #559 from LudwigOrtmann/native_syscall_guards
Native syscall guards
2014-01-24 09:36:26 -08:00
Ludwig Ortmann
d8745e2861 add local debug macro
addresses https://github.com/RIOT-OS/RIOT/pull/559#issuecomment-33241773
2014-01-24 18:26:44 +01:00
Ludwig Ortmann
b22380990f fix DEBUG in syscalls 2014-01-24 17:30:47 +01:00
Ludwig Ortmann
4939473afb guard malloc/free family 2014-01-24 17:30:47 +01:00
Ludwig Ortmann
7685357990 Merge pull request #547 from LudwigOrtmann/native_hwtimer_fix
Native hwtimer fix
2014-01-24 08:10:42 -08:00
Ludwig Ortmann
7148f1db23 change wording
addresses https://github.com/RIOT-OS/RIOT/pull/555#discussion_r9118361
2014-01-23 17:25:41 +01:00
Ludwig Ortmann
f58b312129 improve error messages when tap ioctls fail 2014-01-23 17:16:00 +01:00
Ludwig Ortmann
e32bfa53d0 fix overdue mitigation 2014-01-23 00:03:23 +01:00
Ludwig Ortmann
91ebc1d0b5 improve debug messages 2014-01-22 22:19:53 +01:00
Ludwig Ortmann
332cf8807f fix callback offset 2014-01-22 22:19:53 +01:00
Ludwig Ortmann
855eea6a53 add missing newlines 2014-01-22 18:26:53 +01:00
Ludwig Ortmann
2b4a323a18 unclutter native_isr_entry a bit
remove heap_address - hopefully superflous, does not work in valgrind
remove stale TODO
2014-01-21 17:39:43 +01:00
Ludwig Ortmann
7789bbca16 fix signal trampoline
save and use the program counter on stack
removes race condition in trampoline
also push/pop full memory words explicitly
2014-01-21 17:39:15 +01:00
Ludwig Ortmann
98a2d554b5 osx fixes 2014-01-21 12:30:53 +01:00
Ludwig Ortmann
fc6cd24ece reduce HWTIMERMINOFFSET 2014-01-15 12:40:55 +01:00
Ludwig Ortmann
dbcc898bcc update internal timer on hwtimer_arch_set 2014-01-15 12:40:03 +01:00
Ludwig Ortmann
d3a1c1bda7 add comment
addresses https://github.com/RIOT-OS/RIOT/pull/501#discussion_r8881054
2014-01-15 11:24:59 +01:00
Ludwig Ortmann
921b70d5e8 fix pre-init
set the internal relative time - don't rely on hwtimer_now() being
called externally
2014-01-14 17:23:15 +01:00
Ludwig Ortmann
396f6c2819 fix debug msg 2014-01-14 17:23:03 +01:00
Ludwig Ortmann
6fe1ecd1b4 Merge pull request #479 from LudwigOrtmann/nativenet_lenchck
Nativenet length check and cleanup
2014-01-10 01:47:35 -08:00
Oleg Hahm
fe575d52df Merge pull request #364 from OlegHahm/float_stack_sizes
added a dedicated stacksize for float printfs
2014-01-09 10:48:38 -08:00
Thomas Eichinger
dadd64e2f9 Merge pull request #473 from LudwigOrtmann/nativenet_osx_xmas
add io signal generating child for nativenet in osx
2014-01-09 07:14:34 -08:00
Ludwig Ortmann
83db6f6364 remove superflous include 2014-01-09 12:33:02 +01:00
Ludwig Ortmann
76b017aefd check payload length validity
make sure the payload does not exceed the amount of data received
2014-01-08 14:58:57 +01:00
Ludwig Ortmann
ac0ec1f6b3 nativenet clean up
Make nativenet tap payload type consistent with radio_packet_t
Also remove a trailing space
2014-01-08 14:57:11 +01:00
Ludwig Ortmann
98d1136761 update native README 2014-01-07 10:20:58 +01:00
Oleg Hahm
775c0dee5c added missing mute prefixes in nativenet and shell 2014-01-05 16:11:08 +01:00
Oleg Hahm
9df07f9238 muting compiler and binutils optionally
Instead of muting all compiler and other binutils output by default,
introduce a variable to make this behaviour configurable.
2014-01-05 16:11:08 +01:00
Oleg Hahm
c7d985d371 removed redundant include pathes from Makefiles 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
Ludwig Ortmann
ea8b735232 fix nativenet_send documentation 2013-12-24 11:57:54 +01:00
Ludwig Ortmann
648bdaeed6 add io signal generating child for nativenet in osx 2013-12-24 11:54:00 +01:00
Ludwig Ortmann
1ac1646837 further clean up / filtering for cpu 2013-12-23 00:18:21 +01:00
Ludwig Ortmann
cf87e647c0 make native includes RIOT posix compatible 2013-12-22 23:26:54 +01:00
Ludwig Ortmann
ef315ed662 improve nativenet send functions return type 2013-12-21 16:56:42 +01:00
Ludwig Ortmann
751cfe6475 fix native hwtimer
The hardware timer used relative offsets that were never updated
before. This leads to two problems:
a) later timers will get pushed into the future by the amount of
   previous timers
b) if a short timer is set continuously, a longer timer will never be
   called

Example:
a)
Timer a with 500 ms is set, timer b with 600 ms is set.
timer a expires after 500 ms, timer b will be set to expire in 600 ms
which totals to 1100 ms.
b)
Timer a is set to 500 ms, timer b is set to 600 ms.
Timer a expires and is set again. Now timer a will expire in 500 ms
and timer b will be pushed further into the future. Repeating this
will lead to b never expiring.
2013-12-20 18:55:47 +01:00
Martin Lenders
69809928d3 Make UART0_BUFSIZE configurable by CPU 2013-12-20 11:10:42 +01:00
Oleg Hahm
903ec54a43 making include directives consistent 2013-12-19 15:31:37 +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
Christian Mehlis
2a9aac7f0b Merge pull request #423 from OlegHahm/fix_warnings
Fix warnings
2013-12-18 12:02:37 -08:00
Oleg Hahm
2cdfc5b585 Merge pull request #382 from OlegHahm/transceiver_return
transceiver return signed values for sending
2013-12-18 09:33:32 -08:00
Oleg Hahm
d87d827d88 transceiver return signed values for sending
negative values indicate an error value
2013-12-18 18:22:59 +01:00
Oleg Hahm
227c847135 put prototype for thread_yield() in core/include 2013-12-18 17:47:49 +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
Ludwig Ortmann
0817675f5e fix native hwtimer unsetting
reverts bug introduced by 2bfb062
2013-12-14 00:12:47 +01:00
Ludwig Ortmann
d03d7b1773 clean up native hwtimer 2013-12-14 00:07:49 +01:00
Oleg Hahm
72586f7a6d limit maximum payload size to 255 for nativenet if 6lowpan is used 2013-12-13 18:53:48 +01:00
Christian Mehlis
2bfb06230a fix: native hwtimer backend emulation
searching for the next pending timer was broken
this commit rewrites this functionality
2013-12-11 16:22:14 +01:00
Christian Mehlis
b17ffabce5 reduce minimal timer from 100ms to 10ms 2013-12-10 22:08:49 +01:00
Ludwig Ortmann
916757cf4c implement err.h
valgrind reported invalid reads/writes with glibc err[x]|warn[x] (in
glibc printf) when stdio had been redirected in between.

define _progname (pointing to argv[0])
2013-12-10 17:00:01 +01:00
Ludwig Ortmann
864267f238 daemonization, io socket and file redirection 2013-12-10 17:00:01 +01:00
Christian Mehlis
faa7b0c702 Merge pull request #394 from LudwigOrtmann/native_fix_include
fix native stdlib.h include
2013-12-03 02:26:30 -08:00
Ludwig Ortmann
2d7c328870 fix native stdlib.h include
Fixes segfault in OSX introduced by 45ffdea
2013-12-02 11:39:22 +01:00
Ludwig Ortmann
1c128f5ed6 improve valgrind section 2013-12-02 11:17:25 +01:00
Ludwig Ortmann
d6c213fb47 fix grammar in license header 2013-11-23 13:11:56 +01:00
Ludwig Ortmann
2f53c0d32f rework sigmasks
only mask signals actively being used
always enable shutdown
2013-11-23 11:21:40 +01:00
Ludwig Ortmann
0c6050a814 mask all signals in signal handler 2013-11-23 11:21:40 +01:00
Ludwig Ortmann
0a6dba11e5 mitigate against signals when signals are off 2013-11-23 11:21:40 +01:00
Ludwig Ortmann
5e1eadc353 add in_isr sighndl safeguard 2013-11-23 11:21:40 +01:00
Ludwig Ortmann
3a04671912 replace 1 with EXIT_FAILURE in all err calls 2013-11-23 11:21:40 +01:00
Ludwig Ortmann
3ca8181c73 reset context before makecontext call, check
check return value of swapcontext
2013-11-23 11:21:40 +01:00
Ludwig Ortmann
709cc9c158 add toa to packets in nativenet
also change order of fields to reflect radio types header
2013-11-22 10:55:49 +01:00
Oleg Hahm
6a1fcaf288 added a dedicated stacksize for float printfs 2013-11-21 20:41:28 +01:00
Christian Mehlis
45ffdeaf52 add missing stdlib.h include 2013-11-21 00:26:13 +01:00
Oleg Hahm
19f4f45445 added some debug output for the network stack 2013-11-14 10:46:21 +01:00
Ludwig Ortmann
01e30016d6 add lpm syscall barrier for native w/out UART 2013-11-13 23:43:26 +01:00
Ludwig Ortmann
c764728398 pre-init native hwtimer
make it behaver more like a regular timer
2013-11-13 01:31:31 +01:00
Ludwig Ortmann
1df56ed47b cope with SIGIO behaviour
SIGIO appears to be edge triggered, therefore we need to read
continuously until no more data is available
2013-11-13 00:01:42 +01:00
Ludwig Ortmann
2c7070bf0c disable interrupts for sighnd ctx switch 2013-11-13 00:01:42 +01:00
Ludwig Ortmann
9f080c54c6 fix race in thread_yield, cpu_switch_context_exit
call *context only with interrupts disabled, use isr trampoline for
this if necessary
2013-11-13 00:01:42 +01:00
Ludwig Ortmann
7b9d199ec8 make system calls safer/clean up headers
wrap some libc functions that do system calls (terminal output)
wrap read/write with syscall guard
define real_read/write (next dynamic linker find for read/write)
guard system calls in remaining code
introduce native_internhal.h
throw out some debug statements that break things
clean up includes a bit
declare board_init in native_internhal.h
add -ldl to LINKFLAGS for cpu/syscalls
2013-11-13 00:01:42 +01:00
Ludwig Ortmann
bad523831b allow for custom tap names 2013-11-08 13:59:26 +01:00
Christian Mehlis
4f4c4bfedd use radio_packet_length_t for native frames 2013-10-29 20:36:13 +01:00
Christian Mehlis
2e59096390 fix wrong error handling introduced in 945aef 2013-10-26 15:40:01 +02:00
LudwigOrtmann
37158553b9 Merge pull request #264 from LudwigOrtmann/native_hwtimer_delta
add time delta to hwtimer
2013-10-25 04:07:32 -07:00
Christian Mehlis
22a2cdaea4 Merge pull request #249 from mehlis/time-rtc
add rtc_time function
2013-10-25 03:55:06 -07:00
Ludwig Ortmann
7e02c7dd2b add time delta to hwtimer 2013-10-25 12:11:54 +02:00
Christian Mehlis
945aefad4f add rtc_time implementation for native 2013-10-25 11:53:45 +02:00
Ludwig Ortmann
7f7290a26a normalize stack defines 2013-10-25 11:40:33 +02:00
Ludwig Ortmann
944d10c07d improve native README 2013-10-24 12:58:28 +02:00
Ludwig Ortmann
45c9f92b5e implement graceful shutdown in native 2013-10-23 23:16:45 +02:00
Ludwig Ortmann
4c5273211b fix signal handler context switch 2013-10-18 14:23:58 +02:00
Ludwig Ortmann
badcf390d1 initialize processing field in nativenet tap 2013-10-13 21:23:12 +02:00
Ludwig Ortmann
81f3ddde44 free reference pointer, fix indentation 2013-10-13 20:45:35 +02:00
Christian Mehlis
ff7cf37ccd Merge pull request #230 from LudwigOrtmann/issue_154
valgrind support for native
2013-10-11 03:42:41 -07:00
Oleg Hahm
031e335e24 Merge pull request #97 from OlegHahm/makefile_windows_fixes
merged zkasmi/makefile_fixes to makefile_windows_fixes
2013-10-10 09:25:03 -07:00
Oleg Hahm
46deefe0f8 make Makefiles proof for spaces in $PATH 2013-10-09 15:28:53 +02:00
Ludwig Ortmann
21a0f39867 valgrind support 2013-10-09 15:20:59 +02:00
Ludwig Ortmann
2a031a4eca improve headline in native README 2013-10-09 15:00:51 +02:00
Ludwig Ortmann
47b6e62982 fix native ctxt switches
fix disableIRQ (remove context switch)
fix enableIRQ (make context switch delay-safe)
change interrupts-off signal-catch behaviour from error to warning
add context switch memory location warning
2013-10-04 10:44:39 +02:00
Ludwig Ortmann
43adafe55a native fix cpu_switch_context_exit 2013-10-04 10:44:39 +02:00
Ludwig Ortmann
d46a03f030 guard rtc syscall 2013-10-04 10:44:39 +02:00
Ludwig Ortmann
24b2cfd95a general clean up
make some variables volatile
remove rx_buffer_next from header
more DEBUG output
fix warnings
coding conventions
change puts to DEBUG
rename end-context/stack
2013-09-30 18:03:53 +02:00
Ludwig Ortmann
9544f617c2 fix frame padding, refactor native tap 2013-09-18 10:13:39 +02:00
Ludwig Ortmann
b3a8fdc026 Fix uninitialized packet members
also cast packet data explicitly
2013-09-04 21:02:57 +02:00
Ludwig Ortmann
f8c3e02ae6 fix nativenet payload pointer 2013-09-04 20:39:56 +02:00
Ludwig Ortmann
c2fcbb787e Fix some clang warnings in native
also cleans up a bit
2013-08-30 17:03:34 +02:00
Ludwig Ortmann
b298ab33c5 initialize rx_buffer_next explicitly 2013-08-29 17:03:22 +02:00
Ludwig Ortmann
c6180a6e4f fix NATIVE_MAX_DATA_LENGTH 2013-08-29 16:16:47 +02:00
Ludwig Ortmann
2633967708 make tapsetup.sh more verbose 2013-08-29 16:16:47 +02:00
Ludwig Ortmann
74b1a74525 documentation for nativenet interface 2013-08-29 16:16:47 +02:00
Ludwig Ortmann
37c3059e1c clean up nativenet, add src addr 2013-08-29 16:16:46 +02:00
Ludwig Ortmann
846bcc01a8 Change interface cb parameter to function pointer 2013-08-21 15:13:23 +02:00
Ludwig Ortmann
395a033de6 fix unused parameter warning in posix-rtc.c 2013-08-21 15:13:09 +02:00
Ludwig Ortmann
6fba4d7ced fix unused startup parameter warnings 2013-08-21 15:13:09 +02:00
Ludwig Ortmann
747d33e666 fix warning for sa.sa_sigaction assignments 2013-08-21 15:13:09 +02:00
Ludwig Ortmann
c1a5a3b5af fix hwtimer_arch_set_absolute return value 2013-08-18 11:25:43 +02:00
Ludwig Ortmann
52b4370e7d fix register_interrupt callback parameter 2013-08-18 11:25:43 +02:00
Christian Mehlis
f784d24fd5 add debug statement 2013-08-17 20:17:15 +02:00
Oleg Hahm
6d130a45ac updated license headers
(No code changes!)
2013-08-16 10:20:23 +02:00
Oleg Hahm
c3dcaa05a7 Merge pull request #146 from LudwigOrtmann/nativenet_osx_hack
Preliminary OSX support hack
2013-08-15 10:46:13 -07:00
Oleg Hahm
2d4de90a9c added missing header guards 2013-08-15 19:39:29 +02:00
Ludwig Ortmann
1bed4e459a Preliminary OSX support hack 2013-08-15 17:04:03 +02:00
Ludwig Ortmann
708ece68cc cc1100 -> nativenet 2013-08-15 14:05:26 +02:00
Ludwig Ortmann
a634709c00 native cc1100x_ng network
not properly passing received data to transceiver atm
2013-08-15 14:05:26 +02:00
Oleg Hahm
ec1d7b9bdf Merge pull request #139 from OlegHahm/default_stacksize
Default stacksize
2013-08-14 15:21:48 -07:00
Oleg Hahm
3ad55cce8b changed default stacksize
* the default stacksize no longer set for a thread using printf
* the stacksize for the main thread therefore adds the necessary space
2013-08-14 18:04:25 +02:00
Ludwig Ortmann
f3bbede59b fix printfs in hwtimer_cpu.c 2013-08-14 17:16:50 +02:00
Martin
63146190b3 fix changed prototype parameter 1 of thread_stack_init from void* to void(*)(void) 2013-08-09 12:19:03 +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
3adb6fa217 removed senseless include of debug.h in a header 2013-07-25 21:56:09 +02:00
Oleg Hahm
222d34d8a5 added missing include to cc110x_ng 2013-07-24 00:00:03 +02:00
Oleg Hahm
33423cdadb redefining default stack sizes dependent on the use of printf 2013-07-23 13:42:58 +02:00
Christian Mehlis
837bad38eb rename kernel_intern.h
german "intern" to english "internal"
2013-07-16 16:36:37 +02:00
Christian Mehlis
b8176f4488 fixed printf patterns 2013-07-16 15:27:19 +02:00
Ludwig Ortmann
33dde8aba8 use proper native board include 2013-07-15 20:52:53 +02:00
Oliver Hahm
c8bee9e554 fixed coding style (space after most keywords) 2013-06-24 22:37:35 +02:00
Oliver Hahm
5d70656343 fixed coding conventions (mostly by astyle) 2013-06-21 03:52:57 +02:00
Oliver Hahm
b571286574 * fixed typo 2013-06-18 17:26:53 +02:00
Oliver Hahm
ac10da4509 Merge branch 'fixes-06-14' of git://github.com/mehlis/RIOT into mehlis-fixes-06-14 2013-06-18 17:25:44 +02:00
Oliver Hahm
0d6d8390c0 * updated copyright and license headers in various files 2013-06-18 17:21:38 +02:00
Martin
d32b785816 fix inserted explicit typecasting to ucontext_t* at assignment 2013-06-14 20:21:22 +02:00
Martin
0dd314afbb fix multiple definition of TRANSCEIVER_STACK_SIZE for using with native cpu 2013-06-14 20:21:22 +02:00
Ludwig Ortmann
cad585e9dd remove context switch in native lpm_sleep
quick fix for now
2013-06-13 18:14:21 +02:00
Oliver Hahm
b8f674f5b6 fix context switch in lpm_sleep 2013-06-12 16:18:32 +02:00
Ludwig Ortmann
49228c8353 fix signal handler, ringbuffer for native FreeBSD 2013-06-03 13:23:57 +02:00
Ludwig Ortmann
4f0e4dec90 fix ucontext.h include for OSX, FreeBSD 2013-06-03 13:10:42 +02:00
Martin
d0ea87524c fixed missing include 2013-06-01 08:28:47 -07:00
Ludwig Ortmann
42f897fc4a use NSIG macro from signal.h for number of signals 2013-05-21 10:53:59 +02:00
Ludwig Ortmann
35f9062e37 inital OSX support for native port 2013-05-15 17:45:43 +02:00
Ludwig Ortmann
7bf9fa0314 increase MINIMUM_STACK_SIZE to allow for DEBUG 2013-05-15 10:46:09 +02:00
Ludwig Ortmann
c6553f6492 interrupt handling rewrite
(including uart0 integration, rt-extension removal)
2013-05-14 18:31:47 +02:00
Ludwig Ortmann
2d29a26b64 fix stack and interrupt bugs 2013-04-15 20:08:46 +02:00
Ludwig Ortmann
2f74d35709 removed posix real-time extension timers from cpu 2013-04-03 18:53:19 +02:00