4 #include "handles-private.h"
5 #include "process-private.h"
6 #include "thread-private.h"
8 #include "mono/utils/mono-lazy-init.h"
10 gboolean _wapi_has_shut_down = FALSE;
16 _wapi_shm_semaphores_init ();
18 wapi_processes_init ();
24 g_assert (_wapi_has_shut_down == FALSE);
25 _wapi_has_shut_down = TRUE;
27 _wapi_error_cleanup ();
28 _wapi_thread_cleanup ();
29 wapi_processes_cleanup ();
31 _wapi_handle_cleanup ();
34 /* Use this instead of getpid(), to cope with linuxthreads. It's a
35 * function rather than a variable lookup because we need to get at
36 * this before share_init() might have been called. */
37 static mono_lazy_init_t _wapi_pid_init_lazy = MONO_LAZY_INIT_STATUS_NOT_INITIALIZED;
38 static pid_t _wapi_pid;
43 _wapi_pid = getpid ();
49 mono_lazy_initialize (&_wapi_pid_init_lazy, _wapi_pid_init);