1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
Commit graph

109 commits

Author SHA1 Message Date
Ludovic Courtès
93f68a5ac4 Remove set-but-unused variables from libguile.
* libguile/filesys.c (scm_readdir): Remove set-but-unused `namlen' variable.
* libguile/fports.c (fport_flush): Same for `written'.
* libguile/gc-segment.c (scm_i_initialize_heap_segment_data): Same
  for `bvec_ptr'.
* libguile/posix.c (scm_nice): Same for `nice_value'.
* libguile/scmsigs.c (take_signal): Same for `count'.
* libguile/srfi-4.c (uvec_to_list): Same for `elts'.
* libguile/stacks.c (scm_stack_ref): Same for `c_index'.
* libguile/threads.c (scm_std_select): Same for `count'.
* libguile/throw.c (scm_ithrow): Same for `answer'.
* libguile/unif.c (scm_i_read_array): Same for `got_rank'.
2012-05-23 14:55:38 +02:00
Neil Jerram
e4d87bf9fd Avoid clash with system setjmp/longjmp on IA64
Problem was that if an application includes both libguile.h and the
system's setjmp.h, and is compiled on IA64, it gets compile errors
because of jmp_buf, setjmp and longjmp being multiply defined.

* libguile/__scm.h (__ia64__): Define scm_i_jmp_buf, SCM_I_SETJMP and
  SCM_I_LONGJMP instead of jmp_buf, setjmp and longjmp.

  (all other platforms): Map scm_i_jmp_buf, SCM_I_SETJMP and
  SCM_I_LONGJMP to jmp_buf, setjmp and longjmp.

* libguile/continuations.c (scm_make_continuation): Use `SCM_I_SETJMP'
  instead of `setjmp'.
  (copy_stack_and_call): Use `SCM_I_LONJMP' instead of `longjmp'.
  (scm_ia64_longjmp): Use type `scm_i_jmp_buf' instead of `jmp_buf'.

* libguile/continuations.h (scm_t_contregs): Use type `scm_i_jmp_buf'
  instead of `jmp_buf'.

* libguile/threads.c (suspend): Use `SCM_I_SETJMP' instead of
  `setjmp'.

* libguile/threads.h (scm_i_thread): Use type `scm_i_jmp_buf' instead
  of `jmp_buf'.

* libguile/throw.c (JBJMPBUF, make_jmpbuf, jmp_buf_and_retval): Use
  type `scm_i_jmp_buf' instead of `jmp_buf'.
  (scm_c_catch): Use `SCM_I_SETJMP' instead of `setjmp'.
  (scm_ithrow): Use `SCM_I_LONGJMP' instead of `longjmp'.
2009-08-21 22:15:56 +01:00
Neil Jerram
9d9a58e184 For MinGW hide exported struct variables behind pointers
MinGW apparently can't export/import struct variables from/to a DLL,
so wrap the ones needed by inline.h in exported/imported pointer
variables.

All of the following changes apply to a MinGW build only.

* libguile/gc-freelist.c (scm_i_master_freelist_ptr,
  scm_i_master_freelist2_ptr): New API variables.

* libguile/gc.h (scm_i_freelist_ptr, scm_i_freelist2_ptr,
  scm_i_master_freelist_ptr, scm_i_master_freelist2_ptr): New global
  variable declarations.

* libguile/inline.h (scm_cell): Use scm_i_freelist_ptr and
  scm_i_master_freelist_ptr instead of scm_i_freelist and
  scm_i_master_freelist.
  (scm_double_cell): Use scm_i_freelist2_ptr and
  scm_i_master_freelist2_ptr instead of scm_i_freelist2 and
  scm_i_master_freelist2.

* libguile/threads.c (scm_i_freelist_ptr, scm_i_freelist2_ptr): New
  global variables.
2009-06-29 21:15:12 +01:00
Neil Jerram
66f3b6c1b0 Remove possible deadlock in scm_join_thread
* libguile/threads.c (scm_join_thread): Always recheck t->exited
  before calling block_self again, in case thread t has now exited.

