summaryrefslogtreecommitdiff
path: root/libguile/read.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-11-08 00:29:46 +0100
committerAndy Wingo <wingo@pobox.com>2011-11-08 00:55:01 +0100
commit4251ae2e282385be6d08b0fffab761fcc0fa93aa (patch)
tree1ed22a034053f088d63fa1c5bfd7f1dbb88a7043 /libguile/read.c
parentc932ce0b559ceb7a14846241d7b1856c7c3eea3b (diff)
downloadguile-4251ae2e282385be6d08b0fffab761fcc0fa93aa.tar.gz
locking on port buffering operations
* libguile/ports.c (scm_fill_input_unlocked, scm_fill_input) (scm_end_input, scm_end_input_unlocked, scm_flush) (scm_flush_unlocked): Add locking and _unlocked variants. * libguile/filesys.c: * libguile/fports.c: * libguile/gdbint.c: * libguile/r6rs-ports.c: * libguile/read.c: * libguile/rw.c: Adapt callers to use _unlocked variants.
Diffstat (limited to 'libguile/read.c')
-rw-r--r--libguile/read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/read.c b/libguile/read.c
index aef5804ae..97f770235 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -1588,7 +1588,7 @@ scm_i_scan_for_encoding (SCM port)
pt = SCM_PTAB_ENTRY (port);
if (pt->rw_active == SCM_PORT_WRITE)
- scm_flush (port);
+ scm_flush_unlocked (port);
if (pt->rw_random)
pt->rw_active = SCM_PORT_READ;
@@ -1596,7 +1596,7 @@ scm_i_scan_for_encoding (SCM port)
if (pt->read_pos == pt->read_end)
{
/* We can use the read buffer, and thus avoid a seek. */
- if (scm_fill_input (port) == EOF)
+ if (scm_fill_input_unlocked (port) == EOF)
return NULL;
bytes_read = pt->read_end - pt->read_pos;