summaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 04:22:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 04:22:04 +0000
commitde91f81fa170e8dabcb4c158c9ab8fcc07a78405 (patch)
tree3b9d56591e73a9ef1249baecec40ead117734964 /vm_core.h
parent516d09189fd15c21d9735edd4515da5597be25a0 (diff)
downloadruby-de91f81fa170e8dabcb4c158c9ab8fcc07a78405.tar.gz
ruby-de91f81fa170e8dabcb4c158c9ab8fcc07a78405.tar.xz
ruby-de91f81fa170e8dabcb4c158c9ab8fcc07a78405.zip
* vm_core.h (struct rb_vm_struct): replaced signal staff with trap
staff. * signal.c (signal_buff): per process resouce now. * signal.c (trap_list): moved to VM. * signal.c (rb_get_next_signal): reverted. * signal.c (rb_trap_exit): trap_pending_list was no longer used. * thread.c (timer_thread_function): delivers buffered per-process signals to each VMs. * vm.c (rb_vm_mark): marks trap_list. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/vm_core.h b/vm_core.h
index 3c4dec076..130f6c2b2 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -38,6 +38,8 @@
#ifndef NSIG
# ifdef DJGPP
# define NSIG SIGMAX
+# elif defined MACOS_UNUSE_SIGNAL
+# define NSIG 1
# else
# define NSIG (_SIGMAX + 1) /* For QNX */
# endif
@@ -323,8 +325,10 @@ struct rb_vm_struct
struct st_table *loading_table;
/* signal */
- int signal_buff[RUBY_NSIG];
- int buffered_signal_size;
+ struct {
+ VALUE cmd;
+ int safe;
+ } trap_list[RUBY_NSIG];
/* hook */
rb_event_hook_t *event_hooks;
@@ -682,7 +686,7 @@ extern rb_vm_t *ruby_current_vm;
#define GET_VM() ruby_current_vm
#define GET_THREAD() ruby_current_thread
-#define rb_thread_set_current_raw(th) (ruby_current_thread = th)
+#define rb_thread_set_current_raw(th) (void)(ruby_current_thread = (th))
#define rb_thread_set_current(th) do { \
rb_thread_set_current_raw(th); \
th->vm->running_thread = th; \