[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 16/17: Threads no longer track critical section level
From: |
Andy Wingo |
Subject: |
[Guile-commits] 16/17: Threads no longer track critical section level |
Date: |
Tue, 1 Nov 2016 22:50:45 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 4b78b001d875cee7a4ee383f0cb498afc67835ee
Author: Andy Wingo <address@hidden>
Date: Tue Nov 1 23:28:12 2016 +0100
Threads no longer track critical section level
* libguile/threads.h (scm_i_thread):
* libguile/threads.c (guilify_self_1): Remove critical_section_level
member of scm_i_thread.
* libguile/async.c (scm_critical_section_end)
(scm_critical_section_start): Remove bookkeeping.
---
libguile/async.c | 2 --
libguile/threads.c | 1 -
libguile/threads.h | 4 ----
3 files changed, 7 deletions(-)
diff --git a/libguile/async.c b/libguile/async.c
index d7b266b..e456167 100644
--- a/libguile/async.c
+++ b/libguile/async.c
@@ -306,13 +306,11 @@ scm_critical_section_start (void)
{
scm_i_pthread_mutex_lock (&critical_section_mutex);
SCM_I_CURRENT_THREAD->block_asyncs++;
- SCM_I_CURRENT_THREAD->critical_section_level++;
}
void
scm_critical_section_end (void)
{
- SCM_I_CURRENT_THREAD->critical_section_level--;
SCM_I_CURRENT_THREAD->block_asyncs--;
scm_i_pthread_mutex_unlock (&critical_section_mutex);
scm_async_tick ();
diff --git a/libguile/threads.c b/libguile/threads.c
index c27a7ea..c1f4169 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -421,7 +421,6 @@ guilify_self_1 (struct GC_stack_base *base)
t.dynstack.limit = NULL;
t.pending_asyncs = SCM_EOL;
t.block_asyncs = 1;
- t.critical_section_level = 0;
t.base = base->mem_base;
#ifdef __ia64__
t.register_backing_store_base = base->reg_base;
diff --git a/libguile/threads.h b/libguile/threads.h
index b7f0fd9..6cf575b 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -118,10 +118,6 @@ typedef struct scm_i_thread {
void *register_backing_store_base;
scm_t_contregs *pending_rbs_continuation;
#endif
-
- /* Whether this thread is in a critical section. */
- int critical_section_level;
-
} scm_i_thread;
#define SCM_I_IS_THREAD(x) SCM_SMOB_PREDICATE (scm_tc16_thread, x)
- [Guile-commits] branch master updated (eeeee32 -> fcc6a7b), Andy Wingo, 2016/11/01
- [Guile-commits] 04/17: sigaction critical section refactor., Andy Wingo, 2016/11/01
- [Guile-commits] 06/17: Remove unused internal definitions, Andy Wingo, 2016/11/01
- [Guile-commits] 13/17: Mutex in dynamic linker, Andy Wingo, 2016/11/01
- [Guile-commits] 11/17: Mutex instead of critical section in gc.c, Andy Wingo, 2016/11/01
- [Guile-commits] 16/17: Threads no longer track critical section level,
Andy Wingo <=
- [Guile-commits] 03/17: threads: Use a mutex instead of a critical section., Andy Wingo, 2016/11/01
- [Guile-commits] 07/17: Mutexes instead of critical sections in stime.c, Andy Wingo, 2016/11/01
- [Guile-commits] 01/17: api-scheduling.texi: Syntactic cleanups., Andy Wingo, 2016/11/01
- [Guile-commits] 08/17: Mutex instead of critical sectoin in symbol->keyword, Andy Wingo, 2016/11/01
- [Guile-commits] 05/17: regexec comment fix, Andy Wingo, 2016/11/01
- [Guile-commits] 15/17: Remove call/cc assertion about critical sections, Andy Wingo, 2016/11/01
- [Guile-commits] 09/17: Simplify critical section implementation, Andy Wingo, 2016/11/01
- [Guile-commits] 10/17: Mutex instead of critical section in GOOPS, Andy Wingo, 2016/11/01
- [Guile-commits] 02/17: Add scm_yield to manual alongside yield, Andy Wingo, 2016/11/01
- [Guile-commits] 12/17: Remove critical section in scm_debug_options, Andy Wingo, 2016/11/01