1*f6217f89SApple OSS Distributions /* 2*f6217f89SApple OSS Distributions * Copyright (c) 2006-2019 Apple Inc. All rights reserved. 3*f6217f89SApple OSS Distributions * 4*f6217f89SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5*f6217f89SApple OSS Distributions * 6*f6217f89SApple OSS Distributions * This file contains Original Code and/or Modifications of Original Code 7*f6217f89SApple OSS Distributions * as defined in and that are subject to the Apple Public Source License 8*f6217f89SApple OSS Distributions * Version 2.0 (the 'License'). You may not use this file except in 9*f6217f89SApple OSS Distributions * compliance with the License. The rights granted to you under the License 10*f6217f89SApple OSS Distributions * may not be used to create, or enable the creation or redistribution of, 11*f6217f89SApple OSS Distributions * unlawful or unlicensed copies of an Apple operating system, or to 12*f6217f89SApple OSS Distributions * circumvent, violate, or enable the circumvention or violation of, any 13*f6217f89SApple OSS Distributions * terms of an Apple operating system software license agreement. 14*f6217f89SApple OSS Distributions * 15*f6217f89SApple OSS Distributions * Please obtain a copy of the License at 16*f6217f89SApple OSS Distributions * http://www.opensource.apple.com/apsl/ and read it before using this file. 17*f6217f89SApple OSS Distributions * 18*f6217f89SApple OSS Distributions * The Original Code and all software distributed under the License are 19*f6217f89SApple OSS Distributions * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20*f6217f89SApple OSS Distributions * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21*f6217f89SApple OSS Distributions * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22*f6217f89SApple OSS Distributions * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23*f6217f89SApple OSS Distributions * Please see the License for the specific language governing rights and 24*f6217f89SApple OSS Distributions * limitations under the License. 25*f6217f89SApple OSS Distributions * 26*f6217f89SApple OSS Distributions * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27*f6217f89SApple OSS Distributions */ 28*f6217f89SApple OSS Distributions #ifndef _SYS_MCACHE_H 29*f6217f89SApple OSS Distributions #define _SYS_MCACHE_H 30*f6217f89SApple OSS Distributions 31*f6217f89SApple OSS Distributions #ifdef KERNEL_PRIVATE 32*f6217f89SApple OSS Distributions 33*f6217f89SApple OSS Distributions #ifdef __cplusplus 34*f6217f89SApple OSS Distributions extern "C" { 35*f6217f89SApple OSS Distributions #endif 36*f6217f89SApple OSS Distributions 37*f6217f89SApple OSS Distributions #include <sys/types.h> 38*f6217f89SApple OSS Distributions #include <sys/queue.h> 39*f6217f89SApple OSS Distributions #include <mach/boolean.h> 40*f6217f89SApple OSS Distributions #include <kern/locks.h> 41*f6217f89SApple OSS Distributions #include <libkern/OSAtomic.h> 42*f6217f89SApple OSS Distributions 43*f6217f89SApple OSS Distributions #ifdef ASSERT 44*f6217f89SApple OSS Distributions #undef ASSERT 45*f6217f89SApple OSS Distributions #endif 46*f6217f89SApple OSS Distributions 47*f6217f89SApple OSS Distributions #ifdef VERIFY 48*f6217f89SApple OSS Distributions #undef VERIFY 49*f6217f89SApple OSS Distributions #endif 50*f6217f89SApple OSS Distributions 51*f6217f89SApple OSS Distributions /* 52*f6217f89SApple OSS Distributions * Unlike VERIFY(), ASSERT() is evaluated only in DEBUG/DEVELOPMENT build. 53*f6217f89SApple OSS Distributions */ 54*f6217f89SApple OSS Distributions #define VERIFY(EX) \ 55*f6217f89SApple OSS Distributions ((void)(__probable((EX)) || assfail(#EX, __FILE__, __LINE__))) 56*f6217f89SApple OSS Distributions #if (DEBUG || DEVELOPMENT) 57*f6217f89SApple OSS Distributions #define ASSERT(EX) VERIFY(EX) 58*f6217f89SApple OSS Distributions #else 59*f6217f89SApple OSS Distributions #define ASSERT(EX) ((void)0) 60*f6217f89SApple OSS Distributions #endif 61*f6217f89SApple OSS Distributions 62*f6217f89SApple OSS Distributions /* 63*f6217f89SApple OSS Distributions * Use CPU_CACHE_LINE_SIZE instead of MAX_CPU_CACHE_LINE_SIZE, unless 64*f6217f89SApple OSS Distributions * wasting space is of no concern. 65*f6217f89SApple OSS Distributions */ 66*f6217f89SApple OSS Distributions #define MAX_CPU_CACHE_LINE_SIZE 128 67*f6217f89SApple OSS Distributions #define CPU_CACHE_LINE_SIZE mcache_cache_line_size() 68*f6217f89SApple OSS Distributions 69*f6217f89SApple OSS Distributions #ifndef IS_P2ALIGNED 70*f6217f89SApple OSS Distributions #define IS_P2ALIGNED(v, a) \ 71*f6217f89SApple OSS Distributions ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) 72*f6217f89SApple OSS Distributions #endif /* IS_P2ALIGNED */ 73*f6217f89SApple OSS Distributions 74*f6217f89SApple OSS Distributions #ifndef P2ROUNDUP 75*f6217f89SApple OSS Distributions #define P2ROUNDUP(x, align) \ 76*f6217f89SApple OSS Distributions (-(-((uintptr_t)(x)) & -((uintptr_t)align))) 77*f6217f89SApple OSS Distributions #endif /* P2ROUNDUP */ 78*f6217f89SApple OSS Distributions 79*f6217f89SApple OSS Distributions #ifndef P2ROUNDDOWN 80*f6217f89SApple OSS Distributions #define P2ROUNDDOWN(x, align) \ 81*f6217f89SApple OSS Distributions (((uintptr_t)(x)) & ~((uintptr_t)(align) - 1)) 82*f6217f89SApple OSS Distributions #endif /* P2ROUNDDOWN */ 83*f6217f89SApple OSS Distributions 84*f6217f89SApple OSS Distributions #ifndef P2ALIGN 85*f6217f89SApple OSS Distributions #define P2ALIGN(x, align) \ 86*f6217f89SApple OSS Distributions ((uintptr_t)(x) & -((uintptr_t)(align))) 87*f6217f89SApple OSS Distributions #endif /* P2ALIGN */ 88*f6217f89SApple OSS Distributions 89*f6217f89SApple OSS Distributions #define MCACHE_FREE_PATTERN 0xdeadbeefdeadbeefULL 90*f6217f89SApple OSS Distributions #define MCACHE_UNINITIALIZED_PATTERN 0xbaddcafebaddcafeULL 91*f6217f89SApple OSS Distributions 92*f6217f89SApple OSS Distributions /* 93*f6217f89SApple OSS Distributions * mcache allocation request flags. 94*f6217f89SApple OSS Distributions * 95*f6217f89SApple OSS Distributions * MCR_NOSLEEP and MCR_FAILOK are mutually exclusive. The latter is used 96*f6217f89SApple OSS Distributions * by the mbuf allocator to handle the implementation of several caches that 97*f6217f89SApple OSS Distributions * involve multiple layers of mcache. It implies a best effort blocking 98*f6217f89SApple OSS Distributions * allocation request; if the request cannot be satisfied, the caller will 99*f6217f89SApple OSS Distributions * be blocked until further notice, similar to MCR_SLEEP, except that upon 100*f6217f89SApple OSS Distributions * a wake up it will return immediately to the caller regardless of whether 101*f6217f89SApple OSS Distributions * the request can been fulfilled. 102*f6217f89SApple OSS Distributions * 103*f6217f89SApple OSS Distributions * MCR_TRYHARD implies a non-blocking allocation request, regardless of 104*f6217f89SApple OSS Distributions * whether MCR_NOSLEEP is set. It informs the allocator that the request 105*f6217f89SApple OSS Distributions * should not cause the calling thread to block, and that it must have 106*f6217f89SApple OSS Distributions * exhausted all possible schemes to fulfill the request, including doing 107*f6217f89SApple OSS Distributions * reclaims and/or purges, before returning to the caller. 108*f6217f89SApple OSS Distributions * 109*f6217f89SApple OSS Distributions * Regular mcache clients should only use MCR_SLEEP or MCR_NOSLEEP. 110*f6217f89SApple OSS Distributions */ 111*f6217f89SApple OSS Distributions #define MCR_SLEEP 0x0000 /* same as M_WAITOK */ 112*f6217f89SApple OSS Distributions #define MCR_NOSLEEP 0x0001 /* same as M_NOWAIT */ 113*f6217f89SApple OSS Distributions #define MCR_FAILOK 0x0100 /* private, for internal use only */ 114*f6217f89SApple OSS Distributions #define MCR_TRYHARD 0x0200 /* private, for internal use only */ 115*f6217f89SApple OSS Distributions #define MCR_USR1 0x1000 /* private, for internal use only */ 116*f6217f89SApple OSS Distributions 117*f6217f89SApple OSS Distributions #define MCR_NONBLOCKING (MCR_NOSLEEP | MCR_FAILOK | MCR_TRYHARD) 118*f6217f89SApple OSS Distributions 119*f6217f89SApple OSS Distributions /* 120*f6217f89SApple OSS Distributions * Generic one-way linked list element structure. This is used to handle 121*f6217f89SApple OSS Distributions * mcache_alloc_ext() requests in order to chain the allocated objects 122*f6217f89SApple OSS Distributions * together before returning them to the caller. 123*f6217f89SApple OSS Distributions */ 124*f6217f89SApple OSS Distributions typedef struct mcache_obj { 125*f6217f89SApple OSS Distributions struct mcache_obj *obj_next; 126*f6217f89SApple OSS Distributions } mcache_obj_t; 127*f6217f89SApple OSS Distributions 128*f6217f89SApple OSS Distributions typedef struct mcache_bkt { 129*f6217f89SApple OSS Distributions void *bkt_next; /* next bucket in list */ 130*f6217f89SApple OSS Distributions struct mcache_bkttype *bkt_type; /* bucket type */ 131*f6217f89SApple OSS Distributions void *bkt_obj[1]; /* one or more objects */ 132*f6217f89SApple OSS Distributions } mcache_bkt_t; 133*f6217f89SApple OSS Distributions 134*f6217f89SApple OSS Distributions typedef struct mcache_bktlist { 135*f6217f89SApple OSS Distributions mcache_bkt_t *bl_list; /* bucket list */ 136*f6217f89SApple OSS Distributions u_int32_t bl_total; /* number of buckets */ 137*f6217f89SApple OSS Distributions u_int32_t bl_min; /* min since last update */ 138*f6217f89SApple OSS Distributions u_int32_t bl_reaplimit; /* max reapable buckets */ 139*f6217f89SApple OSS Distributions u_int64_t bl_alloc; /* allocations from this list */ 140*f6217f89SApple OSS Distributions } mcache_bktlist_t; 141*f6217f89SApple OSS Distributions 142*f6217f89SApple OSS Distributions typedef struct mcache_bkttype { 143*f6217f89SApple OSS Distributions int bt_bktsize; /* bucket size (number of elements) */ 144*f6217f89SApple OSS Distributions size_t bt_minbuf; /* all smaller buffers qualify */ 145*f6217f89SApple OSS Distributions size_t bt_maxbuf; /* no larger bfufers qualify */ 146*f6217f89SApple OSS Distributions struct mcache *bt_cache; /* bucket cache */ 147*f6217f89SApple OSS Distributions } mcache_bkttype_t; 148*f6217f89SApple OSS Distributions 149*f6217f89SApple OSS Distributions typedef struct mcache_cpu { 150*f6217f89SApple OSS Distributions decl_lck_mtx_data(, cc_lock); 151*f6217f89SApple OSS Distributions mcache_bkt_t *cc_filled; /* the currently filled bucket */ 152*f6217f89SApple OSS Distributions mcache_bkt_t *cc_pfilled; /* the previously filled bucket */ 153*f6217f89SApple OSS Distributions u_int64_t cc_alloc; /* allocations from this cpu */ 154*f6217f89SApple OSS Distributions u_int64_t cc_free; /* frees to this cpu */ 155*f6217f89SApple OSS Distributions int cc_objs; /* number of objects in filled bkt */ 156*f6217f89SApple OSS Distributions int cc_pobjs; /* number of objects in previous bkt */ 157*f6217f89SApple OSS Distributions int cc_bktsize; /* number of elements in a full bkt */ 158*f6217f89SApple OSS Distributions } __attribute__((aligned(MAX_CPU_CACHE_LINE_SIZE))) mcache_cpu_t; 159*f6217f89SApple OSS Distributions 160*f6217f89SApple OSS Distributions typedef unsigned int (*mcache_allocfn_t)(void *, mcache_obj_t ***, 161*f6217f89SApple OSS Distributions unsigned int, int); 162*f6217f89SApple OSS Distributions typedef void (*mcache_freefn_t)(void *, mcache_obj_t *, boolean_t); 163*f6217f89SApple OSS Distributions typedef void (*mcache_auditfn_t)(void *, mcache_obj_t *, boolean_t); 164*f6217f89SApple OSS Distributions typedef void (*mcache_logfn_t)(u_int32_t, mcache_obj_t *, boolean_t); 165*f6217f89SApple OSS Distributions typedef void (*mcache_notifyfn_t)(void *, u_int32_t); 166*f6217f89SApple OSS Distributions 167*f6217f89SApple OSS Distributions typedef struct mcache { 168*f6217f89SApple OSS Distributions /* 169*f6217f89SApple OSS Distributions * Cache properties 170*f6217f89SApple OSS Distributions */ 171*f6217f89SApple OSS Distributions LIST_ENTRY(mcache) mc_list; /* cache linkage */ 172*f6217f89SApple OSS Distributions char mc_name[32]; /* cache name */ 173*f6217f89SApple OSS Distributions struct zone *mc_slab_zone; /* backend zone allocator */ 174*f6217f89SApple OSS Distributions mcache_allocfn_t mc_slab_alloc; /* slab layer allocate callback */ 175*f6217f89SApple OSS Distributions mcache_freefn_t mc_slab_free; /* slab layer free callback */ 176*f6217f89SApple OSS Distributions mcache_auditfn_t mc_slab_audit; /* slab layer audit callback */ 177*f6217f89SApple OSS Distributions mcache_logfn_t mc_slab_log; /* slab layer log callback */ 178*f6217f89SApple OSS Distributions mcache_notifyfn_t mc_slab_notify; /* slab layer notify callback */ 179*f6217f89SApple OSS Distributions void *mc_private; /* opaque arg to callbacks */ 180*f6217f89SApple OSS Distributions size_t mc_bufsize; /* object size */ 181*f6217f89SApple OSS Distributions size_t mc_align; /* object alignment */ 182*f6217f89SApple OSS Distributions u_int32_t mc_flags; /* cache creation flags */ 183*f6217f89SApple OSS Distributions u_int32_t mc_purge_cnt; /* # of purges requested by slab */ 184*f6217f89SApple OSS Distributions u_int32_t mc_enable_cnt; /* # of reenables due to purges */ 185*f6217f89SApple OSS Distributions u_int32_t mc_waiter_cnt; /* # of slab layer waiters */ 186*f6217f89SApple OSS Distributions u_int32_t mc_wretry_cnt; /* # of wait retries */ 187*f6217f89SApple OSS Distributions u_int32_t mc_nwretry_cnt; /* # of no-wait retry attempts */ 188*f6217f89SApple OSS Distributions u_int32_t mc_nwfail_cnt; /* # of no-wait retries that failed */ 189*f6217f89SApple OSS Distributions decl_lck_mtx_data(, mc_sync_lock); /* protects purges and reenables */ 190*f6217f89SApple OSS Distributions lck_grp_t *mc_sync_lock_grp; 191*f6217f89SApple OSS Distributions /* 192*f6217f89SApple OSS Distributions * Keep CPU and buckets layers lock statistics separate. 193*f6217f89SApple OSS Distributions */ 194*f6217f89SApple OSS Distributions lck_grp_t *mc_cpu_lock_grp; 195*f6217f89SApple OSS Distributions 196*f6217f89SApple OSS Distributions /* 197*f6217f89SApple OSS Distributions * Bucket layer common to all CPUs 198*f6217f89SApple OSS Distributions */ 199*f6217f89SApple OSS Distributions decl_lck_mtx_data(, mc_bkt_lock); 200*f6217f89SApple OSS Distributions lck_grp_t *mc_bkt_lock_grp; 201*f6217f89SApple OSS Distributions mcache_bkttype_t *cache_bkttype; /* bucket type */ 202*f6217f89SApple OSS Distributions mcache_bktlist_t mc_full; /* full buckets */ 203*f6217f89SApple OSS Distributions mcache_bktlist_t mc_empty; /* empty buckets */ 204*f6217f89SApple OSS Distributions size_t mc_chunksize; /* bufsize + alignment */ 205*f6217f89SApple OSS Distributions u_int32_t mc_bkt_contention; /* lock contention count */ 206*f6217f89SApple OSS Distributions u_int32_t mc_bkt_contention_prev; /* previous snapshot */ 207*f6217f89SApple OSS Distributions 208*f6217f89SApple OSS Distributions /* 209*f6217f89SApple OSS Distributions * Per-CPU layer, aligned at cache line boundary 210*f6217f89SApple OSS Distributions */ 211*f6217f89SApple OSS Distributions mcache_cpu_t mc_cpu[1] 212*f6217f89SApple OSS Distributions __attribute__((aligned(MAX_CPU_CACHE_LINE_SIZE))); 213*f6217f89SApple OSS Distributions } mcache_t; 214*f6217f89SApple OSS Distributions 215*f6217f89SApple OSS Distributions #define MCACHE_ALIGN 8 /* default guaranteed alignment */ 216*f6217f89SApple OSS Distributions 217*f6217f89SApple OSS Distributions /* Valid values for mc_flags */ 218*f6217f89SApple OSS Distributions #define MCF_VERIFY 0x00000001 /* enable verification */ 219*f6217f89SApple OSS Distributions #define MCF_TRACE 0x00000002 /* enable transaction auditing */ 220*f6217f89SApple OSS Distributions #define MCF_NOCPUCACHE 0x00000010 /* disable CPU layer caching */ 221*f6217f89SApple OSS Distributions #define MCF_NOLEAKLOG 0x00000100 /* disable leak logging */ 222*f6217f89SApple OSS Distributions #define MCF_EXPLEAKLOG 0x00000200 /* expose leak info to user space */ 223*f6217f89SApple OSS Distributions 224*f6217f89SApple OSS Distributions #define MCF_DEBUG (MCF_VERIFY | MCF_TRACE) 225*f6217f89SApple OSS Distributions #define MCF_FLAGS_MASK \ 226*f6217f89SApple OSS Distributions (MCF_DEBUG | MCF_NOCPUCACHE | MCF_NOLEAKLOG | MCF_EXPLEAKLOG) 227*f6217f89SApple OSS Distributions 228*f6217f89SApple OSS Distributions /* Valid values for notify callback */ 229*f6217f89SApple OSS Distributions #define MCN_RETRYALLOC 0x00000001 /* Allocation should be retried */ 230*f6217f89SApple OSS Distributions 231*f6217f89SApple OSS Distributions #define MCACHE_STACK_DEPTH 16 232*f6217f89SApple OSS Distributions 233*f6217f89SApple OSS Distributions #define MCA_TRN_MAX 2 /* Number of transactions to record */ 234*f6217f89SApple OSS Distributions 235*f6217f89SApple OSS Distributions #define DUMP_MCA_BUF_SIZE 512 236*f6217f89SApple OSS Distributions 237*f6217f89SApple OSS Distributions typedef struct mcache_audit { 238*f6217f89SApple OSS Distributions struct mcache_audit *mca_next; /* next audit struct */ 239*f6217f89SApple OSS Distributions void *mca_addr; /* address of buffer */ 240*f6217f89SApple OSS Distributions mcache_t *mca_cache; /* parent cache of the buffer */ 241*f6217f89SApple OSS Distributions size_t mca_contents_size; /* size of saved contents */ 242*f6217f89SApple OSS Distributions void *mca_contents; /* user-specific saved contents */ 243*f6217f89SApple OSS Distributions void *mca_uptr; /* user-specific pointer */ 244*f6217f89SApple OSS Distributions uint32_t mca_uflags; /* user-specific flags */ 245*f6217f89SApple OSS Distributions uint32_t mca_next_trn; 246*f6217f89SApple OSS Distributions struct mca_trn { 247*f6217f89SApple OSS Distributions struct thread *mca_thread; /* thread doing transaction */ 248*f6217f89SApple OSS Distributions uint32_t mca_tstamp; 249*f6217f89SApple OSS Distributions uint16_t mca_depth; 250*f6217f89SApple OSS Distributions void *mca_stack[MCACHE_STACK_DEPTH]; 251*f6217f89SApple OSS Distributions } mca_trns[MCA_TRN_MAX]; 252*f6217f89SApple OSS Distributions } mcache_audit_t; 253*f6217f89SApple OSS Distributions 254*f6217f89SApple OSS Distributions __private_extern__ int assfail(const char *, const char *, int) __abortlike; 255*f6217f89SApple OSS Distributions __private_extern__ void mcache_init(void); 256*f6217f89SApple OSS Distributions __private_extern__ unsigned int mcache_getflags(void); 257*f6217f89SApple OSS Distributions __private_extern__ unsigned int mcache_cache_line_size(void); 258*f6217f89SApple OSS Distributions __private_extern__ mcache_t *mcache_create(const char *, size_t, 259*f6217f89SApple OSS Distributions size_t, u_int32_t, int); 260*f6217f89SApple OSS Distributions __private_extern__ void *mcache_alloc(mcache_t *, int); 261*f6217f89SApple OSS Distributions __private_extern__ void mcache_free(mcache_t *, void *); 262*f6217f89SApple OSS Distributions __private_extern__ mcache_t *mcache_create_ext(const char *, size_t, 263*f6217f89SApple OSS Distributions mcache_allocfn_t, mcache_freefn_t, mcache_auditfn_t, mcache_logfn_t, 264*f6217f89SApple OSS Distributions mcache_notifyfn_t, void *__unsafe_indexable, u_int32_t, int); 265*f6217f89SApple OSS Distributions __private_extern__ void mcache_destroy(mcache_t *); 266*f6217f89SApple OSS Distributions __private_extern__ unsigned int mcache_alloc_ext(mcache_t *, mcache_obj_t **, 267*f6217f89SApple OSS Distributions unsigned int, int); 268*f6217f89SApple OSS Distributions __private_extern__ void mcache_free_ext(mcache_t *, mcache_obj_t *); 269*f6217f89SApple OSS Distributions __private_extern__ void mcache_reap(void); 270*f6217f89SApple OSS Distributions __private_extern__ void mcache_reap_now(mcache_t *, boolean_t); 271*f6217f89SApple OSS Distributions __private_extern__ boolean_t mcache_purge_cache(mcache_t *, boolean_t); 272*f6217f89SApple OSS Distributions __private_extern__ void mcache_waiter_inc(mcache_t *); 273*f6217f89SApple OSS Distributions __private_extern__ void mcache_waiter_dec(mcache_t *); 274*f6217f89SApple OSS Distributions __private_extern__ boolean_t mcache_bkt_isempty(mcache_t *); 275*f6217f89SApple OSS Distributions 276*f6217f89SApple OSS Distributions struct timeval; 277*f6217f89SApple OSS Distributions __private_extern__ void mcache_buffer_log(mcache_audit_t *, void *, mcache_t *, 278*f6217f89SApple OSS Distributions struct timeval *); 279*f6217f89SApple OSS Distributions __private_extern__ void mcache_set_pattern(u_int64_t, void *, size_t); 280*f6217f89SApple OSS Distributions __private_extern__ void *mcache_verify_pattern(u_int64_t, void *, size_t); 281*f6217f89SApple OSS Distributions __private_extern__ void mcache_audit_free_verify(mcache_audit_t *, 282*f6217f89SApple OSS Distributions void *, size_t, size_t); 283*f6217f89SApple OSS Distributions __private_extern__ void mcache_audit_free_verify_set(mcache_audit_t *, 284*f6217f89SApple OSS Distributions void *, size_t, size_t); 285*f6217f89SApple OSS Distributions __private_extern__ char *mcache_dump_mca(char buf[DUMP_MCA_BUF_SIZE], mcache_audit_t *); 286*f6217f89SApple OSS Distributions 287*f6217f89SApple OSS Distributions extern mcache_t *mcache_audit_cache; 288*f6217f89SApple OSS Distributions 289*f6217f89SApple OSS Distributions #ifdef __cplusplus 290*f6217f89SApple OSS Distributions } 291*f6217f89SApple OSS Distributions #endif 292*f6217f89SApple OSS Distributions 293*f6217f89SApple OSS Distributions #endif /* KERNEL_PRIVATE */ 294*f6217f89SApple OSS Distributions 295*f6217f89SApple OSS Distributions #endif /* _SYS_MCACHE_H */ 296