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

296 Commits

Author SHA1 Message Date
Francois Berder
c787638696 posix: sockets: Implement SO_RCVTIMEO option in setsockopt
AwaLWM2M needs to be polled regularly to check for incoming data.
Since RIOT only supports timeout at the GNRC sock layer while
the network abstraction for RIOT in AwaLWM2M uses the posix layer,
this causes RIOT to be blocked waiting for data that never arrive.

This commit implements only the SO_RCVTIMEO option in setsockopt to
allow users to set a receive timeout for a socket at the posix layer.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-23 09:59:46 +00:00
Sebastian Meiling
4730933117 Merge pull request #6763 from miri64/posix/fix/unistd
posix: fix close() if fd_obj was closed already
2017-03-20 16:13:21 +01:00
Martine Lenders
bac4118d68 posix: fix close() if fd_obj was closed already 2017-03-20 09:43:55 +01:00
Martine Lenders
465f8e42a1 posix_sockets: fix assertion on close 2017-03-20 09:37:26 +01:00
Martine Lenders
4a51d1b433 Merge pull request #6697 from francois-berder-imgtec/awalwm2m
posix: sockets: Small fixes for listen and recvfrom functions
2017-03-11 19:22:35 +01:00
Oleg Hahm
d48330acbb doc: posix: fix doxygen complaints 2017-03-10 14:56:28 +01:00
Joakim Nohlgård
887cc72365 Merge pull request #5616 from gebart/pr/vfs
vfs: file system abstraction
2017-03-09 09:44:56 +01:00
Joakim Nohlgård
89ba41c79e sys/posix: Add sys/statvfs.h 2017-03-07 17:59:57 +01:00
Francois Berder
27dec749e8 posix: sockets: Fix return value of recvfrom and sendto
_bind_connect already sets errno and returns -1 or 0.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-07 16:42:21 +00:00
Francois Berder
8d2ec19be6 posix: sockets: Fix timeout regression of recvfrom
Commit de41971aab sets the default
timeout to 0. This change should not have been part of the commit.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-07 11:07:16 +00:00
Francois Berder
8f839fbc31 posix: sockets: address was not set in recvfrom
The address is an optional parameter of recvfrom. If it is
not null, recvfrom must store the address of the sender.
However this was only allowed if res was equal to 0, which
is wrong since res contains the number of bytes received
or -1.
This commit ensures that the address is set only if no
previous errors happened before.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-07 11:06:01 +00:00
Joakim Nohlgård
03d9f0f3d8 sys/posix: Add fcntl.h 2017-03-07 10:21:53 +01:00
Oleg Hahm
6022760fc6 posix: missing closing parenthesis 2017-03-06 22:37:28 +01:00
Francois Berder
2936a69a1b posix: sockets: Fix return value of listen function
If an error happens, listen was returning 1 instead of -1.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-06 13:26:51 +00:00
Francois Berder
a5003e8311 posix: in: Fix sockaddr_in6 structure
The sin6_family member was an int. This caused the structure to
take 32 bytes which was greater than sockaddr_storage size (28
bytes).
Using the type sa_family_t for sin6_family member fixes this
issue.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-03 16:49:54 +00:00
Francois Berder
de41971aab posix: sockets: Fix return value of sendto and recvfrom
The return value of these functions was not always correct
in case of errors: they were not returning -1 and setting
errno.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-03-03 15:52:22 +00:00
Joakim Nohlgård
f055137e02 sys/posix: Add missing Doxygen comment on spinlock flag member 2017-02-08 16:23:51 +01:00
Joakim Nohlgård
597db0358d sys/posix/pthread: Use C11 atomic instead of atomic.h 2017-02-08 16:23:49 +01:00
Martine Lenders
4f5d046622 doc: net: replace doc references of conn with sock 2017-02-07 13:32:20 +01:00
Martine Lenders
1ccdc4643f posix_sockets: port to sock 2017-01-24 15:17:15 +01:00
Oleg Hahm
3c6678b037 *: fix mismatching endifs for header guards 2017-01-19 18:30:53 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Oleg Hahm
4f4214235b timex: unambiguous time conversion macros 2017-01-19 13:18:08 +01:00
Victor Arino
066db5857a sys/posix: adapt semaphore to new implementation 2017-01-19 08:59:17 +01:00
Philippe Coval
20c3aaa448 sys: Fix pthread includes to support avr-libs
Missing malloc.h and clock_id_t were causing issues to build.

It was tested with this configuration:

- linux ubuntu 14.04.5
- arduino-mega2560 board
- avr-libc-1.8.0-4.1

This change was needed to build iotivity example

Bug: https://github.com/RIOT-OS/RIOT/issues/6241
Change-Id: I82ce246093b3467dfe9746f999bcc9335dbb65f6
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2017-01-17 19:44:22 +01:00
2121c6effd sys: posix: remove not needed strings.h 2016-12-22 12:25:31 +01:00
Joakim Nohlgård
7c48c891a0 xtimer: Update xtimer usage to match API changes 2016-11-29 20:44:31 +01:00
Laurent Navet
5fe337bc6c sys: fix include headers guards 2016-10-26 21:53:58 +02:00
7718f114cb all: remove pointer casts for msg.content.ptr 2016-06-02 23:13:42 +02:00
DipSwitch
21edec412a posix: Remove _t from struct names 2016-04-11 21:46:54 +02:00
f626ee5969 Merge pull request #4557 from kaspar030/introduce_intrusive_singly_linked_list
core: mutex: several optimizations
2016-03-29 22:25:43 +02:00
c0f39bb55f sys: posix: pthread: fix mutex usage 2016-03-29 21:50:17 +02:00
Yonezawa-T2
1ce140d910 debug: fix compilation error for %p formatter 2016-03-29 11:46:29 +09:00
kYc0o
f92b025b85 vtimer: get rid of 2016-03-24 17:10:54 +01:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
Oleg Hahm
bdcf8879fd core: merged kernel_macros.h and attributes.h
Merged into new kernel_defines.h and updated all includes.
2016-03-09 22:29:06 +01:00
Oleg Hahm
b61b8e9f00 sockets: add documentation about implicite binding 2016-03-08 19:48:20 +01:00
c3fe4615bd sys: posix: posix_semaphore: adapt to thread.h 2016-03-05 18:20:17 +01:00
2b010b5337 core: rename tcb_t -> thread_t, move into thread.h 2016-03-05 18:20:17 +01:00
Martine Lenders
327f7c442c Merge pull request #4816 from kaspar030/rename_genrand
sys: random: rename genrand_* to random_*
2016-03-01 13:58:39 +01:00
ded39b461e sys: random: rename genrand_* to random_* 2016-02-29 21:33:17 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
Oleg Hahm
94231241ec posix sockets: missing includes for conn 2016-02-25 10:42:50 +01:00
Oleg Hahm
35074a6ad1 posix socket: align size of sa_family_t with Linux
Linux defines `sa_family_t` as `unsigned short int`. In order to be compatible with Linux code, RIOT should define it the same way.
2016-01-07 11:12:35 +01:00
Oleg Hahm
c811380440 Merge pull request #4468 from cgundogan/pr/posix_sockets/close_fd_fix
posix_sockets: fix overflowing fd in close()
2015-12-12 12:13:51 +01:00
Cenk Gündoğan
0ddfffc0c2 posix_sockets: fix overflowing fd in close() 2015-12-12 04:24:23 +01:00
Cenk Gündoğan
6f92b056f9 posix_sockets: do not use the address of best_match 2015-12-12 02:51:00 +01:00
Oleg Hahm
e8ed9fbe83 Merge pull request #4386 from OlegHahm/posix_sockets_stream_fixes
POSIX sockets: implicit bind for connect()
2015-12-08 16:35:29 +01:00
Oleg Hahm
11add4d8fd sockets: implicit bind for connect()
According to
http://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html
for a "socket [that] has not already been bound to a local address,
connect() shall bind it to an address which, unless the socket's address
family is AF_UNIX, is an unused local address."
2015-12-08 11:57:20 +01:00
Hauke Petersen
41979b64cd sys: adapted to renamed THREAD FLAGS 2015-12-07 22:09:47 +01:00
Oleg Hahm
b366e59c87 conn: add function to find the best source address
...and use it in POSIX sendto() function.
2015-12-02 18:11:55 +01:00
Cenk Gündoğan
315ae0eeb4 Merge pull request #4326 from OlegHahm/posix_sockets_dgram_fixes
posix sockets: recvfrom on connectionless transports
2015-12-02 17:21:27 +01:00
Oleg Hahm
860321c3e9 posix sockets: use network byteorder for port 2015-12-02 14:45:43 +01:00
Oleg Hahm
5f663826c7 posix sockets: remove pointless inline function 2015-12-02 14:45:43 +01:00
Oleg Hahm
c366f2bbcd sockets: perform implicit bind during sendto()
A client should not require to explicitly call bind() to receive packets, but is expected to receive replies sent to the ephemeral port that was selected as a source port by the UDP implementation.
2015-12-02 14:45:43 +01:00
Oleg Hahm
0153933241 posix sockets: store src_port in socket struct 2015-12-02 14:38:52 +01:00
René Kijewski
ab3345ac5a Merge pull request #4321 from kaspar030/cleanup_posix
sys: cleanup posix compat code
2015-11-26 20:39:30 +01:00
Oleg Hahm
56903f3385 Merge pull request #4325 from OlegHahm/posix_socket_recvfrom_init
posix sockets: initialize sockaddr properly to 0
2015-11-26 12:00:16 +01:00
Oleg Hahm
7efc8fd265 posix sockets: initialize sockaddr properly to 0 2015-11-26 11:25:40 +01:00
Martine Lenders
21ea7cc4ae posix_semaphore: port to xtimer 2015-11-24 14:06:00 +01:00
8a61ef4c75 sys: posix: switch to xtimer for sleep/usleep 2015-11-20 00:54:29 +01:00
41ece232fa sys: remove obsolete posix_io code 2015-11-20 00:43:57 +01:00
Martine Lenders
45b30a8e91 posix_semaphore: make API POSIX compliant 2015-10-28 17:16:23 +01:00
Martine Lenders
5cef6bcc0a sema: apply rename to function and type names 2015-10-28 17:16:22 +01:00
Martine Lenders
ee4f79482a sem: rename to sema
To prevent name colisions with POSIX semaphores
2015-10-28 17:16:22 +01:00
Oleg Hahm
a0dcbc6a3c posix: sockets: use correct datatypes for in6_addr
in6addr_any and in6addr_loopback are of type in6_addr
2015-10-27 11:39:11 +01:00
Martine Lenders
cffdb1c8e2 timex: introduce USEC_IN_NS constant 2015-10-21 19:45:58 +02:00
Martine Lenders
de421cdf78 posix: use sem module for semaphore implementation 2015-10-19 14:12:31 +02:00
effb15a2cc Merge pull request #3313 from gebart/pr/eINT-fixes
eINT/dINT fixes
2015-09-29 12:39:16 +02:00
Oleg Hahm
6f720306c9 doc: pnet should be part of POSIX sockets 2015-09-25 21:07:16 +02:00
Martine Lenders
624530c7d0 posix: redo socket API to use conn 2015-09-22 22:24:52 +02:00
Joakim Nohlgård
98c465008b all: Update @gebart family name, email 2015-09-20 13:47:39 +02:00
Joakim Gebart
0cfe6d15dc sys/posix/pthread: Replace dINT by disableIRQ 2015-09-19 10:35:58 +02:00
Martine Lenders
08a3f0baf5 posix: net_help: move inet_pton/inet_ntop completely to POSIX 2015-09-17 02:36:08 +02:00
Martine Lenders
1486967a4b posix: remove strcasecmp functions and macros 2015-09-16 15:40:58 +02:00
6f21fd806c sys: posix: pthread_cond: remove unnecessary define 2015-09-16 10:58:54 +02:00
Martine Lenders
a4905b72d4 posix: consolidate include paths 2015-09-07 16:46:48 +02:00
a13bc46f3e sys: remove uart0 2015-09-04 17:46:23 +02:00
Martine Lenders
ac0e2f4371 net: remove redefinitions and their dependencies throughout the stack 2015-08-24 13:13:53 +02:00
Martine Lenders
58ff31bfe9 gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00
Martine Lenders
203561e741 ipv6_addr: remove ng_ prefix 2015-08-11 13:27:07 +02:00
8f51256be8 sys: net: pnet: turn into dummy implementation based on gnrc 2015-08-06 12:13:19 +02:00
c926e2c38a sys: posix_io: bail out on invalid target thread 2015-07-15 14:57:33 +02:00
Joakim Gebart
ab9d924c67 sys/posix/pthread: use atomic_int_t for pthread_spinlock_t 2015-07-14 08:11:18 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
Joakim Gebart
718664dacc sys/posix/pthread: Use atomic_int_t to handle spin lock 2015-05-26 21:23:48 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Lucas Jenss
426170b064 Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00
Joseph Noir
e3a5bb25af Add fix for clockid_t on OS X 2015-04-16 11:43:51 +02:00
kushalsingh007
cf75c04b41 fd: Clean-up documentation and rename members
-Fixes  #1759
-Changes fd_t::__active to fd_t::internal_active
-Changes fd_t::fd to fd_t::internal_fd
-Made changes in the associated files that use the above fields.
2015-03-12 10:31:37 +05:30
Joseph Noir
f614d4b186 Merge pull request #1222 from BytesGalore/add_pthread_simple_tls
Everything seems to work, so here we go: sys:posix:pthread added dynamic pthread thread local storage
2015-03-03 22:38:27 +01:00
José Roberto de Souza
237e3f4dcb sys/posix: fix strncasecmp
This should be a OR or when comparing only parts os strings would
return a wrong value.

