#include <semaphore.h> /* Semaphores library header file */
#include <time.h>
#include <stdlib.h>
+ #include <stdbool.h>
#include <unistd.h>
#include <sys/mman.h> /* For mlockall() */
#include "%<modelName>.h" /* Model's header file */
#include "ext_work.h" /* External mode header file */
%endif
+ #ifndef TRUE
+ #define TRUE true
+ #define FALSE false
+ #endif
+
/*==================*
* Required defines *
*==================*/
%<modelName>_step%<i>();
sem_wait(&sub_rate[%<i>].sem); /* sem_val = 0 */
}
+ return NULL;
}
%endforeach
%endfunction
(void *)(argv);
%endif
- CHECKE(mlockall(MCL_FUTURE));
+ CHECKE(mlockall(MCL_CURRENT | MCL_FUTURE));
/* Initialize model */
%<modelName>_initialize();