From a3ba982c75719cbe4e3372ad73d3f4cee9caae59 Mon Sep 17 00:00:00 2001 From: kosaki Date: Sun, 19 Dec 2010 16:18:16 +0000 Subject: [PATCH] * io.c (Init_IO): Added O_DIRECT. This feature was propsed by Run Paint Run Run. [Feature #4015] [ruby-core:33018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ io.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 527ea6382d..579dbaa712 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 20 01:55:03 2010 KOSAKI Motohiro + + * io.c (Init_IO): Added O_DIRECT. This feature was propsed by Run Paint Run Run. + [Feature #4015] [ruby-core:33018] + Sun Dec 19 19:15:23 2010 Tanaka Akira * marshal.c: parenthesize macro arguments. diff --git a/io.c b/io.c index 55d8eb5e16..26ab703eb3 100644 --- a/io.c +++ b/io.c @@ -10509,6 +10509,10 @@ Init_IO(void) /* do not change atime */ rb_file_const("NOATIME", INT2FIX(O_NOATIME)); /* Linux */ #endif +#ifdef O_DIRECT + /* Try to minimize cache effects of the I/O to and from this file. */ + rb_file_const("DIRECT", INT2FIX(O_DIRECT)); +#endif sym_mode = ID2SYM(rb_intern("mode")); sym_perm = ID2SYM(rb_intern("perm"));