|
|
@ -35,7 +35,7 @@ const uint32_t runtime_first_worker_processor = 1;
|
|
|
|
FILE *runtime_sandbox_perf_log = NULL;
|
|
|
|
FILE *runtime_sandbox_perf_log = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
enum RUNTIME_SCHEDULER runtime_scheduler = RUNTIME_SCHEDULER_EDF;
|
|
|
|
enum RUNTIME_SCHEDULER runtime_scheduler = RUNTIME_SCHEDULER_EDF;
|
|
|
|
enum RUNTIME_SIGALRM_HANDLER runtime_sigalrm_handler = RUNTIME_SIGALRM_HANDLER_TRIAGED;
|
|
|
|
enum RUNTIME_SIGALRM_HANDLER runtime_sigalrm_handler = RUNTIME_SIGALRM_HANDLER_BROADCAST;
|
|
|
|
int runtime_worker_core_count;
|
|
|
|
int runtime_worker_core_count;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -192,18 +192,9 @@ runtime_start_runtime_worker_threads()
|
|
|
|
debuglog("Sandboxing environment ready!\n");
|
|
|
|
debuglog("Sandboxing environment ready!\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
|
|
|
runtime_cleanup()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (runtime_sandbox_perf_log != NULL) fflush(runtime_sandbox_perf_log);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exit(EXIT_SUCCESS);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
runtime_configure()
|
|
|
|
runtime_configure()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
signal(SIGTERM, runtime_cleanup);
|
|
|
|
|
|
|
|
/* Scheduler Policy */
|
|
|
|
/* Scheduler Policy */
|
|
|
|
char *scheduler_policy = getenv("SLEDGE_SCHEDULER");
|
|
|
|
char *scheduler_policy = getenv("SLEDGE_SCHEDULER");
|
|
|
|
if (scheduler_policy == NULL) scheduler_policy = "EDF";
|
|
|
|
if (scheduler_policy == NULL) scheduler_policy = "EDF";
|
|
|
@ -218,7 +209,7 @@ runtime_configure()
|
|
|
|
|
|
|
|
|
|
|
|
/* Sigalrm Handler Technique */
|
|
|
|
/* Sigalrm Handler Technique */
|
|
|
|
char *sigalrm_policy = getenv("SLEDGE_SIGALRM_HANDLER");
|
|
|
|
char *sigalrm_policy = getenv("SLEDGE_SIGALRM_HANDLER");
|
|
|
|
if (sigalrm_policy == NULL) sigalrm_policy = "TRIAGED";
|
|
|
|
if (sigalrm_policy == NULL) sigalrm_policy = "BROADCAST";
|
|
|
|
if (strcmp(sigalrm_policy, "BROADCAST") == 0) {
|
|
|
|
if (strcmp(sigalrm_policy, "BROADCAST") == 0) {
|
|
|
|
runtime_sigalrm_handler = RUNTIME_SIGALRM_HANDLER_BROADCAST;
|
|
|
|
runtime_sigalrm_handler = RUNTIME_SIGALRM_HANDLER_BROADCAST;
|
|
|
|
} else if (strcmp(sigalrm_policy, "TRIAGED") == 0) {
|
|
|
|
} else if (strcmp(sigalrm_policy, "TRIAGED") == 0) {
|
|
|
|