INT os_init() { malloclock = NULL; malloclock = os_lock_create(); //debuglock = os_lock_create(); //dprintf("You shouldn't use global_main_thread !!!!!!!!!!\r\n"); //TODO //Get thread ID !!!! not a fake handle global_main_thread.threadid = GetCurrentThreadId(); os_socket_init(); return S_OK; }
int pony_start(bool library) { if(!os_socket_init()) return -1; if(!scheduler_start(library)) return -1; if(library) return 0; return _atomic_load(&exit_code); }