#include #include #include #include #include #include "corking.h" #include "die.h" void set_udp_cork(int fd) { int ret, state = 1; ret = setsockopt(fd, IPPROTO_UDP, UDP_CORK, &state, sizeof(state)); if (unlikely(ret)) panic("Cannot cork UDP socket!\n"); } void set_udp_uncork(int fd) { int ret, state = 0; ret = setsockopt(fd, IPPROTO_UDP, UDP_CORK, &state, sizeof(state)); if (unlikely(ret)) panic("Cannot uncork UDP socket!\n"); } void set_tcp_cork(int fd) { int ret, state = 1; ret = setsockopt(fd, IPPROTO_TCP, TCP_CORK, &state, sizeof(state)); if (unlikely(ret)) panic("Cannot cork TCP socket!\n"); } void set_tcp_uncork(int fd) { int ret, state = 0; ret = setsockopt(fd, IPPROTO_TCP, TCP_CORK, &state, sizeof(state)); if (unlikely(ret)) panic("Cannot uncork TCP socket!\n"); } void set_sock_cork(int fd, bool is_udp) { if (is_udp) set_udp_cork(fd); else set_tcp_cork(fd); } void set_sock_uncork(int fd, bool is_udp) { if (is_udp) set_udp_uncork(fd); else set_tcp_uncork(fd); } t();'> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2016-05-05 14:29:39 +0100
committerBjorn Andersson <bjorn.andersson@linaro.org>2016-05-06 11:46:36 -0700
commit3d87fa1d47c10c71684e1eca15cb051746ab1d56 (patch)
tree03d70b9ead994d59d25067990b99b43c08c9fb87 /Documentation/i2c/fault-codes
parent9735a22799b9214d17d3c231fe377fc852f042e9 (diff)
remoteproc: core: Task sync during rproc_fw_boot()
By default, rproc_fw_boot() needs to wait for rproc to be configured, but a race may occur when using rpmsg/virtio. In this case, it can be called locally in a safe manor. This patch represents two usecases: - External call (via exported rproc_boot()), which waits - Internal call can use 'nowait' version of rproc_boot() Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'Documentation/i2c/fault-codes')