X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/43866e378188c25dd1e2208016ab3cbeb086ae6c..d1ecb069dfe24481e4a83f44cb5217a2b06746d7:/osfmk/default_pager/diag.h diff --git a/osfmk/default_pager/diag.h b/osfmk/default_pager/diag.h index 9e94e9e85..de307fdc5 100644 --- a/osfmk/default_pager/diag.h +++ b/osfmk/default_pager/diag.h @@ -1,16 +1,19 @@ /* - * Copyright (c) 2001, 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER @@ -20,7 +23,7 @@ * Please see the License for the specific language governing rights and * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_COPYRIGHT@ @@ -32,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 @@ -42,8 +45,6 @@ #define Panic(aargh) panic("%s[KERNEL]: %s", my_name, aargh) #endif -extern char my_name[]; - #define VSTATS_ACTION(l, stmt) \ do { VSTATS_LOCK(l); stmt; VSTATS_UNLOCK(l); } while (0) @@ -53,9 +54,14 @@ extern char my_name[]; #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 */