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

269 Commits

Author SHA1 Message Date
MrKevinWeiss
0fd3cbfa0b sys/posix: Add posix_inet module to kconfig 2021-03-09 09:15:59 +01:00
MrKevinWeiss
b8eb12d43b sys/posix_sleep: add module to Kconfig 2021-02-15 12:24:38 +01:00
Hauke Petersen
606bcd66da posis/semaphore: use sema_get_value() 2021-01-15 16:17:25 +01:00
f496aef7cc
sys/posix/fcntl: fix headerguard 2021-01-11 13:48:09 +01:00
1d5e2e9cd9 all: remove traces of kernel_types.h
Automatically removed using:

    $ git grep -l kernel_types | xargs sed -i '/^#include .kernel_types/d'
2020-11-25 17:52:34 +01:00
Martine Lenders
cc10d31391
Merge pull request #15305 from aabadie/pr/sys/posix_sleep
sys/posix: rename posix_time to posix_sleep
2020-11-05 16:36:25 +01:00
Bas Stottelaar
922e2ac1c9 sys/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:49:39 +01:00
abcdc7968a
sys/posix/sleep: use ztimer instead of xtimer 2020-10-27 15:20:33 +01:00
68a2a5dab0
sys: tests: rename posix_time to posix_sleep 2020-10-27 15:20:33 +01:00
Bas Stottelaar
1b35d06a51 sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
13a897e2c7
sys/posix/pthread: fix typo 'defore' -> 'before' 2020-10-02 08:15:31 +02:00
benpicco
9f2475dc14
Merge pull request #14832 from maribu/sys-cleanup
sys: Cleanup access to internal variables
2020-08-26 17:07:19 +02:00
Marian Buschsieweke
3b6fa61829
sys: Cleanup access to internal variables
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:

1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
   functions
2020-08-24 20:28:11 +02:00
Keith Packard
e215261ced picolibc: Use most NEWLIB code with picolibc
In most places, picolibc and newlib are the same, so use
the existing newlib code when compiling with picolibc.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-08-24 08:26:16 -07:00
26c1920cf1 posix/select: Add picolibc to cyclic dependency resolution 2020-08-24 08:26:16 -07:00
30cf61dd35 cpu/msp430: remove obsolete msp430 specific headers 2020-08-05 14:29:07 +02:00
Martine S. Lenders
6ba6740231
posix_select: initial import of select() function 2020-07-01 18:10:26 +02:00
Martine S. Lenders
af24c539d0
posix_sockets: count available received messages asynchronously
Utilizing `sock_async`
2020-07-01 13:36:36 +02:00
Martine S. Lenders
791069acf1
posix_sockets: provide function to check if file descriptor is a socket 2020-07-01 13:36:36 +02:00
Martine S. Lenders
c7dc0bb8de
posix_sockets: use vfs_file_get() to resolve file descriptor 2020-07-01 13:36:36 +02:00
Frank Engelhardt
356c8008dd posix_sockets: use sin6_scope_id field to specify netif 2020-06-15 11:23:46 +02:00
09748efc11 sys/posix: fix typos 2019-11-23 22:39:38 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Martine Lenders
ea4b78654f
Merge pull request #12285 from JulianHolzwarth/pr/posix/pthread/pthread_reaper_fix
sys/posix/pthread/pthread.c: fix pthread reaper
2019-10-29 18:56:36 +01:00
Benjamin Valentin
764a9e9f63 sys/pthread: check return value of malloc()
To prevent a NULL pointer dereference on a memory constrained system,
check if malloc() was actually successful.
2019-10-20 14:17:07 +02:00
Gaëtan Harter
a889e500f0 pthread: make pthread reaper stacksize configurable
new define 'CONFIG_PTHREAD_REAPER_BASE_STACKSIZE' to change pthread reaper for boards that need more stack
default value is 'THREAD_STACKSIZE_IDLE'
2019-09-25 16:14:29 +02:00
JulianHolzwarth
a4d0c8a8e7 sys/posix/pthread/pthread.c: reduce pthread reaper size 2019-09-20 15:07:49 +02:00
JulianHolzwarth
d6bc8685f7 sys/posix/pthread/pthread.c: create thread sleeping
creating the pthread sleeping and waking it up instead of THREAD_CREATE_WOUT_YIELD and then yielding(sched_switch)
2019-09-20 15:07:49 +02:00
JulianHolzwarth
28719bae37 sys/posix/pthread/pthread.c: check reaper creation
Checking whether or not the pthread reaper was created
And handeling the error when it was not created
2019-09-20 15:07:49 +02:00
JulianHolzwarth
31b3aeb48c sys/posix/pthread/pthread.c: Reaper fix
before the reaper was never created
2019-09-20 15:07:48 +02:00
Gaëtan Harter
624957252e
pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr
This enables 'pthread' support on arduino.

