Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
|
#include "ccan/list/list.h"
Go to the source code of this file.
Data Structures | |
struct | sync_waiter |
struct | rb_mutex_struct |
struct | queue_waiter |
struct | rb_condvar |
struct | sleep_call |
Macros | |
#define | MUTEX_ALLOW_TRAP FL_USER1 |
#define | mutex_mark NULL |
#define | queue_waitq(q) UNALIGNED_MEMBER_PTR(q, waitq) |
#define | szqueue_waitq(sq) UNALIGNED_MEMBER_PTR(sq, q.waitq) |
#define | szqueue_pushq(sq) UNALIGNED_MEMBER_PTR(sq, pushq) |
#define | QUEUE_CLOSED FL_USER5 |
#define | DEFINE_CLASS(name, super) rb_c##name = define_thread_class(rb_cThread, #name, rb_c##super) |
Typedefs | |
typedef struct rb_mutex_struct | rb_mutex_t |
Functions | |
VALUE | rb_obj_is_mutex (VALUE obj) |
VALUE | rb_mutex_new (void) |
VALUE | rb_mutex_locked_p (VALUE self) |
VALUE | rb_mutex_trylock (VALUE self) |
VALUE | rb_mutex_lock (VALUE self) |
VALUE | rb_mutex_owned_p (VALUE self) |
VALUE | rb_mutex_unlock (VALUE self) |
VALUE | rb_mutex_sleep (VALUE self, VALUE timeout) |
VALUE | rb_mutex_synchronize (VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg) |
void | rb_mutex_allow_trap (VALUE self, int val) |
PACKED_STRUCT_UNALIGNED (struct rb_queue { struct list_head waitq;rb_serial_t fork_gen;const VALUE que;int num_waiting;}) | |
PACKED_STRUCT_UNALIGNED (struct rb_szqueue { struct rb_queue q;int num_waiting_push;struct list_head pushq;long max;}) | |
NORETURN (static void raise_closed_queue_error(VALUE self)) | |
#define DEFINE_CLASS | ( | name, | |
super | |||
) | rb_c##name = define_thread_class(rb_cThread, #name, rb_c##super) |
#define MUTEX_ALLOW_TRAP FL_USER1 |
Definition at line 13 of file thread_sync.c.
#define mutex_mark NULL |
Definition at line 81 of file thread_sync.c.
#define QUEUE_CLOSED FL_USER5 |
Definition at line 632 of file thread_sync.c.
#define queue_waitq | ( | q | ) | UNALIGNED_MEMBER_PTR(q, waitq) |
Definition at line 557 of file thread_sync.c.
#define szqueue_pushq | ( | sq | ) | UNALIGNED_MEMBER_PTR(sq, pushq) |
Definition at line 566 of file thread_sync.c.
#define szqueue_waitq | ( | sq | ) | UNALIGNED_MEMBER_PTR(sq, q.waitq) |
Definition at line 565 of file thread_sync.c.
typedef struct rb_mutex_struct rb_mutex_t |
NORETURN | ( | static void | raise_closed_queue_errorVALUE self | ) |
PACKED_STRUCT_UNALIGNED | ( | struct rb_queue { struct list_head waitq;rb_serial_t fork_gen;const VALUE que;int num_waiting;} | ) |
PACKED_STRUCT_UNALIGNED | ( | struct rb_szqueue { struct rb_queue q;int num_waiting_push;struct list_head pushq;long max;} | ) |
Definition at line 545 of file thread_sync.c.
References Check_TypedStruct.
Definition at line 333 of file thread_sync.c.
Referenced by rb_mutex_synchronize().
Definition at line 177 of file thread_sync.c.
Definition at line 165 of file thread_sync.c.
Definition at line 345 of file thread_sync.c.
References GET_THREAD, and sync_waiter::th.
Definition at line 465 of file thread_sync.c.
References NIL_P, rb_ensure(), rb_mutex_unlock(), rb_time_interval(), and time().
Definition at line 522 of file thread_sync.c.
References arg, rb_ensure(), rb_mutex_lock(), and rb_mutex_unlock().
Definition at line 203 of file thread_sync.c.
Definition at line 403 of file thread_sync.c.
References err.
Referenced by rb_mutex_sleep(), and rb_mutex_synchronize().
Definition at line 131 of file thread_sync.c.
References obj, and rb_typeddata_is_kind_of().