summaryrefslogtreecommitdiff
path: root/include/ruby/io.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-07 20:47:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-07 20:47:02 +0000
commit551dfe9d8b9877d81b0ca87aff004c11383b698d (patch)
treef0117a2caff4874dd09ff185eb5f54bee9551f9d /include/ruby/io.h
parentf8cdd9907a9076b8e628060a38e9d641625f4c8e (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/io.h')
-rw-r--r--include/ruby/io.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/io.h b/include/ruby/io.h
index d406b32264..04af3d07e3 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);