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

32 commits

Author SHA1 Message Date
Marius Vollmer
5d5bd0183e Include "_scm.h" before testing HAVE_UNISTD_H. Thanks to Bill
Schottstaedt!
2002-11-03 17:18:28 +00:00
Marius Vollmer
1d0bde44b7 Replaced GUILE_ISELECT with
USE_COOP_THREADS.
(scm_internal_select): Define one version for USE_COOP_THREADS and
one for USE_NULL_THREADS.
(scm_init_iselect): Likewise.
2002-10-27 20:13:10 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +00:00
Neil Jerram
04a98cff96 * iselect.c (collisionp, gnfds, greadfds, gwritefds, gexceptfds,
rreadfds, rwritefds, rexceptfds): Made static.

	* gc.c (terminating), fports.c (terminating): Renamed
	scm_i_terminating.
2002-03-12 21:12:25 +00:00
Keisuke Nishida
f22ed5a028 Use memset instead of bzero. 2001-04-12 01:40:21 +00:00
Mikael Djurfeldt
e6e2e95aa5 * _scm.h: Removed #include <errno.h>.
* error.c, net_db.c, putenv.c, stime.c: Removed declaration of
errno variable (can be a macro on some systems, for example when
using linux libc with threads).

* error.c, filesys.c, gc.c, ioext.c, iselect.c, net_db.c, ports.c,
posix.c, print.c, putenv.c, scmsigs.c, script.c, simpos.c, smob.c,
socket.c, srcprop.c, stime.c, strop.c, unif.c, vports.c: Added
#include <errno.h> in these 20 out of 100 files.
2001-03-10 16:56:09 +00:00
Mikael Djurfeldt
e75341b38d * coop.c: Inserted #include <stdio.h>.
* iselect.c: Reinserted #include <stdio.h>.
2001-03-10 03:09:07 +00:00
Keisuke Nishida
783e777478 Remove #include <stdio.h>. Add #include <string.h>. 2001-03-09 23:33:41 +00:00
Marius Vollmer
8dc9439fc6 * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,
continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c,
environments.c, eq.c, error.c, eval.c, evalext.c, feature.c,
filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c,
hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c,
list.c, load.c, macros.c, modules.c, net_db.c, numbers.c,
objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c,
print.c, procprop.c, procs.c, properties.c, ramap.c, random.c,
read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c,
socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c,
strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c,
tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c,
version.c, vports.c, weaks.c: Makes sure the snarfer output
inclusion is disabled when the snarfer is run on the file.  Thanks
to Lars J. Aas!

* Makefile.am: Install guile-procedures.txt in version-specific
directory to enable multiple installed guile versions.  Suggested
by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
2000-11-17 16:25:05 +00:00
Marius Vollmer
a26f1191e3 * iselect.c: Include <unistd.h>. Thanks to Bertrand Petit! 2000-08-05 14:33:31 +00:00
Mikael Djurfeldt
c507087791 * iselect.c (SCM_NLONGBITS): Add workaround for the Sun 4.2
compiler.
2000-06-12 21:25:10 +00:00
Mikael Djurfeldt
a059974535 * Makefile.am (DEFS): Added. automake adds -I options to DEFS,
and we don't want that.
(INCLUDES): Removed all -I options except for the root source
directory and the root build directory.

