[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 10/15: Remove locking in scm_end_input
From: |
Andy Wingo |
Subject: |
[Guile-commits] 10/15: Remove locking in scm_end_input |
Date: |
Tue, 26 Apr 2016 21:38:55 +0000 |
wingo pushed a commit to branch wip-port-refactor
in repository guile.
commit abf90c4e72fd7cd6573f77b06239e2e6c2f47fce
Author: Andy Wingo <address@hidden>
Date: Tue Apr 26 22:11:41 2016 +0200
Remove locking in scm_end_input
* libguile/ports.c (scm_end_input): Sadly, we can't naively lock around
the scm_port_buffer_take, as it might throw. Will revisit in the
future.
---
libguile/ports.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/libguile/ports.c b/libguile/ports.c
index 8405a0a..2062f58 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -2383,11 +2383,8 @@ scm_end_input (SCM port)
size_t discarded;
pt = SCM_PTAB_ENTRY (port);
-
- scm_i_pthread_mutex_lock (pt->lock);
buf = SCM_PTAB_ENTRY (port)->read_buf;
discarded = scm_port_buffer_take (buf, NULL, (size_t) -1);
- scm_i_pthread_mutex_unlock (pt->lock);
if (discarded != 0)
SCM_PORT_DESCRIPTOR (port)->seek (port, -discarded, SEEK_CUR);
- [Guile-commits] branch wip-port-refactor updated (5a342f6 -> 15d5304), Andy Wingo, 2016/04/26
- [Guile-commits] 01/15: Refactor thread safety for %port-property, Andy Wingo, 2016/04/26
- [Guile-commits] 03/15: scm_c_read instead of scm_c_read_unlock, Andy Wingo, 2016/04/26
- [Guile-commits] 02/15: Refactor to internal get/peek-byte functions, Andy Wingo, 2016/04/26
- [Guile-commits] 04/15: Remove port rw_active field, Andy Wingo, 2016/04/26
- [Guile-commits] 08/15: Remove scm_unget_{byte,bytes}_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 06/15: Remove scm_c_read_bytes_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 10/15: Remove locking in scm_end_input,
Andy Wingo <=
- [Guile-commits] 05/15: Remove scm_flush_unlocked / scm_end_input_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 11/15: Remove scm_fill_input_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 09/15: scm_ungetc, scm_ungets instead of _unlocked variants, Andy Wingo, 2016/04/26
- [Guile-commits] 07/15: Replace scm_getc with scm_getc_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 14/15: Remove scm_c_write_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 15/15: scm_lfwrite, not scm_lfwrite_unlocked, Andy Wingo, 2016/04/26
- [Guile-commits] 12/15: Remove scm_putc_unlocked., Andy Wingo, 2016/04/26
- [Guile-commits] 13/15: Remove scm_puts_unlocked., Andy Wingo, 2016/04/26