const char *first = "testA";
const char *second = "test";
uint8_t contains = strncasecmp(first, second, strlen(second));
2015-02-23 11:24:01 -03:00
Martine Lenders
0eb2d78dda doc: use my real name 2015-02-08 18:52:16 +01:00
Martin Landsmann
6e90ad6d73 sys/posix/pthread: added dynamic pthread thread local storage 2015-01-27 23:04:12 +01:00
Ludwig Ortmann
0027f90be4 Merge pull request #2118 from OlegHahm/simplify_cpu_folder_structure
cpu: simplify folder structure
2014-12-08 13:10:13 +01:00
Oleg Hahm
26ab4829d7 doc: fix posix wrapper documentation 2014-12-06 02:05:51 +01:00
Oleg Hahm
0ccf1043de doc: fixed broken doxygen references 2014-12-04 17:16:57 +01:00
Oleg Hahm
0c967c4d3f cpu: msp430: renamed msp430x16x to msp430fxyz 2014-12-02 17:46:57 +01:00
Oleg Hahm
d92e9af91c doc: fixed broken param descriptions 2014-11-30 22:34:50 +01:00
Oleg Hahm
df9c09d946 doc: fixed typos and other misspellings 2014-11-30 21:32:12 +01:00
René Kijewski
682af155e0 posix: Fix missing restoreIRQ() in sem_post() 2014-11-21 14:33:28 +01:00
René Kijewski
f89e1f4a3d c++: s/restrict/__restrict/
`restrict` is not a keyword in C++, but `__restrict` is understood by
GCC-ish compilers.
2014-11-19 14:27:19 +01:00
Oleg Hahm
037571445c Merge pull request #1974 from OlegHahm/cleanup_licenses
licenses: fix miss-spelled & missing boiler plates
2014-11-10 19:53:40 +01:00
Oleg Hahm
39abba1bc2 licenses: fix miss-spelled & missing boiler plates 2014-11-10 18:59:55 +01:00
BytesGalore
de3c3cebd0 c++: sys: add extern C to header files 2014-11-08 20:09:55 +01:00
Ludwig Ortmann
eceb656c49 core,sys: fix storage types for irq API usage
* should not have any effect as long as `unsigned` and `int` are compatible
* also fix two cosmetic `unsigned int` -> `unsigned` for consistency
2014-10-27 16:25:23 +01:00
René Kijewski
677d690e2b core: introduce thread_yield_higher(), yield less
Fixes #1708.

