summaryrefslogtreecommitdiffstats
path: root/winsup/mingw/mthr_stub.c
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-02-17 19:38:33 +0000
committerChristopher Faylor <me@cgf.cx>2000-02-17 19:38:33 +0000
commit1fd5e000ace55b323124c7e556a7a864b972a5c4 (patch)
treedc4fcf1e5e22a040716ef92c496b8d94959b2baa /winsup/mingw/mthr_stub.c
parent369d8a8fd5e887eca547bf34bccfdf755c9e5397 (diff)
downloadcygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.gz
cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.tar.bz2
cygnal-1fd5e000ace55b323124c7e556a7a864b972a5c4.zip
import winsup-2000-02-17 snapshot
Diffstat (limited to 'winsup/mingw/mthr_stub.c')
-rw-r--r--winsup/mingw/mthr_stub.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/winsup/mingw/mthr_stub.c b/winsup/mingw/mthr_stub.c
new file mode 100644
index 000000000..b2d219c9e
--- /dev/null
+++ b/winsup/mingw/mthr_stub.c
@@ -0,0 +1,37 @@
+/*
+ * mthr_stub.c
+ *
+ * Implement Mingw thread-support stubs for single-threaded C++ apps.
+ *
+ * This file is used by if gcc is built with --enable-threads=win32 and
+ * iff gcc does *NOT* use -mthreads option.
+ *
+ * The -mthreads implementation is in mthr.c.
+ *
+ * Created by Mumit Khan <khan@nanotech.wisc.edu>
+ *
+ */
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#include <assert.h>
+
+/*
+ * __mingwthr_register_key_dtor (DWORD key, void (*dtor) (void *))
+ *
+ * Public interface called by C++ exception handling mechanism in
+ * libgcc (cf: __gthread_key_create).
+ *
+ * THIS SHOULD NEVER BE CALLED!
+ *
+ */
+
+int
+__mingwthr_key_dtor (DWORD key, void (*dtor) (void *))
+{
+ assert (0);
+ /* NOTREACHED */
+ return 0;
+}
+