diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-07 20:47:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-07 20:47:02 +0000 |
commit | 7dc192a5a454d5f977d69f86dd656965dcb05a95 (patch) | |
tree | f0117a2caff4874dd09ff185eb5f54bee9551f9d /include | |
parent | 8e43b181a4e37b5ca32821f152fba2a6a3af8ec6 (diff) | |
download | ruby-7dc192a5a454d5f977d69f86dd656965dcb05a95.tar.gz ruby-7dc192a5a454d5f977d69f86dd656965dcb05a95.tar.xz ruby-7dc192a5a454d5f977d69f86dd656965dcb05a95.zip |
* include/ruby/io.h (rb_io_t): added write_lock to serialize.
[ruby-core:19668]
* gc.c (gc_mark_children): mark write_lock.
* gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be
deferred.
* io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/io.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h index d406b3226..04af3d07e 100644 --- a/include/ruby/io.h +++ b/include/ruby/io.h @@ -73,6 +73,7 @@ typedef struct rb_io_t { VALUE writeconv_pre_ecopts; int writeconv_initialized; + VALUE write_lock; } rb_io_t; #define HAVE_RB_IO_T 1 @@ -133,6 +134,7 @@ typedef struct rb_io_t { fp->encs.enc2 = NULL;\ fp->encs.ecflags = 0;\ fp->encs.ecopts = Qnil;\ + fp->write_lock = 0;\ } while (0) FILE *rb_io_stdio_file(rb_io_t *fptr); |