mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
15d5304723
commit
ee4854a315
2 changed files with 0 additions and 13 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue