Merge pull request #2894 from marek-safar/mono.security
[mono.git] / mono / utils / gc_wrapper.h
index 504e59937c90fdca6f039b6ba44c36dd9ddb22ec..908bcabc5125d0e594237ac67286015302cd8ff9 100644 (file)
@@ -1,6 +1,7 @@
 /* 
  * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
  * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 #ifndef __MONO_OS_GC_WRAPPER_H__
 #define __MONO_OS_GC_WRAPPER_H__
@@ -25,7 +26,7 @@
         * it if it is the included one.
         */
        
-#      if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC) && !defined(__powerpc__)
+#      if defined(HAVE_KW_THREAD) && !defined(__powerpc__)
         /* The local alloc stuff is in pthread_support.c, but solaris uses solaris_threads.c */
         /* It is also disabled on solaris/x86 by libgc/configure.ac */
         /* 
 #       endif
 #      endif
 
-#      ifdef HAVE_GC_GC_H
-#              include <gc/gc.h>
-#              include <gc/gc_typed.h>
-#              include <gc/gc_mark.h>
-#              include <gc/gc_gcj.h>
-#      elif defined(HAVE_GC_H) || defined(USE_INCLUDED_LIBGC)
-#              include <gc.h>
-#              include <gc_typed.h>
-#              include <gc_mark.h>
-#              include <gc_gcj.h>
-#      else
-#              error have boehm GC without headers, you probably need to install them by hand
-#      endif
+#      define GC_INSIDE_DLL
+#      include <gc.h>
+#      include <gc_typed.h>
+#      include <gc_mark.h>
+#      include <gc_gcj.h>
 
 #if defined(HOST_WIN32)
 #define CreateThread GC_CreateThread
 #else /* not Boehm and not sgen GC */
 #endif
 
-#if !defined(HOST_WIN32)
-
-/*
- * Both Boehm and SGEN needs to intercept some thread operations. So instead of the
- * pthread_... calls, runtime code should call these wrappers.
- */
-
-/* pthread function wrappers */
-#include <pthread.h>
-
-int mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
-int mono_gc_pthread_join (pthread_t thread, void **retval);
-int mono_gc_pthread_detach (pthread_t thread);
-void mono_gc_pthread_exit (void *retval) G_GNUC_NORETURN;
-
-#endif
-
 #endif