Use SYS_ARCH_SET macro at appropriate places
Use SYS_ARCH_SET to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
committed by
Dirk Ziegelmeier
parent
fb6d0f9006
commit
bd4c4b5959
@@ -460,7 +460,6 @@ static void
|
||||
free_socket(struct lwip_sock *sock, int is_tcp)
|
||||
{
|
||||
void *lastdata;
|
||||
SYS_ARCH_DECL_PROTECT(lev);
|
||||
|
||||
lastdata = sock->lastdata;
|
||||
sock->lastdata = NULL;
|
||||
@@ -468,9 +467,7 @@ free_socket(struct lwip_sock *sock, int is_tcp)
|
||||
sock->err = 0;
|
||||
|
||||
/* Protect socket array */
|
||||
SYS_ARCH_PROTECT(lev);
|
||||
sock->conn = NULL;
|
||||
SYS_ARCH_UNPROTECT(lev);
|
||||
SYS_ARCH_SET(sock->conn, NULL);
|
||||
/* don't use 'sock' after this line, as another task might have allocated it */
|
||||
|
||||
if (lastdata != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user