sem:remove sem default protocl

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2022-10-18 17:09:22 +08:00
committed by Xiang Xiao
parent 205c8934a3
commit 5724c6b2e4
216 changed files with 2 additions and 1155 deletions
-5
View File
@@ -260,12 +260,7 @@ int psock_tcp_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
state.acpt_newconn = NULL;
state.acpt_result = OK;
/* This semaphore is used for signaling and, hence, should not have
* priority inheritance enabled.
*/
nxsem_init(&state.acpt_sem, 0, 0);
nxsem_set_protocol(&state.acpt_sem, SEM_PRIO_NONE);
/* Set up the callback in the connection */
-1
View File
@@ -736,7 +736,6 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain)
conn->snd_bufs = CONFIG_NET_SEND_BUFSIZE;
nxsem_init(&conn->snd_sem, 0, 0);
nxsem_set_protocol(&conn->snd_sem, SEM_PRIO_NONE);
#endif
}
-5
View File
@@ -87,12 +87,7 @@ static inline int psock_setup_callbacks(FAR struct socket *psock,
/* Initialize the TCP state structure */
/* This semaphore is used for signaling and, hence, should not have
* priority inheritance enabled.
*/
nxsem_init(&pstate->tc_sem, 0, 0); /* Doesn't really fail */
nxsem_set_protocol(&pstate->tc_sem, SEM_PRIO_NONE);
pstate->tc_conn = conn;
pstate->tc_result = -EAGAIN;
-6
View File
@@ -514,13 +514,7 @@ static void tcp_recvfrom_initialize(FAR struct tcp_conn_s *conn,
/* Initialize the state structure. */
memset(pstate, 0, sizeof(struct tcp_recvfrom_s));
/* This semaphore is used for signaling and, hence, should not have
* priority inheritance enabled.
*/
nxsem_init(&pstate->ir_sem, 0, 0); /* Doesn't really fail */
nxsem_set_protocol(&pstate->ir_sem, SEM_PRIO_NONE);
pstate->ir_buflen = len;
pstate->ir_buffer = buf;
-6
View File
@@ -605,13 +605,7 @@ ssize_t psock_tcp_send(FAR struct socket *psock,
}
memset(&state, 0, sizeof(struct send_s));
/* This semaphore is used for signaling and, hence, should not have
* priority inheritance enabled.
*/
nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */
nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE);
state.snd_sock = psock; /* Socket descriptor to use */
state.snd_buflen = len; /* Number of bytes to send */
-6
View File
@@ -508,13 +508,7 @@ ssize_t tcp_sendfile(FAR struct socket *psock, FAR struct file *infile,
conn->sendfile = true;
#endif
memset(&state, 0, sizeof(struct sendfile_s));
/* This semaphore is used for signaling and, hence, should not have
* priority inheritance enabled.
*/
nxsem_init(&state.snd_sem, 0, 0); /* Doesn't really fail */
nxsem_set_protocol(&state.snd_sem, SEM_PRIO_NONE);
state.snd_sock = psock; /* Socket descriptor to use */
state.snd_foffset = offset ? *offset : startpos; /* Input file offset */
-1
View File
@@ -100,7 +100,6 @@ int tcp_txdrain(FAR struct socket *psock, unsigned int timeout)
/* Initialize the wait semaphore */
nxsem_init(&waitsem, 0, 0);
nxsem_set_protocol(&waitsem, SEM_PRIO_NONE);
/* The following needs to be done with the network stable */
-1
View File
@@ -100,7 +100,6 @@ void tcp_wrbuffer_initialize(void)
}
nxsem_init(&g_wrbuffer.sem, 0, CONFIG_NET_TCP_NWRBCHAINS);
nxsem_set_protocol(&g_wrbuffer.sem, SEM_PRIO_NONE);
}
/****************************************************************************