Currently involuntary preemption causes the current thread not only to
yield for a higher prioritized thread, but all other threads of its own
priority class, too.

This PR adds the function `thread_yield_higher()`, which will yield the
current thread in favor of higher prioritized functions, but not for
threads of its own priority class.

Boards now need to implement `thread_yield_higher()` instead of
`thread_yield()`, but `COREIF_NG` boards are not affected in any way.

`thread_yield()` retains its old meaning: yield for every thread that
has the same or a higher priority.

This PR does not touch the occurrences of `thread_yield()` in the periph
drivers, because the author of this PR did not look into the logic of
the various driver implementations.
2014-10-24 00:09:56 +02:00
Ludwig Ortmann
e40f4c1912 native/freebsd: fix usecond typdef 2014-10-08 16:11:15 +02:00
Oleg Hahm
a50d44c195 posix: configure stdio only to uart0 if enabled 2014-10-07 12:14:14 +02:00
Oleg Hahm
218635027c Merge pull request #1508 from cgundogan/transport_layer_refactoring
transport_layer: Splitting UDP and TCP
2014-09-11 20:49:34 +02:00
Cenk Gündoğan
710c7e6cf6 transport_layer: Splitting UDP and TCP
Currently, the tcp and udp implementations are bound to each other in a
module called *destiny*. Thus, when using only one of them then the
other one gets also compiled into the binary and initialized,
which results in unnecessary RAM usage and workload for the CPU.

