* Copyright (c) 2010-2014 Apple Inc. All rights reserved.
*
* @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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
- *
+ *
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#ifndef __LIBKERNEL_INIT_H
#define __LIBKERNEL_INIT_H
+#include <stdbool.h>
#include <sys/types.h>
#include <mach/mach.h>
#include <mach/message.h>
/* The following functions are included in version 3 of this structure */
void (*pthread_clear_qos_tsd)(mach_port_t);
+ /* The following functions are included in version 4 of this structure */
+ int (*pthread_current_stack_contains_np)(const void *, size_t);
+
/* Subsequent versions must only add pointers! */
} *_libkernel_functions_t;
/* Subsequent versions must only add pointers! */
} *_libkernel_voucher_functions_t;
+typedef struct _libkernel_late_init_config {
+ unsigned long version;
+ bool enable_system_version_compat;
+ bool enable_ios_version_compat;
+} *_libkernel_late_init_config_t;
+
struct ProgramVars; /* forward reference */
void __libkernel_init(_libkernel_functions_t fns, const char *envp[],
- const char *apple[], const struct ProgramVars *vars);
+ const char *apple[], const struct ProgramVars *vars);
kern_return_t __libkernel_platform_init(_libkernel_string_functions_t fns);
kern_return_t __libkernel_voucher_init(_libkernel_voucher_functions_t fns);
+void __libkernel_init_late(_libkernel_late_init_config_t config);
+
#endif // __LIBKERNEL_INIT_H