зеркало из https://github.com/github/ruby.git
* thread.c (rb_thread_check_ints): added. please note that
this function may cause ruby's thread switching. * include/ruby/intern.h: ditto. * regint.h: use rb_thread_check_ints() instead of RUBY_CHECK_INTS() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d4b7cc796c
Коммит
8f1e7a37e5
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
Wed Aug 13 17:18:37 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* thread.c (rb_thread_check_ints): added. please note that
|
||||
this function may cause ruby's thread switching.
|
||||
|
||||
* include/ruby/intern.h: ditto.
|
||||
|
||||
* regint.h: use rb_thread_check_ints() instead of
|
||||
RUBY_CHECK_INTS() directly.
|
||||
|
||||
Wed Aug 13 17:01:36 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* golf_prelude.rb, lib/set.rb (TC_Set#test_each),
|
||||
|
|
|
@ -654,6 +654,7 @@ VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ..
|
|||
/* thread.c */
|
||||
typedef void rb_unblock_function_t(void *);
|
||||
typedef VALUE rb_blocking_function_t(void *);
|
||||
void rb_thread_check_ints(void);
|
||||
VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1,
|
||||
rb_unblock_function_t *ubf, void *data2);
|
||||
#define RB_UBF_DFL ((rb_unblock_function_t *)-1)
|
||||
|
|
3
regint.h
3
regint.h
|
@ -115,8 +115,7 @@
|
|||
|
||||
#ifdef RUBY
|
||||
|
||||
#include "vm_core.h"
|
||||
#define CHECK_INTERRUPT_IN_MATCH_AT RUBY_VM_CHECK_INTS()
|
||||
#define CHECK_INTERRUPT_IN_MATCH_AT rb_thread_check_ints()
|
||||
#define onig_st_init_table st_init_table
|
||||
#define onig_st_init_table_with_size st_init_table_with_size
|
||||
#define onig_st_init_numtable st_init_numtable
|
||||
|
|
13
thread.c
13
thread.c
|
@ -877,6 +877,19 @@ rb_thread_polling(void)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* CAUTION: This function causes thread switching.
|
||||
* rb_thread_check_ints() check ruby's interrupts.
|
||||
* some interrupt needs thread switching/invoke handlers,
|
||||
* and so on.
|
||||
*/
|
||||
|
||||
void
|
||||
rb_thread_check_ints(void)
|
||||
{
|
||||
RUBY_VM_CHECK_INTS();
|
||||
}
|
||||
|
||||
struct timeval rb_time_timeval();
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче