PS: Kindly ignore the emu/thread_xsb.c patch. It is no more required. It is taken care of by patch ../emu/thread_xsb.h
NetBSD porting and some general patches