[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and to
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. dd5bb410d1657f0a252ce3a0b217384c7c5b0c05 |
Date: |
Tue, 01 Jun 2010 19:54:04 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "DotGNU Portable.NET engine, compilers and tools (pnet)".
The branch, master has been updated
via dd5bb410d1657f0a252ce3a0b217384c7c5b0c05 (commit)
from 9ec4da4437815aff83067f9a9fc16da31ffea1e3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/pnet.git/commit/?id=dd5bb410d1657f0a252ce3a0b217384c7c5b0c05
commit dd5bb410d1657f0a252ce3a0b217384c7c5b0c05
Author: Klaus Treichel <address@hidden>
Date: Tue Jun 1 21:53:48 2010 +0200
Include libgc's private header file now in pt_defs.c and handle it's
SIG_SUSPEND definition instead of doing this in pt_defs.h.
diff --git a/ChangeLog b/ChangeLog
index 28fe162..355909b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2010-06-01 Klaus Treichel <address@hidden>
+
+ * support/pt_defs.h: Don't include libgc's private header gc_priv.h
+ here anymore because SIG_SUSPEND is needed only in pt_defs.c.
+
+ * support/pt_defs.c: Include libgc's private header gc_priv.h here
+ now and handle it's definition of SIG_SUSPEND.
+ Use one global static sigset now for the signals to wait for in a
+ suspended thread.
+
+ * engine/Makefile.am: Remove libgc's include directories from the
compiler
+ flags as they are not needed anymore.
+
+ * tests/Makefile.am: likewise.
+
2010-04-25 Klaus Treichel <address@hidden>
* engine/md_amd64.h (md_tan_reg_float): Pop the additional 1 pushsed
diff --git a/engine/Makefile.am b/engine/Makefile.am
index 7ed9d8e..2218068 100644
--- a/engine/Makefile.am
+++ b/engine/Makefile.am
@@ -7,12 +7,6 @@ if USING_LIBFFI
FFI_INCLUDE += -I../libffi/include
endif
-GC_INCLUDE =
-if USING_LIBGC
-GC_INCLUDE += -I$(top_srcdir)/libgc/include
-GC_INCLUDE += -I$(top_builddir)/libgc/libatomic_ops/src
-endif
-
CVM_INCLUDES = cvm.h cvm_arith.c cvm_branch.c cvm_call.c cvm_compare.c \
cvm_config.h cvm_const.c cvm_conv.c cvm_except.c
cvm_format.h \
cvm_inline.c cvm_interrupt.c cvm_ptr.c cvm_stack.c
cvm_var.c
@@ -196,7 +190,6 @@ ilverify_LDADD = libILEngine.a ../dumpasm/libILDumpAsm.a \
## 'ffi.h' is autogenerated; thus, goes into build tree.
AM_CFLAGS = $(NO_GCSE) $(NO_INLINE_FUNCTIONS) \
$(NO_UNIT_AT_A_TIME) -I$(top_srcdir)/support \
- $(GC_INCLUDE) \
$(JIT_INCLUDE) \
$(FFI_INCLUDE) -I.
-DBUILD_PROFILE_NAME="\"$(PROFILE_NAME)\""
@@ -216,7 +209,7 @@ ilverify_LDADD = libILEngine.a \
## the interpreter core in direct threading mode.
## GCC 3.4.0 also needs -fno-unit-at-a-time
## 'ffi.h' is autogenerated; thus, goes into build tree.
-AM_CFLAGS = $(GC_INCLUDE) $(FFI_INCLUDE) \
+AM_CFLAGS = $(FFI_INCLUDE) \
$(NO_GCSE) $(NO_INLINE_FUNCTIONS) $(NO_UNIT_AT_A_TIME) \
-I$(top_srcdir)/include -I../support/ -I. \
$(JIT_INCLUDE) \
diff --git a/support/pt_defs.c b/support/pt_defs.c
index a6ccf58..11475f7 100755
--- a/support/pt_defs.c
+++ b/support/pt_defs.c
@@ -38,6 +38,15 @@
#ifdef IL_USE_PTHREADS
+#ifdef HAVE_LIBGC
+#include <private/gc_priv.h> /* For SIG_SUSPEND */
+#if defined(SIG_SUSPEND) && defined(GC_DARWIN_THREADS)
+/* SIG_SUSPEND is unused by LIBGC 6 for GC_DARWIN_THREADS and the definition */
+/* is wrong (SIGRTMIN + x). SIGRTMIN is not defined on MAC OSX */
+#undef SIG_SUSPEND
+#endif
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -49,6 +58,11 @@ extern "C" {
static sigset_t _interruptSet;
/*
+ * Signal mask to wait on if a thtead is suspended.
+ */
+static sigset_t _suspendSet;
+
+/*
* Choose the version to use for modifying the counter in a count semaphore
*/
#define _SemAdd(dest, value) ILInterlockedAddI4_Acquire((dest),
(value))
@@ -218,27 +232,12 @@ pthread_mutexattr_t _ILMutexAttr;
*/
void _ILThreadSuspendUntilResumed(ILThread *thread)
{
- sigset_t mask;
-
- /* Set up the signal mask to allow through only selected signals */
- sigfillset(&mask);
- sigdelset(&mask, IL_SIG_RESUME);
-#ifdef SIG_SUSPEND
- sigdelset(&mask, SIG_SUSPEND);
-#endif
- sigdelset(&mask, PTHREAD_SIG_CANCEL);
- sigdelset(&mask, SIGINT);
- sigdelset(&mask, SIGQUIT);
- sigdelset(&mask, SIGTERM);
- sigdelset(&mask, SIGABRT);
-
/* Suspend until we receive IL_SIG_RESUME from something in this
process */
do
{
- sigsuspend(&mask);
+ sigsuspend(&_suspendSet);
}
while(!(thread->resumeRequested));
-
}
/*
@@ -979,6 +978,20 @@ void _ILThreadInitSystem(ILThread *mainThread)
sigemptyset(&_interruptSet);
sigaddset(&_interruptSet, IL_SIG_INTERRUPT);
+ /*
+ * Initialize the signal mask to resume a suspended thread.
+ */
+ sigfillset(&_suspendSet);
+ sigdelset(&_suspendSet, IL_SIG_RESUME);
+#ifdef SIG_SUSPEND
+ sigdelset(&_suspendSet, SIG_SUSPEND);
+#endif
+ sigdelset(&_suspendSet, PTHREAD_SIG_CANCEL);
+ sigdelset(&_suspendSet, SIGINT);
+ sigdelset(&_suspendSet, SIGQUIT);
+ sigdelset(&_suspendSet, SIGTERM);
+ sigdelset(&_suspendSet, SIGABRT);
+
#if !defined(USE_COMPILER_TLS)
/* We need a thread-specific key for storing thread objects */
pthread_key_create(&_ILThreadObjectKey, (void (*)(void *))0);
diff --git a/support/pt_defs.h b/support/pt_defs.h
index 036d2b3..b4841e7 100755
--- a/support/pt_defs.h
+++ b/support/pt_defs.h
@@ -27,14 +27,6 @@
#ifdef HAVE_SETJMP_H
#include <setjmp.h>
#endif
-#ifdef HAVE_LIBGC
-#include <private/gc_priv.h> /* For SIG_SUSPEND */
-#if defined(SIG_SUSPEND) && defined(GC_DARWIN_THREADS)
-/* SIG_SUSPEND is unused by LIBGC 6 for GC_DARWIN_THREADS and the definition */
-/* is wrong (SIGRTMIN + x). SIGRTMIN is not defined on MAC OSX */
-#undef SIG_SUSPEND
-#endif
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0e350e7..84cd77d 100755
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -11,7 +11,7 @@ test_crypt_SOURCES = test_crypt.c \
test_crypt_LDADD = ../image/libILImage.a ../support/libILSupport.a \
$(GCLIBS)
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/libgc/include
-I$(top_builddir)/libgc/libatomic_ops/src
+AM_CFLAGS = -I$(top_srcdir)/include
TESTS = test_thread test_crypt
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
engine/Makefile.am | 9 +--------
support/pt_defs.c | 45 +++++++++++++++++++++++++++++----------------
support/pt_defs.h | 8 --------
tests/Makefile.am | 2 +-
5 files changed, 46 insertions(+), 33 deletions(-)
hooks/post-receive
--
DotGNU Portable.NET engine, compilers and tools (pnet)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] [SCM] DotGNU Portable.NET engine, compilers and tools (pnet) branch, master, updated. dd5bb410d1657f0a252ce3a0b217384c7c5b0c05,
Klaus Treichel <=