/*
- * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
*
- * @APPLE_LICENSE_HEADER_START@
+ * @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
* 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@
/* leave room at the end for a saved copy of xprptr */
size = nxprbufs * sizeof(struct xprbuf) + sizeof xprptr;
- kr = kmem_alloc_wired(kernel_map, &addr, size);
+ kr = kmem_alloc_kobject(kernel_map, &addr, size);
if (kr != KERN_SUCCESS)
panic("xprbootstrap");
* Called with arguments, it can dump xpr buffers in user tasks,
* assuming they use the same format as the kernel.
*/
+static spl_t xpr_dump_spl;
+static struct xprbuf *base;
+static int nbufs;
void
xpr_dump(
- struct xprbuf *base,
- int nbufs)
+ struct xprbuf *_base,
+ int _nbufs)
{
jmp_buf_t db_jmpbuf;
jmp_buf_t *prev;
struct xprbuf *last, *ptr;
register struct xprbuf *x;
int i;
- spl_t s;
+
+ base = _base;
+ nbufs = _nbufs;
if (base == 0) {
base = xprbase;
return;
if (base == xprbase) {
- s = splhigh();
+ xpr_dump_spl = splhigh();
simple_lock(&xprlock);
}
if (base == xprbase) {
simple_unlock(&xprlock);
- splx(s);
+ splx(xpr_dump_spl);
}
}
if (!nxprbufs)
return;
- n = nxprbufs;
-
s = splhigh();
simple_lock(&xprlock);
prev = db_recover;
- if (_setjmp(db_recover = &db_jmpbuf) == 0)
+ if (_setjmp(db_recover = &db_jmpbuf) == 0) {
+ n = nxprbufs;
+
for (x = *(struct xprbuf **)xprlast ; n--; ) {
if (--x < xprbase)
x = xprlast - 1;
x->cpuinfo, x->timestamp);
db_printf(x->msg, x->arg1,x->arg2,x->arg3,x->arg4,x->arg5);
}
+ }
db_recover = prev;
simple_unlock(&xprlock);