Ruby  2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
thread.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  thread.h -
4 
5  $Author: matz $
6  created at: Tue Jul 10 17:35:43 JST 2012
7 
8  Copyright (C) 2007 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #ifndef RUBY_THREAD_H
13 #define RUBY_THREAD_H 1
14 
15 #if defined(__cplusplus)
16 extern "C" {
17 #if 0
18 } /* satisfy cc-mode */
19 #endif
20 #endif
21 
22 #include "ruby/intern.h"
23 
24 /* flags for rb_nogvl */
25 #define RB_NOGVL_INTR_FAIL (0x1)
26 #define RB_NOGVL_UBF_ASYNC_SAFE (0x2)
27 
29 
30 void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
31 
32 void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
33  rb_unblock_function_t *ubf, void *data2);
34 void *rb_thread_call_without_gvl2(void *(*func)(void *), void *data1,
35  rb_unblock_function_t *ubf, void *data2);
36 
37 /*
38  * XXX: unstable/unapproved - out-of-tree code should NOT not depend
39  * on this until it hits Ruby 2.6.1
40  */
41 void *rb_nogvl(void *(*func)(void *), void *data1,
42  rb_unblock_function_t *ubf, void *data2,
43  int flags);
44 
45 #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
46 #define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
47 
49 
50 #if defined(__cplusplus)
51 #if 0
52 { /* satisfy cc-mode */
53 #endif
54 } /* extern "C" { */
55 #endif
56 
57 #endif /* RUBY_THREAD_H */
rb_thread_call_without_gvl2
void * rb_thread_call_without_gvl2(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2)
Definition: thread.c:1581
RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
rb_nogvl
void * rb_nogvl(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2, int flags)
Definition: thread.c:1452
intern.h
rb_thread_call_without_gvl
void * rb_thread_call_without_gvl(void *(*func)(void *), void *data1, rb_unblock_function_t *ubf, void *data2)
rb_unblock_function_t
void rb_unblock_function_t(void *)
Definition: intern.h:940
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
rb_thread_call_with_gvl
RUBY_SYMBOL_EXPORT_BEGIN void * rb_thread_call_with_gvl(void *(*func)(void *), void *data1)
Definition: thread.c:1662