mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-20 02:30:23 +02:00
* ports.c, ports.h (scm_i_port_table_mutex): New mutex.
* fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex. * ports.c (scm_close_port, scm_flush_all_ports): Ditto. * ioext.c (scm_fdes_to_ports): Ditto. * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into lock/unlock scm_i_port_table_mutex. * strports.c (scm_mkstrport): Ditto. * ports.c (scm_void_port, scm_port_for_each): Ditto. * fports.c (scm_fdes_to_port): Ditto.
This commit is contained in:
parent
359aab2498
commit
b9ad392e86
7 changed files with 53 additions and 19 deletions
|
@ -3,7 +3,7 @@
|
|||
#ifndef SCM_PORTS_H
|
||||
#define SCM_PORTS_H
|
||||
|
||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "libguile/print.h"
|
||||
#include "libguile/struct.h"
|
||||
#include "libguile/threads.h"
|
||||
|
||||
/* Not sure if this is a good idea. We need it for off_t. */
|
||||
#include <sys/types.h>
|
||||
|
@ -110,6 +111,7 @@ typedef struct
|
|||
|
||||
SCM_API scm_t_port **scm_i_port_table;
|
||||
SCM_API long scm_i_port_table_size; /* Number of ports in scm_i_port_table. */
|
||||
SCM_API scm_t_mutex scm_i_port_table_mutex;
|
||||
|
||||
#define SCM_READ_BUFFER_EMPTY_P(c_port) (c_port->read_pos >= c_port->read_end)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue