X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..6d2010ae8f7a6078e10b361c6962983bab233e0f:/osfmk/default_pager/diag.h diff --git a/osfmk/default_pager/diag.h b/osfmk/default_pager/diag.h index aa118e2d1..de307fdc5 100644 --- a/osfmk/default_pager/diag.h +++ b/osfmk/default_pager/diag.h @@ -35,7 +35,7 @@ ((void) ((cond) ? 0 : panic("%sassertion: %s", my_name, # cond))) #endif #ifndef ASSERTIONS -#define assert(cond) +#define assert(cond) do {} while(0) #endif #endif @@ -54,9 +54,14 @@ #define VSTATS_UNLOCK(l) #define VSTATS_LOCK_INIT(l) #else -#define VSTATS_LOCK_DECL(name) struct mutex name; -#define VSTATS_LOCK(l) mutex_lock(l) -#define VSTATS_UNLOCK(l) mutex_unlock(l) -#define VSTATS_LOCK_INIT(l) mutex_init(l) + +extern lck_grp_t default_pager_lck_grp; +extern lck_attr_t default_pager_lck_attr; + + +#define VSTATS_LOCK_DECL(name) struct lck_mtx_t name; +#define VSTATS_LOCK(l) lck_mtx_lock(l) +#define VSTATS_UNLOCK(l) lck_mtx_unlock(l) +#define VSTATS_LOCK_INIT(l) lck_mtx_init(l, &default_pager_lck_grp, &default_pager_lck_attr ) #endif /* VAGUE_STATS */