* test-suite/tests/threads.test (joining): New test.
2009-05-20 21:56:17 +01:00
Neil Jerram
3009b5d557 Fix spurious `throw from within critical section' errors
The crux of this problem was that the thread doing a throw, and so
checking scm_i_critical_section_level, was different from the thread
that was in a critical section.

* libguile/async.h (scm_i_critical_section_level): Removed, replaced
  by per-thread critical_section_level.
  (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END): Use
  per-thread critical_section_level.

* libguile/continuations.c (scm_dynthrow): Check per-thread
  critical_section_level.

* libguile/threads.c (guilify_self_1): Init per-thread
  critical_section_level.
  (scm_i_critical_section_level): Removed.

* libguile/threads.h (scm_i_thread): New critical_section_level field.

* libguile/throw.c (scm_ithrow): Check per-thread critical_section_level.
2009-03-25 18:54:34 +00:00
Neil Jerram
acb9cffee0 Lock ordering: don't lock heap_mutex and then thread_admin_mutex
This fixes the following helgrind report.

Thread #1: lock order "0x4325084 before 0x4105328" violated
   at 0x40234F7: pthread_mutex_lock (hg_intercepts.c:408)
   by 0x40D01EA: scm_i_thread_put_to_sleep (threads.c:1622)
   by 0x4078958: scm_make_fluid (fluids.c:114)
   by 0x40778D6: scm_init_feature (feature.c:101)
   by 0x408C62E: scm_i_init_guile (init.c:464)
   by 0x40D1873: scm_i_init_thread_for_guile (threads.c:583)
   by 0x40D18B4: scm_i_with_guile_and_parent (threads.c:725)
   by 0x40D19BD: scm_with_guile (threads.c:714)
   by 0x408C42E: scm_boot_guile (init.c:350)
   by 0x8048710: main (guile.c:69)
  Required order was established by acquisition of lock at 0x4325084
   at 0x40234F7: pthread_mutex_lock (hg_intercepts.c:408)
   by 0x40CFFA4: guilify_self_1 (threads.c:468)
   by 0x408C58B: scm_i_init_guile (init.c:421)
   by 0x40D1873: scm_i_init_thread_for_guile (threads.c:583)
   by 0x40D18B4: scm_i_with_guile_and_parent (threads.c:725)
   by 0x40D19BD: scm_with_guile (threads.c:714)
   by 0x408C42E: scm_boot_guile (init.c:350)
   by 0x8048710: main (guile.c:69)
  followed by a later acquisition of lock at 0x4105328
   at 0x40234F7: pthread_mutex_lock (hg_intercepts.c:408)
   by 0x40CFFAC: guilify_self_1 (threads.c:470)
   by 0x408C58B: scm_i_init_guile (init.c:421)
   by 0x40D1873: scm_i_init_thread_for_guile (threads.c:583)
   by 0x40D18B4: scm_i_with_guile_and_parent (threads.c:725)
   by 0x40D19BD: scm_with_guile (threads.c:714)
   by 0x408C42E: scm_boot_guile (init.c:350)
   by 0x8048710: main (guile.c:69)

* threads.c (guilify_self_1): Add self to global thread list _before_
  entering Guile mode.
2009-03-04 22:20:52 +00:00
Ludovic Courtès
b12a5fd7f6 Check the return value of libc's functions to make `_FORTIFY_SOURCE=2' work.
This fixes bug #24009 reported by Martin Pitt.

* libguile/threads.c (guilify_self_1): Check the return value of
  pipe(2).
  (scm_std_select): Store the return value of read(2) when reading
  from WAKEUP_FD.

* libguile/async.c (scm_i_queue_async_cell): Store the return value
  of write(2) when writing to SLEEP_FD.

* libguile/fports.c (fport_flush): Likewise.

* libguile/posix.c (getgroups): Use the return value of getgroups(2) as
  NGROUPS.
  (scm_nice): Get the return value of nice(2) to make glibc happy.

* libguile/scmsigs.c (take_signal): Store the return value of
  write(2).
2008-11-30 18:58:57 +01:00
Ludovic Courtès
cd1a1e47b5 Update the thread stack base when `scm_with_guile' is invoked multiple times.
* NEWS: Update.

* libguile/threads.c (scm_i_init_thread_for_guile): When the thread is
  already guilified, update `t->base' so that it corresponds to the new
  stack base.  Bug report and patch by Linas Vepstas <linasvepstas@gmail.com>.

