diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2020-04-01 16:59:44 -0400 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2020-04-01 16:59:44 -0400 |
commit | 58aad36b016765d2b651b9167f0a4caa6142d5f9 (patch) | |
tree | be3a18fceb890dbe20d8257a3a3b6cc072dad890 /0002-boehm-gc-for-cygwin.patch | |
parent | 462d1befeec9662defcdb8380a79895bdbf1186a (diff) | |
download | cygwin-gcc-58aad36b016765d2b651b9167f0a4caa6142d5f9.tar.gz cygwin-gcc-58aad36b016765d2b651b9167f0a4caa6142d5f9.tar.xz cygwin-gcc-58aad36b016765d2b651b9167f0a4caa6142d5f9.zip |
cygwin-gcc 9.3.0
Diffstat (limited to '0002-boehm-gc-for-cygwin.patch')
-rw-r--r-- | 0002-boehm-gc-for-cygwin.patch | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/0002-boehm-gc-for-cygwin.patch b/0002-boehm-gc-for-cygwin.patch deleted file mode 100644 index 8614803..0000000 --- a/0002-boehm-gc-for-cygwin.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 350df6c8caa021f3237486ea6b5145ee559f4d00 Mon Sep 17 00:00:00 2001 -From: Jonathan Yong <10walls@gmail.com> -Date: Wed, 28 May 2014 22:11:01 +0800 -Subject: [PATCH 02/21] boehm-gc for cygwin - ---- - boehm-gc/win32_threads.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - -diff --git a/boehm-gc/win32_threads.c b/boehm-gc/win32_threads.c -index 2de1c69..07ecde0 100644 ---- a/boehm-gc/win32_threads.c -+++ b/boehm-gc/win32_threads.c -@@ -711,6 +711,54 @@ void * GC_start_routine(void * arg) - return(result); - } - -+void GC_register_my_thread() -+{ -+ GC_thread me; -+ pthread_t my_pthread; -+ -+ my_pthread = pthread_self(); -+# if DEBUG_CYGWIN_THREADS -+ GC_printf1("Attaching thread 0x%lx\n", my_pthread); -+ GC_printf1("pid = %ld\n", (long) getpid()); -+# endif -+ -+ /* Check to ensure this thread isn't attached already. */ -+ LOCK(); -+ me = GC_lookup_thread (my_pthread); -+ UNLOCK(); -+ if (me != 0) -+ { -+# if DEBUG_CYGWIN_THREADS -+ GC_printf1("Attempt to re-attach known thread 0x%lx\n", my_pthread); -+# endif -+ return; -+ } -+ -+ LOCK(); -+ me = GC_new_thread(); -+ me -> flags |= DETACHED; -+ me -> pthread_id = pthread_self(); -+ UNLOCK(); -+} -+ -+void GC_unregister_my_thread() -+{ -+ pthread_t my_pthread; -+ GC_thread me; -+ -+ my_pthread = pthread_self(); -+ -+# if DEBUG_CYGWIN_THREADS -+ GC_printf1("Detaching thread 0x%lx\n", my_pthread); -+# endif -+ -+ LOCK(); -+ me = GC_lookup_thread(my_pthread); -+ UNLOCK(); -+ GC_thread_exit_proc ((void *)me); -+} -+ -+ - void GC_thread_exit_proc(void *arg) - { - GC_thread me = (GC_thread)arg; --- -2.4.5 - |