mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Kernel module should prefer functions with nx/kmm prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
15480e51cf
commit
0536953ded
+13
-15
@@ -80,7 +80,7 @@ static inline void nxmu_disconnect(FAR struct nxmu_conn_s *conn)
|
||||
|
||||
/* Close the outgoing client message queue */
|
||||
|
||||
mq_close(conn->swrmq);
|
||||
nxmq_close(conn->swrmq);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -101,10 +101,10 @@ static inline void nxmu_connect(FAR struct nxmu_conn_s *conn)
|
||||
* client
|
||||
*/
|
||||
|
||||
conn->swrmq = mq_open(mqname, O_WRONLY);
|
||||
if (conn->swrmq == (mqd_t)-1)
|
||||
ret = nxmq_open(mqname, O_WRONLY, 0, NULL, &conn->swrmq);
|
||||
if (ret < 0)
|
||||
{
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errno);
|
||||
gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, ret);
|
||||
outmsg.msgid = NX_CLIMSG_DISCONNECTED;
|
||||
}
|
||||
|
||||
@@ -205,12 +205,11 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
attr.mq_msgsize = NX_MXSVRMSGLEN;
|
||||
attr.mq_flags = 0;
|
||||
|
||||
nxmu->conn.crdmq = mq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr);
|
||||
if (nxmu->conn.crdmq == (mqd_t)-1)
|
||||
ret = nxmq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr, &nxmu->conn.crdmq);
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errcode);
|
||||
return -errcode;
|
||||
gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* NOTE that the outgoing client MQ (cwrmq) is not initialized. The
|
||||
@@ -222,13 +221,12 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev,
|
||||
* the server message loop.
|
||||
*/
|
||||
|
||||
nxmu->conn.swrmq = mq_open(mqname, O_WRONLY);
|
||||
if (nxmu->conn.swrmq == (mqd_t)-1)
|
||||
ret = nxmq_open(mqname, O_WRONLY, 0, NULL, &nxmu->conn.swrmq);
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = get_errno();
|
||||
gerr("ERROR: mq_open(%s) failed: %d\n", mqname, errcode);
|
||||
mq_close(nxmu->conn.crdmq);
|
||||
return -errcode;
|
||||
gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, ret);
|
||||
nxmq_close(nxmu->conn.crdmq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* The server is now "connected" to itself via the background window */
|
||||
|
||||
Reference in New Issue
Block a user