make CREATE_thread extern function in separate file