Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
thread.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_THREAD_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_THREAD_H
24#include "ruby/internal/cast.h"
26#include "ruby/internal/value.h"
27
29
30struct timeval;
31
32/* thread.c */
33void rb_thread_schedule(void);
34void rb_thread_wait_fd(int);
36void rb_thread_fd_close(int);
37int rb_thread_alone(void);
38void rb_thread_sleep(int);
40void rb_thread_sleep_deadly(void);
46VALUE rb_thread_create(VALUE (*)(void *), void*);
47void rb_thread_wait_for(struct timeval);
52void rb_thread_atfork(void);
58
59typedef void rb_unblock_function_t(void *);
61void rb_thread_check_ints(void);
63
64#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
65#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
71VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
72VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
73
75
76#endif /* RBIMPL_INTERN_THREAD_H */
Defines RBIMPL_CAST.
Tewaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
Thin wrapper to ruby/config.h.
void rb_thread_wait_for(struct timeval)
Definition: thread.c:1562
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
Definition: thread.c:5371
int rb_thread_interrupted(VALUE thval)
Definition: thread.c:1594
VALUE rb_thread_wakeup_alive(VALUE)
Definition: thread.c:2797
VALUE rb_thread_local_aref(VALUE, ID)
Definition: thread.c:3480
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
Definition: thread.c:5383
VALUE rb_mutex_new(void)
Definition: thread_sync.c:177
void rb_thread_wait_fd(int)
Definition: thread.c:4305
VALUE rb_thread_kill(VALUE)
Definition: thread.c:2694
VALUE rb_thread_run(VALUE)
Definition: thread.c:2835
VALUE rb_thread_main(void)
Definition: thread.c:2932
void rb_thread_sleep_forever(void)
Definition: thread.c:1524
VALUE rb_thread_wakeup(VALUE)
Definition: thread.c:2788
VALUE rb_mutex_trylock(VALUE mutex)
Definition: thread_sync.c:236
VALUE rb_mutex_locked_p(VALUE mutex)
Definition: thread_sync.c:189
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Definition: thread_sync.c:598
VALUE rb_thread_stop(void)
Definition: thread.c:2844
VALUE rb_thread_create(VALUE(*)(void *), void *)
Definition: thread.c:1119
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
Definition: thread.c:5395
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Definition: thread_sync.c:537
void rb_unblock_function_t(void *)
Definition: thread.h:59
void rb_thread_atfork_before_exec(void)
Definition: thread.c:4835
void rb_thread_check_ints(void)
Definition: thread.c:1577
VALUE rb_mutex_unlock(VALUE mutex)
Definition: thread_sync.c:474
void rb_thread_sleep_deadly(void)
Definition: thread.c:1531
int rb_thread_fd_writable(int)
Definition: thread.c:4311
void rb_thread_atfork(void)
Definition: thread.c:4830
VALUE rb_thread_current(void)
Definition: thread.c:2911
int rb_thread_alone(void)
Definition: thread.c:3757
void rb_thread_fd_close(int)
Definition: thread.c:2634
void rb_thread_sleep(int)
Definition: thread.c:1600
void rb_thread_schedule(void)
Definition: thread.c:1623
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
Definition: thread.c:3628
VALUE rb_blocking_function_t(void *)
Definition: thread.h:60
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
Definition: thread.c:5360
VALUE rb_mutex_lock(VALUE mutex)
Definition: thread_sync.c:402
Defines VALUE and ID.
unsigned long VALUE
Definition: value.h:38
unsigned long ID
Definition: value.h:39