aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c
index eee2a52a37a..711f67d1df1 100644
--- a/src/data.c
+++ b/src/data.c
@@ -258,6 +258,12 @@ for example, (type-of 1) returns `integer'. */)
258 return Qfont_entity; 258 return Qfont_entity;
259 if (FONT_OBJECT_P (object)) 259 if (FONT_OBJECT_P (object))
260 return Qfont_object; 260 return Qfont_object;
261 if (THREADP (object))
262 return Qthread;
263 if (MUTEXP (object))
264 return Qmutex;
265 if (CONDVARP (object))
266 return Qcondition_variable;
261 return Qvector; 267 return Qvector;
262 268
263 case Lisp_Float: 269 case Lisp_Float:
@@ -528,6 +534,33 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
528 return Qnil; 534 return Qnil;
529} 535}
530 536
537DEFUN ("threadp", Fthreadp, Sthreadp, 1, 1, 0,
538 doc: /* Return t if OBJECT is a thread. */)
539 (Lisp_Object object)
540{
541 if (THREADP (object))
542 return Qt;
543 return Qnil;
544}
545
546DEFUN ("mutexp", Fmutexp, Smutexp, 1, 1, 0,
547 doc: /* Return t if OBJECT is a mutex. */)
548 (Lisp_Object object)
549{
550 if (MUTEXP (object))
551 return Qt;
552 return Qnil;
553}
554
555DEFUN ("condition-variable-p", Fcondition_variable_p, Scondition_variable_p,
556 1, 1, 0,
557 doc: /* Return t if OBJECT is a condition variable. */)
558 (Lisp_Object object)
559{
560 if (CONDVARP (object))
561 return Qt;
562 return Qnil;
563}
531 564
532/* Extract and set components of lists. */ 565/* Extract and set components of lists. */
533 566
@@ -3756,6 +3789,9 @@ syms_of_data (void)
3756 DEFSYM (Qchar_table, "char-table"); 3789 DEFSYM (Qchar_table, "char-table");
3757 DEFSYM (Qbool_vector, "bool-vector"); 3790 DEFSYM (Qbool_vector, "bool-vector");
3758 DEFSYM (Qhash_table, "hash-table"); 3791 DEFSYM (Qhash_table, "hash-table");
3792 DEFSYM (Qthread, "thread");
3793 DEFSYM (Qmutex, "mutex");
3794 DEFSYM (Qcondition_variable, "condition-variable");
3759 3795
3760 DEFSYM (Qdefun, "defun"); 3796 DEFSYM (Qdefun, "defun");
3761 3797
@@ -3796,6 +3832,9 @@ syms_of_data (void)
3796 defsubr (&Ssubrp); 3832 defsubr (&Ssubrp);
3797 defsubr (&Sbyte_code_function_p); 3833 defsubr (&Sbyte_code_function_p);
3798 defsubr (&Schar_or_string_p); 3834 defsubr (&Schar_or_string_p);
3835 defsubr (&Sthreadp);
3836 defsubr (&Smutexp);
3837 defsubr (&Scondition_variable_p);
3799 defsubr (&Scar); 3838 defsubr (&Scar);
3800 defsubr (&Scdr); 3839 defsubr (&Scdr);
3801 defsubr (&Scar_safe); 3840 defsubr (&Scar_safe);