Move thread management from sgen to utils. Move smr from MonoInternalThread to thread_info.
* mono-threads.c: An implementation of low level thread management that
fits what sgen needs. It uses hazard pointers to manage the thread list
since we can't protect it with the GC lock as this would cause boehm to
deadlock. This requires us to move small_id one layer down.
* Thread.cs:
* object-internals.h:
* threads.c: Small id is now stored on MonoThreadInfo so it can be
used by lower layers of the runtime such as sgen.
* sgen-major-copying.c:
* sgen-os-mach.c:
* sgen-os-posix.c:
* sgen-gc.h:
* sgen-gc.c: Replace sgen's thread management code with
the new one.
* boehm-gc.c: Hookup the new thread management code. Boehm's
own management code is not been replaced as I'm too much of
a coward to mess with it.
* hazard-pointer.c: Adjust to the new location of small_id.
14 files changed: