summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 1614bfe925..34f3ad8629 100644
--- a/thread.c
+++ b/thread.c
@@ -3350,6 +3350,17 @@ static const rb_data_type_t mutex_data_type = {
{mutex_mark, mutex_free, mutex_memsize,},
};
+VALUE
+rb_obj_is_mutex(VALUE obj)
+{
+ if (rb_typeddata_is_kind_of(obj, &mutex_data_type)) {
+ return Qtrue;
+ }
+ else {
+ return Qfalse;
+ }
+}
+
static VALUE
mutex_alloc(VALUE klass)
{