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
Gregory Nutt
83cdb0c552
Squashed commit of the following:
...
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Jussi Kivilinna
8042c96f09
net/local: fix server lc_waitsem overflow
2017-09-01 07:47:29 -06:00
Gregory Nutt
7ebef900fb
Networking: Fix a race condition. The accept() operation is performed with the network locked. However, the network is unlocked BEFORE the connected state is set. Therefore, a context switch may occur and the socket may no longer be connected when it is marked so. Noted by Pascal Speck.
2017-08-31 07:23:19 -06:00
Jussi Kivilinna
52becb7811
net/local: fix accept for local stream sockets
2017-07-31 07:36:54 -06:00
Simon Piriou
d88dc9b2e5
net_pkt: fix typo and symbol collision
2017-07-22 09:01:24 -06:00
Gregory Nutt
c964cd4612
Socket interface: Fix some configuration chaos. Sometime CONFIG_NET_UDP/TCP was used when CONFIG_NET_LOCAL_DGRAM/STREAM was intended.
2017-07-14 12:36:54 -06:00
Gregory Nutt
b4467a5cf5
Socket I/F: Fixes to LOCAL socket interface to get sim/udgram to build.
2017-07-14 11:34:34 -06:00
Gregory Nutt
8bf8c3fa86
Socket I/F: Add address family support for poll() and sendfile()
2017-07-14 10:57:38 -06:00
Gregory Nutt
ac543648b8
Socket interface: Added getsockname[C() interfaces.
2017-07-14 09:04:19 -06:00
Simon Piriou
ac72978072
Networking: Fix typos introduced with network interface changes.
2017-07-14 06:02:49 -06:00
Gregory Nutt
5033a6def7
Socket interface: Added addref() and sockcaps() interfaces.
2017-07-13 13:36:18 -06:00
Gregory Nutt
833ee2275d
Socket interface: Added close() interface.
2017-07-13 12:15:15 -06:00
Gregory Nutt
0c840ed22f
Socket interface: Added listen() and accept() interfaces.
2017-07-13 11:15:00 -06:00
Gregory Nutt
85b1ae4cf0
Socket interface: Added bind() and connect() interfaces.
2017-07-13 09:28:18 -06:00
Gregory Nutt
a71c504142
Socket I/F: Add recvfrom() method to interface.
2017-07-12 17:36:05 -06:00
Gregory Nutt
1b9cb70828
Sockets: Initial steps to adde a socket interface to the networking. Each address family will have an interface that describes how to perform socket operations on that address family. Currently only a couple of methods are defined in the table as a proof of concept. More to come. Currently there are only tables for the INET/INET6 family, the Unix LOCAL family, and the raw PACKET family. Hopefully there will be AF_IEEE802154 and AF_BLUETOOTH comming down the pike.
2017-07-12 15:07:32 -06:00
Gregory Nutt
d5207efb5a
Be consistent... Use Name: consistent in function headers vs Function:
2017-04-21 16:33:14 -06:00
Juha Niskanen
21545ab643
net/local: connect: Fix warning with gcc-arm-none-eabi-5-2016q1. Using compiler from gcc-arm-none-eabi-5-2016q1 toolchain:
...
gcc version 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589] (GNU Tools for ARM Embedded Processors)
gives error:
local/local_connect.c:188:7: error: '_local_semtake' is static but used in inline function 'local_stream_connect' which is not static [-Werror]
this is due to compiler enforcing ISO/IEC 9899:1999 6.7.4.3: "An inline definition of a function with external linkage shall not contain a definition of a modifiable object with static storage duration, and shall not contain a reference to an identifier with internal linkage."
Fix by making inlined caller to have internal linkage as well.
2017-03-30 06:54:59 -06:00
Gregory Nutt
f45727dffc
Fix some kruft left behind in last big commit.
2016-12-03 16:53:31 -06:00
Gregory Nutt
7467329a98
Eliminate CONFIG_NO_NOINTS. Lots of files changed -> lots of testing needed.
2016-12-03 16:28:19 -06:00
Gregory Nutt
2d057c28c8
net: Disable priority inheritance on all semaphores used for signaling
2016-11-03 12:17:02 -06:00
Gregory Nutt
9a44f3017b
Fix a few typos in the last commit
2016-07-19 13:40:54 -06:00
Gregory Nutt
6e6c04f778
Rename file_poll as fdesc_poll. The file_ namespace is used for other things.
2016-07-15 11:21:11 -06:00
Gregory Nutt
f4fcdcdb4d
net/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
2016-06-11 17:37:21 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
bcbd8ee964
Networking: Cosmetic change
2016-02-24 19:02:51 -06:00
Gregory Nutt
6209c51206
net/: More clean-up of spacing/alignment issues
2015-10-08 15:10:04 -06:00
Gregory Nutt
af086c40ff
Remove dangling whitespace
2015-10-04 15:28:54 -06:00
Gregory Nutt
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Gregory Nutt
fca919f3d2
Networking: Fix some compilation issues noted with network is build with CONFIG_BUILD_KERNEL
2015-07-05 11:18:56 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
0f5c35260b
Local sockets: Local stream sockets had problem of double releasing pipes (both server and client attempt release), which causes wrong pipe pair being closed in multi-client case. Solve by adding per connection instance ID to pipe names. From Jussi Kivilinna (2015-05-12).
2015-05-12 07:47:32 -06:00
Gregory Nutt
3c1af2feed
Local sockets: Add poll support for Unix stream sockets. From Jussi Kivilinna.
2015-05-12 07:41:12 -06:00
Gregory Nutt
2fcb93d2ca
Correct some network lock logic: Two error conditions where the network was not being unlocked and one where it was getting unlocked twice. From Jussi Kivilinna.
2015-05-12 07:28:26 -06:00
Gregory Nutt
63ab39b274
VFS: The inode unlink method should not be support if operations on the root pseudo-filesystem are disabled.
2015-02-18 09:34:58 -06:00
Gregory Nutt
011ff49685
Cosmetic update to a few comments
2015-02-01 12:23:57 -06:00
Gregory Nutt
898d511e05
Unix domain: Fix some bugs in logic the frees stream FIFOs
2015-02-01 09:16:55 -06:00
Gregory Nutt
f8bb77365a
Unix domain: Enable logic to clean up the FIFOs underlying stream sockets with those sockets are disconnected. Tehre is still no corresponding clean-up logic in place for Unix domain datagram sockets because the life of the FIFO is not as well known in that case
2015-02-01 08:52:26 -06:00
Gregory Nutt
0fc8d2fcc5
Unix domain: Add options to build in stream or datagram support separately
2015-01-31 07:58:51 -06:00
Gregory Nutt
f421723fbd
Fix some errors in debug assertions
2015-01-30 13:29:56 -06:00
Gregory Nutt
62b706fa68
If a Unix domain socket is non-blocking, then the underlying FIFO should also be opened non-blocking
2015-01-30 12:43:37 -06:00
Gregory Nutt
e8a74527a0
Fix mimatched #if/#endif
2015-01-30 12:28:29 -06:00
Gregory Nutt
e86d00913e
Unix domain/FIFOs: Fix a race condition between FIFO buffer operations and the opening and closing of FIFOs which necessary when the FIFOs are used to support Unix domain, datagram sockets. The default policy is the deallocate FIFO buffering when the last client closes the pipe. When when used for datagram communicatinos, packets left in the FIFO will be lost. Some like UDP read-ahead is needed: The buffered data in the FIFO needs to be retained until the reader gets a chance to re-open the FIFO. Added an ioctl (PIPEIOC_POLICY) to control the buffer policy. Default (0) is the legacy behavior; Unix domain datagram logic sets the alternative policy so that the packet data persists after the FIFO is closed.
2015-01-30 11:14:24 -06:00
Gregory Nutt
2a39105b3f
Unix domain: Add logic to release references to the half duplex FIFO after sendto and recvfrom
2015-01-30 09:28:55 -06:00
Gregory Nutt
de91d34a19
Networking: Separate out UDP poll logic from socket/net_poll.c into a new udp/udp_netpoll.c; Create a skeleton local/local_netpoll.c for future poll support on Unix domain sockets.
2015-01-30 07:09:25 -06:00
Gregory Nutt
0deca5b039
Unix domain: Various fixes to get apps/examplex/udgram working
2015-01-29 11:05:04 -06:00
Gregory Nutt
e5f820a2cd
Unix domain: Add sendto logic for SOCK_DRAM protocoal
2015-01-29 10:40:10 -06:00
Gregory Nutt
ffb16f658f
Unix domain: Add initial cut at redvfrom() for Unix domain datagram sockets
2015-01-29 07:47:09 -06:00