summaryrefslogtreecommitdiff
path: root/ext/ffi_c/Call.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi_c/Call.h')
-rw-r--r--ext/ffi_c/Call.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/ffi_c/Call.h b/ext/ffi_c/Call.h
index 0b971f2..56bdd61 100644
--- a/ext/ffi_c/Call.h
+++ b/ext/ffi_c/Call.h
@@ -33,6 +33,8 @@
#ifndef RBFFI_CALL_H
#define RBFFI_CALL_H
+#include "Thread.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -85,6 +87,21 @@ Invoker rbffi_GetInvoker(struct FunctionType_* fnInfo);
extern VALUE rbffi_GetEnumValue(VALUE enums, VALUE value);
extern int rbffi_GetSignedIntValue(VALUE value, int type, int minValue, int maxValue, const char* typeName, VALUE enums);
+typedef struct rbffi_blocking_call {
+ rbffi_frame_t* frame;
+ void* function;
+ ffi_cif cif;
+ void **ffiValues;
+ void* retval;
+ void* params;
+#if !(defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL))
+ void* stkretval;
+#endif
+} rbffi_blocking_call_t;
+
+VALUE rbffi_do_blocking_call(void* data);
+VALUE rbffi_save_frame_exception(void *data, VALUE exc);
+
#ifdef __cplusplus
}
#endif