-void nbd_thread_init (int id) {
- SET_THREAD_LOCAL(tid_, id);
- lwt_thread_init(id);
- rcu_thread_init(id);
+int nbd_thread_create (pthread_t *restrict thread, int thread_id, void *(*start_routine)(void *), void *restrict arg) {
+ thread_info_t *ti = (thread_info_t *)malloc(sizeof(thread_info_t));
+ ti->thread_id = thread_id;
+ ti->start_routine = start_routine;
+ ti->arg = arg;
+ return pthread_create(thread, NULL, worker, ti);