lwkt_token - Add ASSERT_LWKT_TOKEN_HELD(token) macro.
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 13 Jul 2009 17:53:03 +0000 (10:53 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 13 Jul 2009 17:53:03 +0000 (10:53 -0700)
sys/sys/thread.h

index 6be7d18..8b00648 100644 (file)
@@ -132,6 +132,9 @@ typedef struct lwkt_token {
 }
 #endif
 
+#define ASSERT_LWKT_TOKEN_HELD(token) \
+       KKASSERT((token)->t_owner == curthread)
+
 typedef struct lwkt_tokref {
     lwkt_token_t       tr_tok;         /* token in question */
     lwkt_tokref_t      tr_next;        /* linked list */