Remove the duplicated _NX_ and _MQ_ macro

reuse the definition come from include/nuttx/fs/fs.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2021-02-15 22:29:45 +08:00
committed by Abdelatif Guettouche
parent f3043d133e
commit 35ec84ffca
4 changed files with 5 additions and 13 deletions
-6
View File
@@ -67,9 +67,6 @@
# define _MQ_TIMEDSEND(d,m,l,p,t) nxmq_timedsend(d,m,l,p,t)
# define _MQ_RECEIVE(d,m,l,p) nxmq_receive(d,m,l,p)
# define _MQ_TIMEDRECEIVE(d,m,l,p,t) nxmq_timedreceive(d,m,l,p,t)
# define _MQ_GETERRNO(r) (-(r))
# define _MQ_SETERRNO(r) set_errno(-(r))
# define _MQ_GETERRVAL(r) (r)
#else
# define _MQ_OPEN mq_open
# define _MQ_CLOSE(d) mq_close(d)
@@ -78,9 +75,6 @@
# define _MQ_TIMEDSEND(d,m,l,p,t) mq_timedsend(d,m,l,p,t)
# define _MQ_RECEIVE(d,m,l,p) mq_receive(d,m,l,p)
# define _MQ_TIMEDRECEIVE(d,m,l,p,t) mq_timedreceive(d,m,l,p,t)
# define _MQ_GETERRNO(r) errno
# define _MQ_SETERRNO(r)
# define _MQ_GETERRVAL(r) (-errno)
#endif
/****************************************************************************
-4
View File
@@ -71,14 +71,10 @@
# define _NX_SEND(s,b,l,f) nx_send(s,b,l,f)
# define _NX_RECV(s,b,l,f) nx_recv(s,b,l,f)
# define _NX_RECVFROM(s,b,l,f,a,n) nx_recvfrom(s,b,l,f,a,n)
# define _NX_GETERRNO(r) (-(r))
# define _NX_GETERRVAL(r) (r)
#else
# define _NX_SEND(s,b,l,f) send(s,b,l,f)
# define _NX_RECV(s,b,l,f) recv(s,b,l,f)
# define _NX_RECVFROM(s,b,l,f,a,n) recvfrom(s,b,l,f,a,n)
# define _NX_GETERRNO(r) errno
# define _NX_GETERRVAL(r) (-errno)
#endif
/* Socket descriptors are the index into the TCB sockets list, offset by the