* *.*: Change includes so that they always use the "prefixes"
libguile/, qt/, guile-readline/, or libltdl/.
(Thanks to Tim Mooney.)
2000-04-21 14:16:44 +00:00
Mikael Djurfeldt
26cbcbf968 * iselect.c (add_fd_sets): Insert empty statement after label.
(Thanks to Tim Mooney.)
2000-04-03 19:45:20 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Dirk Herrmann
28b3236d36 Only include async.h where it is actually needed. 2000-03-18 09:16:48 +00:00
Mikael Djurfeldt
1cbf4dea5b * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
end.  Also let scm_internal_select be a real function also when
not using threads.
2000-03-13 10:47:14 +00:00
Mikael Djurfeldt
dd276c8eb3 * iselect.c (coop_timout_qinsert): Moved to coop.c 2000-03-12 00:34:19 +00:00
Jim Blandy
7f0f3eaa5f * iselect.c, threads.c: Doc fixes. 1998-10-03 13:33:24 +00:00
Jim Blandy
4d3bacdd7d Getting rid of more warnings...
* iselect.c: Test for MISSING_BZERO_DECL, not DECLARE_BZERO; see
today's change to ../configure.in.
* scmsigs.c: Test for MISSING_USLEEP_DECL, not DECLARE_USLEEP.
* scmconfig.h.in: Regenertaded.de.,.__
* stime.c (strptime): Declare this, #ifdef MISSING_STRPTIME_DECL.
(scm_localtime, scm_mktime): Use a const char * to manipulate the
time zone name.
1998-10-03 08:00:05 +00:00
Mikael Djurfeldt
95f44da944 * iselect.c: Use LONG_MAX instead of ULONG_MAX for increased
portability.
(finalize_fd_sets): Added empty statement after last case label.
(Thanks to Nicolas Neuss.)
1998-07-12 13:23:50 +00:00
Mikael Djurfeldt
b8ff5fe924 * iselect.c: Declare bzero if not defined by OS. 1998-04-20 00:39:31 +00:00
Mikael Djurfeldt
d90ca38d06 * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
1998-02-06 18:55:29 +00:00
Mikael Djurfeldt
c69dfa6575 * coop.c, iselect.c: Since thread switches are now performed with
interrupts masked, we can't use the old mechanism of delivering
signals immediately when they arrive.  Signals must instead be
delivered when the asyncs run *after* the end of the critical
section in scm_internal_select.  But this also means after context
switch so that the signal will be delivered to a different thread.
To avoid this, I have changed the protocol of
coop_wait_for_runnable_thread and friends so that they are allowed
to return the original thread.  So, if a signal arrives during
scm_internal_select, we won't any longer be forced do a context
switch, but can remain in the same thread and deliver the signal
to it.

* iselect.c: Small fixes.
1998-01-30 21:08:26 +00:00
Mikael Djurfeldt
3237b129f7 * iselect.c: Small fixes. 1998-01-26 01:42:43 +00:00
Mikael Djurfeldt
a48b6916e2 * iselect.c: Now several threads can wait on the same file
descriptor.  The behaviour is compatible with OS select: All
threads waiting for the fd return with the same status.
1998-01-24 01:50:43 +00:00
Mikael Djurfeldt
cafc12ffdd * filesys.c (set_element): Return file descriptor.
(fill_select_type): Return the highest file descriptor.
(scm_select): Tell select about the highest file descriptor.  On
some systems the SELECT_SET_SIZE can be as much as 128 bytes.
Therefore the extra overhead for calculating the maximum fd seems
to be more than compensated.  Is this correct?  In any case,
scm_internal_select will be much faster with this info.
(scm_select, fill_select_type, set_element): Don't accept any kind
of object in the file descriptor list or vector.
1997-12-08 18:15:44 +00:00
Mikael Djurfeldt
c44bfbc946 * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
errno macro expansion of this field name.  (errno is a C
preprocessor macro on some systems.)
1997-11-30 10:36:13 +00:00
Tim Pierce
756fa4f89b Doc fix. 1997-11-30 02:35:18 +00:00
Tim Pierce
e085f7a634 * iselect.c: #ifdef USE_THREADS around thread-related includes.
* dynl-dl.c (sysdep_dynl_func): Check both USCORE and
	DLSYM_ADDS_USCORE to decide whether to add an underscore.
1997-11-28 22:58:10 +00:00
Mikael Djurfeldt
c718cb0702 * iselect.c (coop_next_runnable_thread,
coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
(scm_internal_select): Disable interrupts during the parts of the
code which manipulate the sleep queue and the file descriptors.
1997-11-28 01:11:12 +00:00
Mikael Djurfeldt
81e81a5cb7 * iselect.c (coop_next_runnable_thread,
coop_wait_for_runnable_thread): Disable interrupts so that no
async is executed before a potential error_revive.
1997-11-28 00:50:58 +00:00
Mikael Djurfeldt
3666451eb0 * iselect.h, iselect.c: New files. Implements
scm_internal_select.  (See NEWS.)
1997-11-27 18:06:33 +00:00