Made JSON library non-recursive.
Co-authored with Diederick.
This commit is contained in:
parent
7905bb2bda
commit
16d38459b6
14 changed files with 503 additions and 328 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "shared_memory.h"
|
||||
#include "stream.h"
|
||||
#include "procs.h"
|
||||
#include "timing.h"
|
||||
|
||||
namespace IPC {
|
||||
|
||||
|
@ -205,6 +206,18 @@ namespace IPC {
|
|||
WARN_MSG("Consistency error caught on semaphore %s", myName.c_str());
|
||||
result = 0;
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
/// \todo (roxlu) test tryWaitOneSecond, shared_memory.cpp
|
||||
long long unsigned int now = Util::getMicros();
|
||||
long long unsigned int timeout = now + 1e6;
|
||||
while (now < timeout) {
|
||||
if (0 == sem_trywait(mySem)) {
|
||||
return true;
|
||||
}
|
||||
usleep(100e3);
|
||||
now = Util::getMicros();
|
||||
}
|
||||
return false;
|
||||
#else
|
||||
struct timespec wt;
|
||||
wt.tv_sec = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue