int select_main() { th_init(); th_create(testfunc1, NULL, 5, "Test1"); th_create(testfunc2, NULL, 5, "Test2"); th_loop(); return 0; }
void jt_init() { lh_init(LayoutChromaticFixed); sth_init(); ksh_init(); th_init(); setup_defaults(); update_ui(); }
static VALUE ruby_thread_init(VALUE self) { rb_thread_t *th; rb_vm_t *vm = GET_THREAD()->vm; GetThreadPtr(self, th); th_init(th, self); th->vm = vm; th->top_wrapper = 0; th->top_self = rb_vm_top_self(); return self; }
int msgq2_test( void ) { static int quantities[] = { 2, 20, 20 }; static int sizes[] = { MSGQ_SIZE, MSG_STRUCT_SIZE, 64 }; static int numpools = 3; th_init(); msg_pools = poolset_init( numpools, quantities, sizes ); th_create( receiver, 0, 5, "recv" ); th_create( sender, 0, 6, "send" ); th_loop(); return 0; }