#include <kern/assert.h>
#include <kern/debug.h>
-#if OS_REASON_DEBUG
-#include <pexpert/pexpert.h>
-
-extern int os_reason_debug_disabled;
-#endif
-
extern int maxproc;
/*
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