static int vxworks_init(int argc, char *const argv[]) { int ret, lindex, c; for (;;) { c = getopt_long_only(argc, argv, "", vxworks_options, &lindex); if (c == EOF) break; if (c > 0) continue; switch (lindex) { case clock_resolution_opt: clock_resolution = atoi(optarg); break; } } registry_add_dir("/vxworks"); registry_add_dir("/vxworks/tasks"); registry_add_dir("/vxworks/semaphores"); registry_add_dir("/vxworks/queues"); registry_add_dir("/vxworks/watchdogs"); cluster_init(&wind_task_table, "vxworks.task"); ret = clockobj_init(&wind_clock, "vxworks", clock_resolution); if (ret) { warning("%s: failed to initialize VxWorks clock (res=%u ns)", __FUNCTION__, clock_resolution); return __bt(ret); } return 0; }
static int psos_init(void) { int ret; registry_add_dir("/psos"); registry_add_dir("/psos/tasks"); registry_add_dir("/psos/semaphores"); registry_add_dir("/psos/queues"); registry_add_dir("/psos/timers"); registry_add_dir("/psos/partitions"); registry_add_dir("/psos/regions"); cluster_init(&psos_task_table, "psos.task"); cluster_init(&psos_sem_table, "psos.sema4"); cluster_init(&psos_queue_table, "psos.queue"); pvcluster_init(&psos_pt_table, "psos.pt"); pvcluster_init(&psos_rn_table, "psos.rn"); ret = clockobj_init(&psos_clock, "psos", clock_resolution); if (ret) { warning("%s: failed to initialize pSOS clock (res=%u ns)", __FUNCTION__, clock_resolution); return __bt(ret); } /* Convert pSOS ticks to timespec. */ clockobj_ticks_to_timespec(&psos_clock, time_slice_in_ticks, &psos_rrperiod); return 0; }
static int vxworks_init(void) { int ret; registry_add_dir("/vxworks"); registry_add_dir("/vxworks/tasks"); registry_add_dir("/vxworks/semaphores"); registry_add_dir("/vxworks/queues"); registry_add_dir("/vxworks/watchdogs"); cluster_init(&wind_task_table, "vxworks.task"); ret = clockobj_init(&wind_clock, clock_resolution); if (ret) { warning("%s: failed to initialize VxWorks clock (res=%u ns)", __FUNCTION__, clock_resolution); return __bt(ret); } __RT(pthread_mutex_init(&wind_task_lock, NULL)); return 0; }
static int alchemy_init(void) { int ret; syncluster_init(&alchemy_task_table, "alchemy.task"); syncluster_init(&alchemy_sem_table, "alchemy.sem"); syncluster_init(&alchemy_event_table, "alchemy.event"); syncluster_init(&alchemy_cond_table, "alchemy.cond"); syncluster_init(&alchemy_mutex_table, "alchemy.mutex"); syncluster_init(&alchemy_queue_table, "alchemy.queue"); syncluster_init(&alchemy_buffer_table, "alchemy.buffer"); syncluster_init(&alchemy_heap_table, "alchemy.heap"); pvcluster_init(&alchemy_alarm_table, "alchemy.alarm"); ret = clockobj_init(&alchemy_clock, clock_resolution); if (ret) { warning("%s: failed to initialize Alchemy clock (res=%u ns)", __FUNCTION__, clock_resolution); return __bt(ret); } registry_add_dir("/alchemy"); registry_add_dir("/alchemy/tasks"); registry_add_dir("/alchemy/semaphores"); registry_add_dir("/alchemy/events"); registry_add_dir("/alchemy/condvars"); registry_add_dir("/alchemy/mutexes"); registry_add_dir("/alchemy/queues"); registry_add_dir("/alchemy/buffers"); registry_add_dir("/alchemy/heaps"); registry_add_dir("/alchemy/alarms"); init_corespec(); return 0; }
static inline void init_corespec(void) { syncluster_init(&alchemy_pipe_table, "alchemy.pipe"); registry_add_dir("/alchemy/pipes"); }