summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-04-27 20:54:10 +0200
committerAndy Wingo <wingo@pobox.com>2016-04-28 08:16:42 +0200
commitee4854a315a902d64c6de0ff27ac2d423dc75600 (patch)
treee977c89d9e445fcc146459c049489e6f2e8fba73
parent15d53047233ad3d3b1ac39764d3c417e3b87f118 (diff)
downloadguile-ee4854a315a902d64c6de0ff27ac2d423dc75600.tar.gz
Remove port locking around write, display
* libguile/print.c (scm_write, scm_display): * libguile/read.c (set_port_read_option): Remove port locking. Reading and writing to the same port from multiple threads just must not crash; it doesn't have to make sense.
-rw-r--r--libguile/print.c8
-rw-r--r--libguile/read.c5
2 files changed, 0 insertions, 13 deletions
diff --git a/libguile/print.c b/libguile/print.c
index 514a725c2..ff0dab3ec 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -1527,11 +1527,7 @@ scm_write (SCM obj, SCM port)
port = scm_current_output_port ();
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_write);
-
- scm_dynwind_begin (0);
- scm_dynwind_lock_port (SCM_COERCE_OUTPORT (port));
scm_prin1 (obj, port, 1);
- scm_dynwind_end ();
return SCM_UNSPECIFIED;
}
@@ -1546,11 +1542,7 @@ scm_display (SCM obj, SCM port)
port = scm_current_output_port ();
SCM_ASSERT (scm_valid_oport_value_p (port), port, SCM_ARG2, s_display);
-
- scm_dynwind_begin (0);
- scm_dynwind_lock_port (SCM_COERCE_OUTPORT (port));
scm_prin1 (obj, port, 0);
- scm_dynwind_end ();
return SCM_UNSPECIFIED;
}
diff --git a/libguile/read.c b/libguile/read.c
index ca9694f89..20de0bb9b 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -2252,9 +2252,6 @@ set_port_read_option (SCM port, int option, int new_value)
new_value &= READ_OPTION_MASK;
- scm_dynwind_begin (0);
- scm_dynwind_lock_port (port);
-
scm_read_options = scm_i_port_property (port, sym_port_read_options);
if (scm_is_unsigned_integer (scm_read_options, 0, READ_OPTIONS_MAX_VALUE))
read_options = scm_to_uint (scm_read_options);
@@ -2264,8 +2261,6 @@ set_port_read_option (SCM port, int option, int new_value)
read_options |= new_value << option;
scm_read_options = scm_from_uint (read_options);
scm_i_set_port_property_x (port, sym_port_read_options, scm_read_options);
-
- scm_dynwind_end ();
}
/* Set OPTS and PORT's case-insensitivity according to VALUE. */