pthread_create is wrapped

Create function is wrapped around a atomic_lock and global id is
incremented. But the global id's and created thread's id sometimes do
not match.