* test-suite/standalone/Makefile.am (test_scm_with_guile_CFLAGS,
  test_scm_with_guile_LDADD): New.
  (check_PROGRAMS, TESTS): Add `test-scm-with-guile'.
2008-11-14 00:35:32 +01:00
Ludovic Courtès
c18ed8cead Fix compilation error due to strict aliasing rules on `i386-unknown-freebsd7.0'.
* libguile/threads.c (scm_threads_mark_stacks): Cast `&t->regs' to
  `(void *)' rather than `(SCM_STACKITEM *)' to avoid "warning:
  dereferencing type-punned pointer will break strict-aliasing rules"
  with GCC 4.2.1 on `i386-unknown-freebsd7.0'.
2008-10-10 10:00:21 +02:00
Ludovic Courtès
7a4e0d105e Include <config.h> in all C files; use #ifdef HAVE_CONFIG_H' rather than #if'. 2008-09-13 15:49:50 +02:00
Julian Graham
1eb4952693 Resolve a deadlock caused by not checking mutex state after calling `SCM_TICK'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2008-09-08 14:32:22 +02:00
Ludovic Courtès
e210266510 Use AC_USE_SYSTEM_EXTENSIONS' instead of the obsolete AC_AIX', etc. 2008-08-20 19:02:41 +02:00
Neil Jerram
78aa4a8850 Fix continuation problems on IA64.
* Specific problems in IA64 make check

** test-unwind

Representation of the relevant dynamic context:

                  non-rewindable
           catch      frame       make cont.
  o----o-----a----------b-------------c
        \
         \             call cont.
          o-----o-----------d

A continuation is captured at (c), with a non-rewindable frame in the
dynamic context at (b).  If a rewind through that frame was attempted,
Guile would throw to the catch at (a).  Then the context unwinds back
past (a), then winds forwards again, and the captured continuation is
called at (d).

We should end up at the catch at (a).  On ia64, we get an "illegal
instruction".

The problem is that Guile does not restore the ia64 register backing
store (RBS) stack (which is saved off when the continuation is
captured) until all the unwinding and rewinding is done.  Therefore,
when the rewind code (scm_i_dowinds) hits the non-rewindable frame at
(b), the RBS stack hasn't yet been restored.  The throw finds the
jmp_buf (for the catch at (a)) correctly from the dynamic context, and
jumps back to (a), but the RBS stack is invalid, hence the illegal
instruction.

This could be fixed by restoring the RBS stack earlier, at the same
point (copy_stack) where the normal stack is restored.  But that
causes a problem in the next test...

** continuations.test

The dynamic context diagram for this case is similar:

                   non-rewindable
  catch                 frame       make cont.
    a----x-----o----------b-------------c
          \
           \    call cont.
            o-------d

The only significant difference is that the catch point (a) is
upstream of where the dynamic context forks.  This means that the RBS
stack at (d) already contains the correct RBS contents for throwing
back to (a), so it doesn't matter whether the RBS stack that was saved
off with the continuation gets restored.

This test passes with the Guile 1.8.4 code, but fails (with an
"illegal instruction") when the code is changed to restore the RBS
stack earlier as described above.

The problem now is that the RBS stack is being restored _too_ early;
specifically when there is still stuff to do that relies on the old
RBS contents.  When a continuation is called, the sequence of relevant
events is:

  (1) Grow the (normal) stack until it is bigger than the (normal)
      stack saved off in the continuation.  (scm_dynthrow, grow_stack)

  (2) scm_i_dowinds calls itself recursively, such that

      (2.1) for each rewind (from (x) to (c)) that will be needed,
            another frame is added to the stack (both normal and RBS),
            with local variables specifying the required rewind; the
            rewinds don't actually happen yet, they will happen when
            the stack unwinds again through these frames

      (2.2) required unwinds - back from where the continuation was
            called (d) to the fork point (x) - are done immediately.

  (3) The normal (i.e. non-RBS) stack that was stored in the
      continuation is restored (i.e. copied on top of the actual
      stack).

      Note that this doesn't overwrite the frames that were added in
      (2.1), because the growth in (1) ensures that the added frames
      are beyond the end of the restored stack.

  (4) ? Restore the RBS stack here too ?

  (5) Return (from copy_stack) through the (2.1) frames, which means
      that the rewinds now happen.

  (6) setcontext (or longjmp) to the context (c) where the
      continuation was captured.

The trouble is that step (1) does not create space in the RBS stack in
the same kind of way that it does for the normal stack.  Therefore, if
the saved (in the continuation) RBS stack is big enough, it can
overwrite the RBS of the (2.1) frames that still need to complete.
This causes an illegal instruction when we return through those frames
and try to perform the rewinds.

