libc and libnx: When the libraries are built into two libraries, a user space library and a OS space library (as in the PROTECTED and KERNEL build). Then the user space library must not use the OS internal interfaces; similarly, the OS must avoid using the userspace interfaces so that it does not muck the errno value or create spurious cancellation points.

This commit is contained in:
Gregory Nutt
2017-10-08 12:14:18 -06:00
parent 6642e20e05
commit 5e4f4ee788
3 changed files with 53 additions and 4 deletions
+3 -1
View File
@@ -48,6 +48,7 @@
#include <errno.h>
#include <debug.h>
#include <nuttx/signal.h>
#include <nuttx/semaphore.h>
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxmu.h>
@@ -190,7 +191,8 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname)
gerr("ERROR: nx_message failed: %d\n", errno);
goto errout_with_wmq;
}
usleep(300000);
_SIG_USLEEP(300000);
}
while (conn->state != NX_CLISTATE_CONNECTED);
#endif