Commit Graph

11 Commits

Author SHA1 Message Date
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Gregory Nutt 98f431d8d8 net/: Run all .c files under net/ through tools/nxstyle and fix all resulting complaints. 2020-01-11 13:41:33 -03:00
Xiang Xiao 6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt 3b275fcf4e net/: Run nxstyle against all C files. 2019-10-25 11:31:42 -06:00
Gregory Nutt f6b00e1966 tools/nxstyle.c: Fix logic error that prevent detecion of '/' and '/=' as operators. net/: Minor updates resulting from testing tools/nxstyle. 2019-03-11 12:48:39 -06:00
Dmitriy Linikov a8c58607e9 Merged in hardlulz/modem-3.0-nuttx/fix-sem-EINTR (pull request #603)
Added ECANCELED condition to DEBUGASSERT-s checking sem_wait result

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2018-02-20 18:24:53 +00:00
Juha Niskanen c0bf0b4d9d net/usrsock: fix compiler warnings, mostly about nxsem_post 2017-10-25 07:31:14 -06:00
Gregory Nutt 42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Jussi Kivilinna 547733cbb0 Update net_timedwait() and net_lockedwait() call sites to handle negated errno in return value 2017-09-04 07:56:51 -06:00
Gregory Nutt d5207efb5a Be consistent... Use Name: consistent in function headers vs Function: 2017-04-21 16:33:14 -06:00
Jussi Kivilinna cd3c9634c8 Add user-space networking stack API (usrsock)
User-space networking stack API allows user-space daemon to
provide TCP/IP stack implementation for NuttX network.

Main use for this is to allow use and seamless integration of
HW-provided TCP/IP stacks to NuttX.

For example, user-space daemon can translate /dev/usrsock
API requests to HW TCP/IP API requests while rest of the
user-space can access standard socket API, with socket
descriptors that can be used with NuttX system calls.
2017-03-31 08:58:14 -06:00