+#define IMQ_NULL ((ipc_mqueue_t) 0)
+
+#define imq_wait_queue data.port.waitq
+#define imq_messages data.port.messages
+#define imq_msgcount data.port.msgcount
+#define imq_qlimit data.port.qlimit
+#define imq_seqno data.port.seqno
+#define imq_receiver_name data.port.receiver_name
+#if MACH_FLIPC
+#define imq_fport data.port.fport
+#endif
+
+/*
+ * The qcontext structure member fills in a 32-bit padding gap in ipc_mqueue.
+ * However, the 32-bits are in slightly different places on 32 and 64 bit systems.
+ */
+#ifdef __LP64__
+#define imq_context data.port.qcontext
+#else
+#define imq_context qcontext
+#endif
+
+/*
+ * we can use the 'eventmask' bits of the waitq b/c
+ * they are only used by global queues
+ */
+#define imq_fullwaiters data.port.waitq.waitq_eventmask
+#define imq_in_pset data.port.waitq.waitq_set_id
+#define imq_preposts data.port.waitq.waitq_prepost_id
+
+#define imq_set_queue data.pset.setq
+#define imq_is_set(mq) waitqs_is_set(&(mq)->imq_set_queue)
+#define imq_is_queue(mq) waitq_is_queue(&(mq)->imq_wait_queue)
+#define imq_is_turnstile_proxy(mq) \
+ waitq_is_turnstile_proxy(&(mq)->imq_wait_queue)
+#define imq_is_valid(mq) waitq_is_valid(&(mq)->imq_wait_queue)
+
+#define imq_unlock(mq) waitq_unlock(&(mq)->imq_wait_queue)
+#define imq_held(mq) waitq_held(&(mq)->imq_wait_queue)
+#define imq_valid(mq) waitq_valid(&(mq)->imq_wait_queue)