* Fix

The key to the fix is that the saved RBS stack only needs to be
restored at some point before the next setcontext call, and that doing
it as close to the setcontext call as possible will avoid bad
interactions with the pre-setcontext stack.  Therefore we do the
restoration at the last possible point, immediately before the next
setcontext call.

The situation is complicated by there being two ways that the next
setcontext call can happen.

  - If the unwinding and rewinding is all successful, the next
    setcontext will be the one from step (6) above.  This is the
    "normal" continuation invocation case.

  - If one of the rewinds throws an error, the next setcontext will
    come from the throw implementation code.  (And the one in step (6)
    will never happen.)  This is the rewind error case.

In the rewind error case, the code calling setcontext knows nothing
about the continuation.  So to cover both cases, we:

  - copy (in step (4) above) the address and length of the
    continuation's saved RBS stack to the current thread state
    (SCM_I_CURRENT_THREAD)

  - modify all setcontext callers so that they check the current
    thread state for a saved RBS stack, and restore it if so before
    calling setcontext.

* Notes

** I think rewinders cannot rely on using any stack data

Unless it can be guaranteed that the data won't go into a register.
I'm not 100% sure about this, but I think it follows from the fact
that the RBS stack is not restored until after the rewinds have
happened.

Note that this isn't a regression caused by the current fix.  In Guile
1.8.4, the RBS stack was restored _after_ the rewinds, and this is
still the case now.

