aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 34ecfe697d6..2a75dfcbc7d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -367,6 +367,7 @@ enum pvec_type
367 PVEC_OTHER, 367 PVEC_OTHER,
368 PVEC_THREAD, 368 PVEC_THREAD,
369 PVEC_MUTEX, 369 PVEC_MUTEX,
370 PVEC_CONDVAR,
370 /* These last 4 are special because we OR them in fns.c:internal_equal, 371 /* These last 4 are special because we OR them in fns.c:internal_equal,
371 so they have to use a disjoint bit pattern: 372 so they have to use a disjoint bit pattern:
372 if (!(size & (PVEC_COMPILED | PVEC_CHAR_TABLE 373 if (!(size & (PVEC_COMPILED | PVEC_CHAR_TABLE
@@ -557,6 +558,7 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
557 XUNTAG (a, Lisp_Vectorlike))) 558 XUNTAG (a, Lisp_Vectorlike)))
558#define XTHREAD(a) (eassert (THREADP (a)), (struct thread_state *) XPNTR(a)) 559#define XTHREAD(a) (eassert (THREADP (a)), (struct thread_state *) XPNTR(a))
559#define XMUTEX(a) (eassert (MUTEXP (a)), (struct Lisp_Mutex *) XPNTR(a)) 560#define XMUTEX(a) (eassert (MUTEXP (a)), (struct Lisp_Mutex *) XPNTR(a))
561#define XCONDVAR(a) (eassert (CONDVARP (a)), (struct Lisp_CondVar *) XPNTR(a))
560 562
561/* Construct a Lisp_Object from a value or address. */ 563/* Construct a Lisp_Object from a value or address. */
562 564
@@ -609,6 +611,7 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
609#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)) 611#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE))
610#define XSETTHREAD(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_THREAD)) 612#define XSETTHREAD(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_THREAD))
611#define XSETMUTEX(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_MUTEX)) 613#define XSETMUTEX(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_MUTEX))
614#define XSETCONDVAR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CONDVAR))
612 615
613/* Convenience macros for dealing with Lisp arrays. */ 616/* Convenience macros for dealing with Lisp arrays. */
614 617
@@ -1709,6 +1712,7 @@ typedef struct {
1709#define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME) 1712#define FRAMEP(x) PSEUDOVECTORP (x, PVEC_FRAME)
1710#define THREADP(x) PSEUDOVECTORP (x, PVEC_THREAD) 1713#define THREADP(x) PSEUDOVECTORP (x, PVEC_THREAD)
1711#define MUTEXP(x) PSEUDOVECTORP (x, PVEC_MUTEX) 1714#define MUTEXP(x) PSEUDOVECTORP (x, PVEC_MUTEX)
1715#define CONDVARP(x) PSEUDOVECTORP (x, PVEC_CONDVAR)
1712 1716
1713/* Test for image (image . spec) */ 1717/* Test for image (image . spec) */
1714#define IMAGEP(x) (CONSP (x) && EQ (XCAR (x), Qimage)) 1718#define IMAGEP(x) (CONSP (x) && EQ (XCAR (x), Qimage))
@@ -1833,6 +1837,9 @@ typedef struct {
1833#define CHECK_MUTEX(x) \ 1837#define CHECK_MUTEX(x) \
1834 CHECK_TYPE (MUTEXP (x), Qmutexp, x) 1838 CHECK_TYPE (MUTEXP (x), Qmutexp, x)
1835 1839
1840#define CHECK_CONDVAR(x) \
1841 CHECK_TYPE (CONDVARP (x), Qcondition_variablep, x)
1842
1836/* Since we can't assign directly to the CAR or CDR fields of a cons 1843/* Since we can't assign directly to the CAR or CDR fields of a cons
1837 cell, use these when checking that those fields contain numbers. */ 1844 cell, use these when checking that those fields contain numbers. */
1838#define CHECK_NUMBER_CAR(x) \ 1845#define CHECK_NUMBER_CAR(x) \
@@ -2455,7 +2462,7 @@ extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qinteger_or_marker_p, Qvectorp;
2455extern Lisp_Object Qbuffer_or_string_p; 2462extern Lisp_Object Qbuffer_or_string_p;
2456extern Lisp_Object Qfboundp; 2463extern Lisp_Object Qfboundp;
2457extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p; 2464extern Lisp_Object Qchar_table_p, Qvector_or_char_table_p;
2458extern Lisp_Object Qthreadp, Qmutexp; 2465extern Lisp_Object Qthreadp, Qmutexp, Qcondition_variablep;
2459 2466
2460extern Lisp_Object Qcdr; 2467extern Lisp_Object Qcdr;
2461 2468