2020-04-10 01:11:40 -04:00
|
|
|
#ifndef RUBY_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
|
2012-07-10 09:57:11 -04:00
|
|
|
#define RUBY_THREAD_H 1
|
2020-04-10 01:11:40 -04:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @author $Author: matz $
|
|
|
|
* @date Tue Jul 10 17:35:43 JST 2012
|
|
|
|
* @copyright Copyright (C) 2007 Yukihiro Matsumoto
|
|
|
|
* @copyright This file is a part of the programming language Ruby.
|
|
|
|
* Permission is hereby granted, to either redistribute and/or
|
|
|
|
* modify this file, provided that the conditions mentioned in the
|
|
|
|
* file COPYING are met. Consult the file for details.
|
|
|
|
*/
|
2012-07-10 09:57:11 -04:00
|
|
|
#include "ruby/intern.h"
|
2020-05-08 05:31:09 -04:00
|
|
|
#include "ruby/internal/dllexport.h"
|
2012-07-10 09:57:11 -04:00
|
|
|
|
2019-01-04 08:14:11 -05:00
|
|
|
/* flags for rb_nogvl */
|
|
|
|
#define RB_NOGVL_INTR_FAIL (0x1)
|
|
|
|
#define RB_NOGVL_UBF_ASYNC_SAFE (0x2)
|
|
|
|
|
2020-05-04 02:52:56 -04:00
|
|
|
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
2012-07-10 09:57:11 -04:00
|
|
|
|
|
|
|
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
|
2012-11-28 08:01:25 -05:00
|
|
|
|
2012-07-10 09:57:11 -04:00
|
|
|
void *rb_thread_call_without_gvl(void *(*func)(void *), void *data1,
|
|
|
|
rb_unblock_function_t *ubf, void *data2);
|
2012-11-28 08:01:25 -05:00
|
|
|
void *rb_thread_call_without_gvl2(void *(*func)(void *), void *data1,
|
|
|
|
rb_unblock_function_t *ubf, void *data2);
|
2012-07-18 02:47:43 -04:00
|
|
|
|
2019-01-04 08:14:11 -05:00
|
|
|
/*
|
|
|
|
* XXX: unstable/unapproved - out-of-tree code should NOT not depend
|
|
|
|
* on this until it hits Ruby 2.6.1
|
|
|
|
*/
|
|
|
|
void *rb_nogvl(void *(*func)(void *), void *data1,
|
|
|
|
rb_unblock_function_t *ubf, void *data2,
|
|
|
|
int flags);
|
|
|
|
|
2012-11-28 08:01:25 -05:00
|
|
|
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_AFTER 0x01
|
|
|
|
#define RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS_
|
2012-07-10 09:57:11 -04:00
|
|
|
|
2020-05-04 02:52:56 -04:00
|
|
|
RBIMPL_SYMBOL_EXPORT_END()
|
2012-07-10 09:57:11 -04:00
|
|
|
|
|
|
|
#endif /* RUBY_THREAD_H */
|