summaryrefslogtreecommitdiff
path: root/libguile/pthread-threads.h
AgeCommit message (Collapse)AuthorFilesLines
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2002-12-18* Makefile.am (modinclude_HEADERS): Added threads-plugin.h.Mikael Djurfeldt1-56/+2
(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.
2002-12-18* threads.c (really_launch): Detach before unlockingMikael Djurfeldt1-12/+4
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.
2002-12-16* pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): AddedMikael Djurfeldt1-1/+10
support for debugging mutex operations.
2002-12-16* threads.c (scm_thread): Removed filed joining_threads.Mikael Djurfeldt1-11/+41
(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.
2002-12-16* pthread-threads.c, pthread-threads.h, threads.c: Fixes toMikael Djurfeldt1-7/+13
pthread "native" recursive mutex support.
2002-12-15* __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.Mikael Djurfeldt1-0/+24
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.
2002-12-09* __scm.h (SCM_ALLOW_INTS_ONLY): Removed.Mikael Djurfeldt1-30/+33
(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.
2002-12-02* pthread-threads.h: New, implement pthread-like API by deferring toMarius Vollmer1-0/+99
pthread itself.