The approach in this PR defines a common module named *socket_base*,
which contains functions used by the posix layer. Compiled by it's own,
those functions return negative error codes, to symbolize upper layers
that they are not supported. When also including the modules *udp* or
*tcp* respectively, functions from *socket_base* get overwritten with the
correct functionality.

Defining *udp* or *tcp* in a Makefile also includes *socket_base*.
Defining *pnet* in a Makefile also includes *socket_base*.
2014-09-11 20:07:46 +02:00
Oleg Hahm
70ec73b038 Merge pull request #1561 from BytesGalore/fix_fd_parameter_warnings
sys/posix: changed parameters for `fd` from `kernel_pid_t` to `int`
2014-09-11 15:37:04 +02:00
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
René Kijewski
f3fcc1d5dd pthread: pthread_barrier should call yield 2014-08-11 16:22:38 +02:00
Martin Landsmann
28f4e510ad changed parameters form kernel_pid_t to int 2014-08-11 13:10:12 +02:00
Oleg Hahm
1de5c2b4a0 fixed remaining variables to kernel_pid_t 2014-08-07 17:29:53 +02:00
Oleg Hahm
74fbff1df2 net: changed name of internal variable
To avoid naming conflicts + made variable static and volatile as it
should be.
2014-08-07 16:31:27 +02:00
Oleg Hahm
0ad7b170ed make kernel_pid_t comparisons consistent 2014-08-07 16:31:27 +02:00
Oleg Hahm
aa2ecf6216 initialize kernel_pid_t correctly 2014-08-07 16:31:27 +02:00
Oleg Hahm
c2b0423918 core: renamed KERNEL_PID_NULL to KERNEL_PID_UNDEF
As @authmillenon pointed out the "null" in the old name is somewhat
misleading, since the actual value is -1.
2014-08-07 16:31:27 +02:00
Ludwig Ortmann
c2b2e4554b core/queue: queue -> priority_queue
Rename queue to priority queue, because that's what it is.
2014-08-05 17:57:45 +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
3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 2014-07-31 22:57:20 +02:00
Cenk Gündoğan
ca5b45e264 converting tabs to spaces in sys (#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:51:50 +02:00
Ludwig Ortmann
b8aa5dbaf8 Merge pull request #1496 from LudwigOrtmann/osx-fixup
native: reenable compilation on osx
2014-07-31 07:32:07 +02:00
René Kijewski
4032a22719 queue: add queue_t root type 2014-07-30 21:10:22 +02:00
Ludwig Ortmann
3d6124c905 native: reenable compilation on osx 2014-07-30 10:23: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
Sebastian Sontberg
af3c54e3a2 pnet: Fix INADDR_ANY and INADDR_BROADCAST
INADDR_ANY and INADDR_BROADCAST should not be initializers.
2014-07-14 14:13:13 +02:00
René Kijewski
ba1a15535b core: remove extra thread_create_arg() function 2014-07-09 10:28:23 +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
Christian Mehlis
2350809536 pnet: silence unused argument warnings 2014-06-11 13:36:41 +02:00
René Kijewski
05a4bf7f04 Merge pull request #1057 from Kijewski/sched_switch-current_prio
core: imply current_prio in `sched_switch()`
2014-06-03 15:59:23 +02:00
Cenk Gündoğan
56298378ee pnet: accept should return a new generated file descriptor
From man page:
On success, these system calls return a nonnegative integer that is a
descriptor for the accepted socket. On error, -1 is returned, and errno
is set appropriately.
2014-06-02 18:53:51 +02:00
Martin Lenders
2362623490 Fix trailing whitespaces
Fixes #1138
2014-05-26 14:54:23 +02:00
René Kijewski
4e4f908379 Initial import of the x86 port
Currently this works only in qemu.
2014-05-25 13:40:29 +02:00
René Kijewski
a6fd5bff92 core: imply current_prio in sched_switch()
There is no need to supply the current priority to `sched_switch()`,
when this function can easily tell the value of
`active_thread->priority` itself.
2014-05-24 16:48:35 +02:00
Christian Mehlis
0aa87a8ee7 Merge pull request #1208 from Kijewski/issue-1199
documentation: fix doxygen for `pthread_*.h`
2014-05-20 14:19:52 +02:00
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.
2014-05-18 17:33:49 +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
2314915ff2 license: fix license header grammar
insert missing "is"
2014-05-14 09:49:09 +02:00
Martin Landsmann
61b0331980 added pthread_cond.h to pthread.h
adjusted `test_pthread_condition_variable\main.c` includes reflecting the above change
2014-05-07 07:54:54 +02:00
BytesGalore
f4a994ac89 Merge pull request #1076 from BytesGalore/remove_return_from_noreturn_function
sys:posix:pthread removed explicit `return;` from `pthread_exit()`
2014-04-30 07:50:32 +02:00
Martin
fc532ad891 added else branch in pthread_exit() to avoid calling explicit return;
however, this won't help to completely eliminate the warning on returning from a `noreturn` function
2014-04-30 07:22:48 +02:00
Martin
619039e0e2 add pthread condition variable implementation 2014-04-29 18:39:03 +02:00
BytesGalore
9d4d98c9ea Merge pull request #1025 from BytesGalore/add_out_of_bounds_check
sys:posix:pthread added check to avoid array out of bound access
2014-04-25 18:00:07 +02:00
Martin
345e76a0d7 added check to avoid array out of boud access 2014-04-25 17:57:41 +02:00
René Kijewski
9a5a8a2452 Add pthread_rwlock test 2014-04-18 16:26:12 +02:00