| Commit message (Expand) | Author | Age | Files | Lines |
* | Revert "add pthread_atfork helpers to our threading shims"...This reverts commit 2f745b64a1eb06e9e175a1b497d5270bebff9097.
| Andy Wingo | 2012-02-23 | 1 | -9/+1 |
* | add pthread_atfork helpers to our threading shims...* libguile/null-threads.h:
* libguile/pthread-threads.h (SCM_DEFINE_ATFORK_HANDLERS_FOR_MUTEX)
(scm_i_pthread_atfork): Define a pthread_atfork shim, and a helper to
declare procedures to lock and unlock a mutex.
* libguile/threads.h (SCM_PTHREAD_ATFORK_LOCK_STATIC_MUTEX): New macro,
causes the snarfer to emit a pthread_atfork call to lock a mutex, if
threads are enabled.
| Andy Wingo | 2012-02-17 | 1 | -1/+9 |
* | remove gc pthread redirects entirely...* libguile/pthread-threads.h: As an experiment, just define
scm_i_pthread_create et al to their pthread_* functions, instead of
the GC_ ones. It seems sufficient, given that all uses of Guile have
to go through scm_with_guile anyway... Passes tests on my machine.
Committing to give buildbots a go at it.
| Andy Wingo | 2011-05-26 | 1 | -18/+2 |
* | pthread-threads.h: only redirect to GC_pthread_sigmask if it is present...* configure.ac: Check for pthread_sigmask.
* libguile/gen-scmconfig.c: Create SCM_HAVE_GC_PTHREAD_SIGMASK.
* libguile/pthread-threads.h (scm_i_pthread_sigmask): Only redirect to
GC_pthread_sigmask if GC_pthread_sigmask is present.
| Andy Wingo | 2011-04-03 | 1 | -0/+4 |
* | fix compilation with libgc 7.0, 7.1...* configure.ac: Check for GC_pthread_exit and GC_pthread_cancel.
* libguile/gen-scmconfig.c: Write HAVE_GC_PTHREAD_CANCEL and
HAVE_GC_PTHREAD_EXIT into scmconfig.h.
* libguile/pthread-threads.h (scm_i_pthread_exit, scm_i_pthread_cancel):
Only redefine to their GC_pthread_* variants if we have those
functions, which is not the case in libgc < 7.2.
| Andy Wingo | 2011-03-29 | 1 | -0/+11 |
* | threading / with_guile refactor to use more GC_stack_base...* libguile/init.h:
* libguile/init.c (scm_i_init_guile): Change arg to this internal
function from SCM_STACKITEM* to void*. Actually it's a
struct GC_stack_base*.
* libguile/bdw-gc.h: Don't do pthread redirects, because we don't want
to affect applications' pthread_* bindings.
* libguile/pthread-threads.h (scm_i_pthread_create)
(scm_i_pthread_detach, scm_i_pthread_exit, scm_i_pthread_cancel)
(scm_i_pthread_sigmask): Do pthread redirects here, in this internal
header.
* libguile/threads.h: Remove declaration of internal
scm_i_with_guile_and_parent. Remove declaration of undefined
scm_threads_init_first_thread. Make declaration of internal
scm_threads_prehistory actually internal, and take a void* (actually a
struct GC_stack_base*).
* libguile/threads.c (GC_get_stack_base): Implement a shim if this
function is unavailable, and fold in the implementations of
get_thread_stack_base.
(GC_call_with_stack_base): Actually implement.
(guilify_self_1): Take a GC_stack_base* as an arg.
(scm_i_init_thread_for_guile): Likewise, and set up libgc for
registration of other threads.
(scm_init_guile): Use GC_get_stack_base instead of our own guesswork.
(with_guile_and_parent, scm_i_with_guile_and_parent): Rework to
trampoline through a GC_call_with_stack_base.
(scm_threads_prehistory): Pass the "base" arg on to guilify_self_1.
| Andy Wingo | 2011-03-25 | 1 | -7/+7 |
* | Rename "boehm-gc.h" to "bdw-gc.h"; add to the distribution....* libguile/Makefile.am (modinclude_HEADERS): Add `bdw-gc.h'.
* libguile/bdw-gc.h: Rename from "boehm-gc.h"; users updated. Update to
LGPLv3+.
| Ludovic Courtès | 2009-09-14 | 1 | -1/+1 |
* | Merge branch 'master' into boehm-demers-weiser-gc...Conflicts:
lib/Makefile.am
libguile/Makefile.am
libguile/frames.c
libguile/gc-card.c
libguile/gc-freelist.c
libguile/gc-mark.c
libguile/gc-segment.c
libguile/gc_os_dep.c
libguile/load.c
libguile/macros.c
libguile/objcodes.c
libguile/programs.c
libguile/strings.c
libguile/vm.c
m4/gnulib-cache.m4
m4/gnulib-comp.m4
m4/inline.m4
| Ludovic Courtès | 2009-08-18 | 1 | -6/+7 |
|\ |
|
| * | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
* | | Merge commit '2e77f7202b11ad0003831fcff94ec7db80cca015' into boehm-demers-wei......Conflicts:
libguile/threads.c
| Ludovic Courtès | 2008-09-10 | 1 | -1/+8 |
|\| |
|
| * | Changes from arch/CVS synchronization | Ludovic Courtès | 2007-10-20 | 1 | -0/+3 |
| * | Changes from arch/CVS synchronization | Ludovic Courtès | 2007-10-10 | 1 | -1/+5 |
* | | Merge commit 'f30e1bdf97ae8b2b2918da585f887a4d3a23a347' into boehm-demers-wei......Conflicts:
libguile/Makefile.am
libguile/coop-pthreads.c
libguile/gc-freelist.c
libguile/gc-segment.c
libguile/gc.c
libguile/private-gc.h
test-suite/tests/environments.nottest
| Ludovic Courtès | 2008-09-10 | 1 | -1/+5 |
|\| |
|
| * | merge from 1.8 branch | Kevin Ryde | 2006-10-09 | 1 | -1/+5 |
* | | Use thread-local allocation (significant perf. improvement!); added the `boeh......* libguile/Makefile.am (modinclude_HEADERS): Added `boehm-gc.h'.
* libguile/coop-defs.h: Use "libguile/boehm-gc.h" instead of <gc/gc.h>.
* libguile/coop-threads.h: Likewise.
* libguile/coop.c: Likewise.
* libguile/gc.c: Likewise.
(scm_storage_prehistory): Invoke `GC_init ()'.
* libguile/guardians.c: Use "libguile/boehm-gc.h" instead of <gc/gc.h>.
* libguile/inline.h: Likewise.
(scm_double_cell): Use `GC_MALLOC' instead of `GC_malloc'.
* libguile/pthread-threads.h: Use "libguile/boehm-gc.h" instead of
<gc/gc.h>.
* libguile/smob.c: Likewise.
* libguile/smob.h: Likewise.
* libguile/struct.c: Likewise.
* libguile/threads.c: Likewise.
* libguile/weaks.c: Likewise.
git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-51
| Ludovic Courtes | 2008-09-10 | 1 | -2/+1 |
* | | Tell `libgc' that we're using POSIX threads. This fixes Guile on PPC....* libguile/coop-defs.h: If `GUILE_PTHREAD_COMPAT' is defined, then define
`GC_THREADS' and include <gc/gc.h> after <pthread.h>.
* libguile/coop-pthreads.h: Likewise.
* libguile/pthread-threads.h: Likewise.
git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-10
| Ludovic Court`es | 2008-09-05 | 1 | -0/+4 |
|/ |
|
* | merge from 1.8 branch | Kevin Ryde | 2006-04-17 | 1 | -1/+1 |
* | Renamed the "frames" that are related to dynamic-wind to "dynamic...contexts. Renamed all functions from scm_frame_ to scm_dynwind_.
Updated documentation.
| Marius Vollmer | 2006-01-29 | 1 | -1/+1 |
* | * null-threads.h, pthread-threads.h...(SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER): Removed.
(scm_i_pthread_mutexattr_recursive): New.
* threads.c (scm_i_pthread_mutexattr_recursive): Declare.
(scm_i_critical_section_mutex): Do not initialize statically.
(scm_threads_prehistory): Initialize
scm_i_pthread_mutexattr_recursive and scm_i_critical_section_mutex
here.
* eval.c (source_mutex): Do not initialiaze statically.
(scm_init_eval): Do it here, using
scm_i_pthread_mutexattr_recursive.
| Marius Vollmer | 2005-10-23 | 1 | -2/+1 |
* | The FSF has a new address. | Marius Vollmer | 2005-05-23 | 1 | -1/+1 |
* | See ChangeLog from 2005-03-02. | Marius Vollmer | 2005-03-02 | 1 | -47/+55 |
* | Changed license terms to the plain LGPL thru-out. | Marius Vollmer | 2003-04-05 | 1 | -35/+11 |
* | * Makefile.am (modinclude_HEADERS): Added threads-plugin.h....(EXTRA_DIST): Added threads-plugin.c.
* threads-plugin.h, threads-plugin.c: New files.
* threads.h: #include "libguile/threads-plugin.h".
* threads.c: #include "libguile/threads-plugin.c".
* pthread-threads.c: Temporarily remove debugging functions.
* threads.c, threads.h (scm_yield): Added back.
| Mikael Djurfeldt | 2002-12-18 | 1 | -56/+2 |
* | * threads.c (really_launch): Detach before unlocking...thread_admin_mutex in order not to risk being joined.
(scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
thread_admin_mutex locked during GC.
* pthread-threads.c, pthread-threads.h: Improvements to debugging
functions.
| Mikael Djurfeldt | 2002-12-18 | 1 | -12/+4 |
* | * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added...support for debugging mutex operations.
| Mikael Djurfeldt | 2002-12-16 | 1 | -1/+10 |
* | * threads.c (scm_thread): Removed filed joining_threads....(thread_print): Print thread number as well as address of thread
structure.
(scm_join_thread): Bugfix.
(scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
scm_timed_wait_condition_variable, scm_signal_condition_variable,
scm_broadcast_condition_variable): Use the low-level API.
(scm_all_threads): Return copy of thread list (to prevent
unintended destruction).
(scm_threads_prehistory): Initialize heap_mutex of fake thread.
| Mikael Djurfeldt | 2002-12-16 | 1 | -11/+41 |
* | * pthread-threads.c, pthread-threads.h, threads.c: Fixes to...pthread "native" recursive mutex support.
| Mikael Djurfeldt | 2002-12-16 | 1 | -7/+13 |
* | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions....Simply lock a thread C API recursive mutex.
(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): Removed.
* eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
direct calls to scm_rec_mutex_lock / unlock around the three calls
to scm_m_expand_body.
* eval.c, eval.h (promise_free): New function.
(scm_force): Rewritten; Now thread-safe; Removed
SCM_DEFER/ALLOW_INTS.
* pthread-threads.h: Added partially implemented plugin interface
for recursive mutexes. These are, for now, only intended to be
used internally within the Guile implementation.
* pthread-threads.c: New file.
* threads.c: Conditionally #include "pthread-threads.c".
* eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
thread-safe;
* snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
SCM_GLOBAL_REC_MUTEX): New macros.
* eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
macros---use mutexes instead.
* tags.h (SCM_IM_FUTURE): New tag.
* eval.c (scm_m_future): New primitive macro.
(SCM_CEVAL): Support futures.
(unmemocopy): Support unmemoization of futures.
* print.c (scm_isymnames): Name of future isym.
| Mikael Djurfeldt | 2002-12-15 | 1 | -0/+24 |
* | * __scm.h (SCM_ALLOW_INTS_ONLY): Removed....(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): New macros.
(SCM_CRITICAL_SECTION_START/END): Defined here.
* eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
the three calls to scm_m_expand_body.
* gc.h: #include "libguile/pthread-threads.h";
(SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
* gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
scm_t_key;
* gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
access.
* gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
* gc-freelist.c, threads.c (really_launch): Use
SCM_FREELIST_CREATE.
* gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
* gc.c (scm_i_expensive_validation_check, scm_gc,
scm_gc_for_newcell): Put threads to sleep before doing GC-related
heap administration so that those pieces of code are executed
single-threaded. We might consider rewriting these code sections
in terms of a "call_gc_code_singly_threaded" construct instead of
calling the pair of scm_i_thread_put_to_sleep () and
scm_i_thread_wake_up (). Also, we would want to have as many of
these sections eleminated.
* init.c (scm_init_guile_1): Call scm_threads_prehistory.
* inline.h: #include "libguile/threads.h"
* pthread-threads.h: Macros now conform more closely to the
pthreads interface. Some of them now take a second argument.
* threads.c, threads.h: Many changes.
* configure.in: Temporarily replaced "copt" threads option with new
option "pthreads".
(USE_PTHREAD_THREADS): Define if pthreads configured.
| Mikael Djurfeldt | 2002-12-09 | 1 | -30/+33 |
* | * pthread-threads.h: New, implement pthread-like API by deferring to...pthread itself.
| Marius Vollmer | 2002-12-02 | 1 | -0/+99 |