/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
/*
* @OSF_COPYRIGHT@
*/
-/*
- * HISTORY
- *
- * Revision 1.1.1.1 1998/09/22 21:05:34 wsanchez
- * Import of Mac OS X kernel (~semeria)
- *
- * Revision 1.1.1.1 1998/03/07 02:25:55 wsanchez
- * Import of OSF Mach kernel (~mburg)
- *
- * Revision 1.1.6.1 1995/01/06 19:47:19 devrcs
- * mk6 CR668 - 1.3b26 merge
- * new file for mk6
- * [1994/10/12 22:19:28 dwm]
- *
- * Revision 1.1.3.4 1994/05/13 20:10:01 tmt
- * Changed three unsigned casts to natural_t.
- * [1994/05/12 22:12:28 tmt]
- *
- * Revision 1.1.3.2 1993/11/30 18:26:24 jph
- * CR10228 -- Typo in unlock(), ledger_ledger should be child_ledger.
- * [1993/11/30 16:10:43 jph]
- *
- * Revision 1.1.3.1 1993/11/24 21:22:14 jph
- * CR9801 brezak merge, ledgers, security and NMK15_COMPAT
- * [1993/11/23 22:41:07 jph]
- *
- * Revision 1.1.1.4 1993/09/08 14:17:36 brezak
- * Include <mach/ledger_server.h> for protos.
- *
- * Revision 1.1.1.3 1993/08/20 14:16:55 brezak
- * Created.
- *
- * $EndLog$
- */
-
/*
* 8/13/93
*
#include <mach/mach_types.h>
#include <mach/message.h>
+#include <mach/port.h>
+#include <mach/ledger_server.h>
+
#include <kern/mach_param.h>
#include <kern/misc_protos.h>
-#include <mach/port.h>
#include <kern/lock.h>
#include <kern/ipc_kobject.h>
-#include <ipc/ipc_space.h>
-#include <ipc/ipc_port.h>
#include <kern/host.h>
#include <kern/ledger.h>
-#include <mach/ledger_server.h>
+#include <kern/kalloc.h>
+
+#include <ipc/ipc_space.h>
+#include <ipc/ipc_port.h>
ledger_t root_wired_ledger;
ledger_t root_paged_ledger;
ledger_unlock(ledger);
return(KERN_RESOURCE_SHORTAGE);
}
- if ((natural_t)(ledger->ledger_balance + amount)
+ if ((ledger->ledger_balance + amount)
< LEDGER_ITEM_INFINITY)
ledger->ledger_balance += amount;
else
ipc_port_dealloc_kernel(ledger->ledger_self);
/* XXX release send right on service port */
- kfree((vm_offset_t)ledger, sizeof(*ledger));
+ kfree(ledger, sizeof(*ledger));
}