Project

General

Profile

Actions

Bug #1130

closed

[PATCH] extern rb_thread_blocking_region_begin/end

Added by tmm1 (Aman Karmani) almost 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.1p0 (2009-01-30 revision 21907) [x86_64-linux]
Backport:
[ruby-core:21929]

Description

=begin
rubysig.h uses:

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 *);

which compiles and links, but does not run:

/tmp/ruby19/bin/ruby: symbol lookup error: ext.so: undefined symbol: _Z31rb_thread_blocking_region_beginv

this patch fixes the issue:

--- ruby-1.9.1-p0/include/ruby/intern.h 2009-01-16 22:38:58.000000000 -0800
+++ ruby-1.9.1-p0/include/ruby/intern.h.new 2009-02-07 23:18:10.000000000 -0800
@@ -701,6 +701,8 @@
int rb_thread_interrupted(VALUE thval);
VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1,
rb_unblock_function_t *ubf, void *data2);
+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 RUBY_UBF_IO ((rb_unblock_function_t *)-1)
#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
VALUE rb_mutex_new(void);
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0