diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 00:47:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 00:47:18 +0000 |
commit | 8669ddb9d078f8e10fc27df8fe5649b5437afe85 (patch) | |
tree | 77faa9f8cf1601f672e720f5dcbe8936aebcf5b1 /include | |
parent | 4bb8b76761ffa9a94754aa381fa2c7089a2ccb6d (diff) | |
download | ruby-8669ddb9d078f8e10fc27df8fe5649b5437afe85.tar.gz ruby-8669ddb9d078f8e10fc27df8fe5649b5437afe85.tar.xz ruby-8669ddb9d078f8e10fc27df8fe5649b5437afe85.zip |
* include/rubysig.h: old macros for backward compatibility.
* thread.c (BLOCKING_REGION): rewritten using helper functions.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/rubysig.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/include/rubysig.h b/include/rubysig.h index 954612793..6a0cf0ef9 100644 --- a/include/rubysig.h +++ b/include/rubysig.h @@ -1 +1,33 @@ -#include "ruby/signal.h" +/********************************************************************** + + rubysig.h - + + $Author$ + $Date$ + created at: Wed Aug 16 01:15:38 JST 1995 + + Copyright (C) 1993-2008 Yukihiro Matsumoto + +**********************************************************************/ + +#if defined __GNUC__ +#warning rubysig.h is obsolete +#elif defined _MSC_VER || defined __BORLANDC__ +#pragma message("warning: rubysig.h is obsolete") +#endif + +#ifndef RUBYSIG_H +#define RUBYSIG_H +#include "ruby/ruby.h" + +struct rb_blocking_region_buffer; +RUBY_EXTERN struct rb_blocking_region_buffer *rb_thread_blocking_region_begin(void); +RUBY_EXTERN void rb_thread_blocking_region_end(struct rb_blocking_region_buffer *); +#define TRAP_BEG do {void *__region = rb_thread_blocking_region_begin(void); +#define TRAP_END rb_thread_blocking_region_end(__region);} while (0) +#define RUBY_CRITICAL(statements) do {statements;} while (0) +#define DEFER_INTS (0) +#define ENABLE_INTS (1) +#define ALLOW_INTS do {CHECK_INTS;} while (0) +#define CHECK_INTS rb_thread_check_ints() +#endif |