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

86 Commits

Author SHA1 Message Date
Ludwig Ortmann
641cb4c488 native: add accept syscall declaration 2014-11-14 17:49:56 +01:00
Hinnerk van Bruinehsen
0e065cff2c lint: fix va_end_missing in cpu/native/syscalls.c 2014-10-31 01:24:32 +01:00
Ludwig Ortmann
b849b848a0 native: add two more syscall declarations 2014-10-01 21:56:43 +02:00
René Kijewski
a79d9c8562 native: remove redeclarations of sched_active_thread 2014-08-14 13:21:17 +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
Ludwig Ortmann
3cda0369cb native: cleanup
fix style
fix some syscall declarations
reorder syscall declarations
init syscalls in dedicated function
substitute 1 with EXIT_FAILURE
2014-07-27 15:16:38 +02:00
Ludwig Ortmann
c6bcc344ca native: uart reconnect buffer replay
When using socket stdio, add option to replay what has been written to
stdout while not connected (`-r`).

The implementation is to simply use the existing log file (which is
implicitly created when the option is used), and read from it until
EOF upon reconnect.

closes #476
2014-07-27 15:16:38 +02:00
Ludwig Ortmann
bea563d1da Fix a few cppcheck findings 2014-07-25 08:17:06 +02:00
René Kijewski
3063e3c2b1 Fix all warnings for native and qemu-i386
Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
2014-06-24 16:50:32 +02:00
René Kijewski
2f871ca885 native: remove some warnings about undef functions
This PR implements `real_X` for `X in (fork, dup2, unlink, execve)`.
These function caused warnings while making the default example.
2014-06-18 20:34:12 +02:00
René Kijewski
2e9a1773e9 native: use real_pipe() and read_close() 2014-06-14 00:39:02 +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
Ludwig Ortmann
98bbb80571 documentation: append my email to my name everywhere 2014-05-15 18:07:17 +02:00
René Kijewski
d98ebf62cd native: fixup #1145: function declaration 2014-05-14 16:54:34 +02:00
René Kijewski
8038e96d09 Merge pull request #1119 from Kijewski/error_old-style-definition
Exterminate old-style function definitions
2014-05-14 13:31:30 +02:00
Ludwig Ortmann
166b88f1ae native: internal getpid syscall 2014-05-14 09:13:57 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
Ludwig Ortmann
42aa3d9f5b native: update support for FreeBSD
works with FreeBSD 10.0 amd64/i386

fixes: #505
2014-04-20 07:31:40 +02:00
Ludwig Ortmann
9f24ae2e62 Merge pull request #946 from Kijewski/native-write
native: don't use RIOT read/write in UART
2014-04-09 18:17:09 +02:00
René Kijewski
0b75a11291 native: don't use RIOT read/write in UART 2014-03-30 22:33:50 +02:00
Ludwig Ortmann
8ef02d3b9d native profiling support
only works with Linux for now
2014-03-14 12:50:50 +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
Ludwig Ortmann
86812c2abb make calloc "usable" early on
closes #741

Old versions of the gnu libc uses calloc to allocate dymanic memory
when some error occurs in dlsym.
This results in a segfault as natives calloc wrapper has not been
initialized yet.
As this is a circular dependency and the libc can cope with this, we
just return NULL from the calloc wrapper and hope for the best.

Recent libc versions use a static buffer instead.
2014-02-22 13:08:45 +01:00
René Kijewski
2349d0806e "Exterminate } else {" 2014-02-16 23:29:47 +01:00
Ludwig Ortmann
fd083c95a6 check for active_thread != NULL in syscalls.c before using it
fixes #498
2014-01-31 09:31:22 +01:00
Ludwig Ortmann
a55e85f8d0 guard swapcontext in _native_syscall_leave 2014-01-29 18:44:42 +01:00
Ludwig Ortmann
3c087107f2 fix call to err() 2014-01-29 16:54:36 +01: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
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
d6c213fb47 fix grammar in license header 2013-11-23 13:11:56 +01:00
Ludwig Ortmann
0a6dba11e5 mitigate against signals when signals are off 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
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