avr-libc C90 'time.h' does not include 'sys/types.h' as POSIX expects it.
However, the type previously defined conflicts with the one in
'cpu/atmega_common/avr_libc_extra/include/sys/types.h' when both are
included, so include 'sys/types.h'.

Maybe it should alway be included by 'time.h' but this
would need its specific review.
2019-09-11 18:25:10 +02:00
Juan I Carrano
00e0a1cf13
Merge pull request #12056 from JulianHolzwarth/pr/posix/pthread/small_insert_fix
sys/posix/pthread/pthread.c: fix thread count limiting in pthread_create()
2019-09-11 18:22:54 +02:00
JulianHolzwarth
d76bb689d6 sys/posix/pthread/pthread.c: pthread_create fix
The function insert returns KERNEL_PID_UNDEF now because pthread_create checks for it.
In pthread_create it checks now if thread_create returns a valid pid
2019-09-06 15:54:59 +02:00
Daniele Lacamera
5cb76e521b posix_socket: set sock for returned socket on accept() 2019-08-30 21:18:25 +02:00
Martine Lenders
af5bf360a0
Merge pull request #11575 from miri64/posix_socket/fix/init-uninit-fields
posix_socket: initialize uninitialized fields
2019-08-08 15:56:48 +02:00
Martine Lenders
3bcb1ee2ef posix_socket: initialize uninitialized fields 2019-08-08 15:03:28 +02:00
998fd6bcc9
sys/pthread: deduplicate pthread group definition 2019-08-05 16:57:36 +02:00
Martine Lenders
a9ae2f4ac9 posix_sockets: set read/write permissions for socket fd 2019-05-24 15:58:50 +02:00
Olaf Bergmann
83e2932eb6 posix_sockets.c: fix send()/write() for connected UDP sockets
Calling send() or write() on a connected UDP socket raises a
kernel panic in posix_sockets.c, line 215, because _sockaddr_to_ep()
is called from socket_sendto() with address set to NULL.

This change modifies socket_sendto() to

* Check if the UDP socket is connected when the address argument
  is NULL.
* If connected, use the stored remote endpoint for sock_udp_send().
2019-04-10 11:19:13 +02:00
Juan Carrano
6b766c3cd3 sys/posix: make posix module provide only headers.
The build system contains several instances of
 INCLUDES += -I$(RIOTBASE)/sys/posix/include

This is bypassing the module management system, by directly accesing
headers without depending on a module. The module is the posix module.

That line is also added when one of the posix_* modules is requested.

According to the docs, the posix module provides headers only, but in
reality there is also inet.c.

This patch:

- Moves `inet.c` into `posix_inet`, leaving `posix` as a headers-only
  module.
- Rename `posix` as `posix_headers` to make it clear the module only
  includes headers.
- Makes `posix_*` modules depend on `posix_headers`, thus removing the
  explicit `INCLUDES+=...` in `sys/Makefile.include`.
- Ocurrences of `INCLUDES+=...` are replaced by an explicit dependency
  on `posix_headers`.
2019-03-20 12:57:13 +01:00
Jose Alamos
f2ff06c9d4 posix/pthread_rwlock: fix unsigned variable comparison 2018-08-21 13:58:39 +02:00
Gunar Schorcht
9db03537b9 core/pthread: make them compilable with g++ 2018-07-21 14:24:57 +02:00
7d013eb2b6 sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Gaëtan Harter
ed4932362d Revert "posix/osx: fix type conflict on OSX native"
This reverts commit dcebfb11bc.
2018-04-12 17:48:27 +02:00
Gaëtan Harter
ea52528171 Revert "posix/osx: fix missing AF_LINK on OSX native"
This reverts commit b5554bcc1f.
2018-04-12 17:48:21 +02:00
Gaëtan Harter
b5554bcc1f posix/osx: fix missing AF_LINK on OSX native
netdev_tap.c uses AF_LINK when compiled on OSX native.

Preparation to remove NATIVEINCLUDES.
2018-03-20 17:50:57 +01:00
Gaëtan Harter
dcebfb11bc posix/osx: fix type conflict on OSX native
In another header file, `socklen_t` is defined to `__darwin_socklen_t` which is
an `uint32_t` and it conflicts.

Preparation to remove NATIVEINCLUDES.
2018-03-20 17:50:47 +01:00
smlng
6b0491eca2 sys/posix: fix intentional fallthrough in pthread 2018-01-16 13:21:24 +01:00
702ec4a517 sys/posix: pthread_barrier: DEBUG fix 2018-01-15 14:37:04 +01:00
c6b482d56c posix: pthread_rwlock: fix DEBUG messages 2018-01-15 14:37:04 +01:00