[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: Remove port locking around write, display
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/02: Remove port locking around write, display |
Date: |
Thu, 28 Apr 2016 06:16:51 +0000 |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit ee4854a315a902d64c6de0ff27ac2d423dc75600
Author: Andy Wingo <address@hidden>
Date: Wed Apr 27 20:54:10 2016 +0200
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.
---
libguile/print.c | 8 --------
libguile/read.c | 5 -----
2 files changed, 13 deletions(-)
diff --git a/libguile/print.c b/libguile/print.c
index 514a725..ff0dab3 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 ca9694f..20de0bb 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. */