** Most setcontext calls for `throw' don't need to change the RBS stack

In the absence of continuation invocation, the setcontext call in the
throw implementation code always sets context to a place higher up the
same stack (both normal and RBS), hence no stack restoration is
needed.

* Other changes

** Using setcontext for all non-local jumps (for __ia64__)

Along the way, I read a claim somewhere that setcontext was more
reliable than longjmp, in cases where the stack has been manipulated.

I don't now have any reason to believe this, but it seems reasonable
anyway to leave the __ia64__ code using getcontext/setcontext, instead
of setjmp/longjmp.

(I think the only possible argument against this would be performance -
if getcontext was significantly slower than setjmp.  It that proves to
be the case, we should revisit this.)

** Capping RBS base for non-main threads

Somewhere else along the way, I hit a problem in GC, involving the RBS
stack of a non-main thread.  The problem was, in
SCM_MARK_BACKING_STORE, that scm_ia64_register_backing_store_base was
returning a value that was massively greater than the value of
scm_ia64_ar_bsp, leading to a seg fault.  This is because the
implementation of scm_ia64_register_backing_store_base is only valid
for the main thread.  I couldn't find a neat way of getting the true
RBS base of a non-main thread, but one idea is simply to call
scm_ia64_ar_bsp when guilifying a thread, and use the value returned
as an upper bound for that thread's RBS base.  (Note that the RBS
stack grows upwards.)

(Were it not for scm_init_guile, we could be much more definitive
about this.  We could take the value of scm_ia64_ar_bsp as a
definitive base address for the part of the RBS stack that Guile cares
about.  We could also then discard
scm_ia64_register_backing_store_base.)
2008-05-12 23:06:04 +01:00
Ludovic Courtès
7b5165f13e Changes from arch/CVS synchronization 2007-10-02 16:38:40 +00:00
Neil Jerram
97084119ee Merge of IA64 fix from CVS HEAD. 2007-01-28 16:36:38 +00:00
Kevin Ryde
b9054dfaea bit more comment on MacOS 2006-12-26 22:38:44 +00:00
Kevin Ryde
4b4b66cb00 (get_thread_stack_base): Add a version using
pthread_get_stackaddr_np (when available), for the benefit of MacOS.
2006-12-26 22:07:05 +00:00
Kevin Ryde
2ca35efa8e (get_thread_stack_base): In mingw with pthreads we can use
the basic scm_get_stack_base.  As advised by Nils Durner.
2006-12-26 19:52:09 +00:00
Kevin Ryde
1169fab3c4 Bit more of:
* threads.c (thread_print): Cope with the case where pthread_t is a
	struct, as found on mingw.  Can't just cast to size_t for printing.
	Reported by Nils Durner.
Should be scm_i_pthread_t of course, to cope with null-threads.h.
2006-12-14 23:13:51 +00:00
Kevin Ryde
31a691a58e (thread_print): Cope with the case where pthread_t is a
struct, as found on mingw.  Can't just cast to size_t for printing.
2006-12-13 23:55:51 +00:00
Kevin Ryde
3d9ff38eac (get_thread_stack_base): Restrict HAVE_PTHREAD_GETATTR_NP
on pthreads version, since pthread_getattr_np not available on solaris
and macos.  Reported by Claes Wallin.
2006-07-25 00:09:30 +00:00
Kevin Ryde
d568a582ef Include <string.h>, needed for memset() which is used by
FD_ZERO() on Solaris 10.  Reported by Claes Wallin.
2006-07-21 00:09:52 +00:00
Marius Vollmer
50a64877dd * threads.c (get_thread_stack_base): Use scm_get_stack_base
instead of accessing __libc_stack_end directly, and only do this
when pthread_attr_getstack is known not to work for the main
thread or when not using pthreads at all.

* gc_os_dep.c (scm_get_stack_base): Abort when the machine type is
unknown instead of returning NULL.
2006-03-25 22:24:21 +00:00
Neil Jerram
b82115b8ba (do_unlock): Renamed from "unlock", which is defined
in unistd.h on QNX.  (Reported by Matt Kraai.)
2006-03-10 23:04:46 +00:00
Marius Vollmer
0ab652a386 Added 2006 to copyright years in every file, as per the new rules. 2006-02-12 13:42:52 +00:00
Marius Vollmer
661ae7ab6b Renamed the "frames" that are related to dynamic-wind to "dynamic
contexts.  Renamed all functions from scm_frame_ to scm_dynwind_.
Updated documentation.
2006-01-29 00:23:28 +00:00
Marius Vollmer
9864812182 (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Removed from
public API.  See comment at scm_without_guile for the rationale.
2005-12-06 20:15:24 +00:00
Marius Vollmer
d1138028c9 * 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.
2005-10-23 20:47:49 +00:00
Marius Vollmer
ecc9f40fe5 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
* socket.c: Remove obsolete comment about socklen_t.
(s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.

* numbers.h (isnan)[__MINGW32__]: Remove.

* Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
DEFAULT_INCLUDES when cross compiling.

* threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.

* stime.c (s_scm_strftime)[!HAVE_TM_ZONE]: Use
SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS.  (Changed slightly
from Jan's patch.)
2005-06-05 18:27:53 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Neil Jerram
b01532af77 * threads.c (s_scm_lock_mutex): Don't declare msg in middle of
code.

* gc.c (s_scm_gc_live_object_stats): Don't declare alist in middle
of code.

* gc-card.c (scm_i_card_statistics): Don't declare tag in middle
of code.
(scm_i_card_statistics): Add block for declarations of tag_as_scm
and current.
2005-05-11 07:41:36 +00:00
Mikael Djurfeldt
4c908f2c13 * async.h (scm_mask_ints): Removed left over reference to
scm_root.

* threads.c: Removed fprintf debug statements.
2005-03-24 10:21:22 +00:00
Marius Vollmer
1a8fdd7e12 (scm_i_thread): Added gc_running_p field.
(guilify_self_1): Initialize it.
2005-03-10 18:06:54 +00:00
Marius Vollmer
0c97d7dd66 (scm_i_frame_single_threaded): Removed.
(scm_i_thread): Removed unused signal_asyncs field.
(threads_mark): Do not mark it.
(guilify_self_1): Do not initialize it.  Do initialize
continuation_root field.
(do_thread_exit): Do not remove thread from all_threads list.
(on_thread_exit): Do it here, after leaving guile mode.
(sleep_level): Removed.
(scm_i_thread_put_to_sleep): Leave thread_admin_mutex locked when
returning.  Do not support recursive sleeps.
(scm_i_thread_wake_up): Expect thread_admin_mutex to be locked on
entry.  Do not support recursive sleeps.
2005-03-09 19:13:59 +00:00
Marius Vollmer
a4d106c70e * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START,
SCM_CRITICAL_SECTION_END): Moved here from threads.h since now
they also block/unblock execution of asyncs and call
scm_async_click which is declared in async.h but threads.h can not
include async.h since async.h already includes threads.h.
(scm_i_critical_section_level): New, for checking mistakes in the
use of the SCM_CRITICAL_SECTION_* macros.
(scm_i_critical_section_mutex): Make it a recursive mutex so that
critical sections can be nested.

* threads.h, threads.c (scm_frame_lock_mutex): New.
(scm_frame_critical_section): Take mutex as argument.
(framed_critical_section_mutex): New, used as default for above.
(scm_init_threads): Initialize it.
(scm_threads_prehistory): Do not initialize thread_admin_mutex and
scm_i_critical_section_mutex; both are initialized statically.
2005-03-07 21:30:24 +00:00
Marius Vollmer
ba1b72235a (scm_try_mutex): Renamed argument for consistency. 2005-03-04 17:54:50 +00:00
Marius Vollmer
9de87eea47 See ChangeLog from 2005-03-02. 2005-03-02 20:42:01 +00:00
Marius Vollmer
76da80e788 Reverted changed from 2005/01/24 19:14:54, which was a commit to the
wrong branch.  Sorry.
2005-01-24 23:41:14 +00:00
Marius Vollmer
a54a94b397 Threading changes. 2005-01-24 19:14:54 +00:00
Marius Vollmer
a95ba079dc (thread_print): Cast a pointer to size_t when printing
with scm_uintprint.
2004-11-02 22:45:36 +00:00
Marius Vollmer
0345e278f4 * variable.c, threads.c, struct.c, stackchk.c, smob.c, root.c,
print.c, ports.c, mallocs.c, hooks.c, hashtab.c, fports.c,
guardians.c, filesys.c, coop-pthreads.c, continuations.c: Use
scm_uintprint to print unsigned integers, raw heap words, and
adresses, using a cast to scm_t_bits to turn pointers into
integers.
2004-10-22 15:13:12 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
5915272270 (scm_threads_mark_stacks): Call SCM_MARK_BACKING_STORE. Also, do not
use stack_len local, it was only used once.
2004-09-20 21:46:07 +00:00
Stefan Jahn
edea856ce5 2004-09-03 Stefan Jahn <stefan@lkcc.org>
* configure.in (isinf): Let configure find the isinf() function
        on MinGW32 systems.

2004-09-03  Stefan Jahn  <stefan@lkcc.org>

        * threads.c (scm_threads_mark_stacks):  Fixed local variable
        definitions.

        * strings.c (scm_i_substring_copy, s_scm_string_append): Fixed
        local variable definitions.

        * stime.c (_POSIX_C_SOURCE):  Do not define this item on
        MinGW32 because it conflicts with its pthread headers.
        (s_scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
        (s_scm_strftime): Using scm_from_locale_string() instead of
        scm_makfrom0str().

        * posix.c (s_scm_putenv): Fixed typo in the !HAVE_UNSETENV
        part.

        * numbers.c (scm_init_numbers): Removed check_sanity() call
        inside GUILE_DEBUG.  The function has been removed somewhen...

        * filesys.c (_POSIX_C_SOURCE): Do not define this item on
        MinGW32 because it conflicts with its pthread headers.

2004-09-03  Stefan Jahn  <stefan@lkcc.org>

        * srfi-1.c, srfi-1.h: Renamed any 'lst1' into 'list1' because
        lst1 is a #define on Win32 systems.
2004-09-03 19:45:37 +00:00
Marius Vollmer
6087fad9c7 (gc_section_count): Removed, thread-sleeping can not
be nested.
(scm_i_thread_put_to_sleep): Call scm_i_leave_guile before locking
admin mutex so that we can be put to sleep by other threads while
blocking on that mutex.  Lock all the heap mutex of all threads,
including ourselves.
(scm_i_thread_wake_up): Unlock all threads, including ourselves,
call scm_i_enter_guile.
(scm_thread_mark_stacks): Expect all threads to be suspended.
2004-08-19 17:16:01 +00:00
Marius Vollmer
bc36d0502b * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
deprecated.h.  Replaced all uses with scm_is_eq.
2004-07-27 15:41:49 +00:00
Kevin Ryde
50dc184000 (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX. 2004-07-23 23:51:58 +00:00
Marius Vollmer
7888309be8 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:59:25 +00:00
Kevin Ryde
659998043d (scm_threads_mark_stacks) [SCM_STACK_GROWS_UP]: Correction
to stack marking call, two parameters and no cast on t->base.
2004-05-19 00:04:16 +00:00
Kevin Ryde
dc30aad370 (scm_threads_mark_stacks): Correction sizet -> size_t.
Reported by Andreas Vögele.
2004-04-28 00:15:54 +00:00