X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/a991bd8d3e7fe02dbca0644054bab73c5b75324a..refs/heads/master:/bsd/kern/sys_reason.c diff --git a/bsd/kern/sys_reason.c b/bsd/kern/sys_reason.c index 6a773e495..ed84e0ab5 100644 --- a/bsd/kern/sys_reason.c +++ b/bsd/kern/sys_reason.c @@ -35,12 +35,6 @@ #include #include -#if OS_REASON_DEBUG -#include - -extern int os_reason_debug_disabled; -#endif - extern int maxproc; /* @@ -52,25 +46,9 @@ static ZONE_DECLARE(os_reason_zone, "os reasons", os_refgrp_decl(static, os_reason_refgrp, "os_reason", NULL); -#define OS_REASON_RESERVE_COUNT 100 - static int os_reason_alloc_buffer_internal(os_reason_t cur_reason, uint32_t osr_bufsize, zalloc_flags_t flags); -void -os_reason_init(void) -{ - int reasons_allocated = 0; - - /* - * We pre-fill the OS reason zone to reduce the likelihood that - * the jetsam thread and others block when they create an exit - * reason. - */ - reasons_allocated = zfill(os_reason_zone, OS_REASON_RESERVE_COUNT); - assert(reasons_allocated >= OS_REASON_RESERVE_COUNT); -} - /* * Creates a new reason and initializes it with the provided reason * namespace and code. Also sets up the buffer and kcdata_descriptor