Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/vmparam.h | /*
* Copyright (c) 2000-2006 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _BSD_I386_VMPARAM_H_
#define _BSD_I386_VMPARAM_H_ 1
#if defined (__i386__) || defined (__x86_64__)
#include <sys/resource.h>
#define USRSTACK VM_USRSTACK32
#define USRSTACK64 VM_USRSTACK64
/*
* Virtual memory related constants, all in bytes
*/
#ifndef DFLDSIZ
#define DFLDSIZ (RLIM_INFINITY) /* initial data size limit */
#endif
#ifndef MAXDSIZ
#define MAXDSIZ (RLIM_INFINITY) /* max data size */
#endif
#ifndef DFLSSIZ
#define DFLSSIZ (8*1024*1024) /* initial stack size limit */
#endif
#ifndef MAXSSIZ
#define MAXSSIZ (64*1024*1024) /* max stack size */
#endif
#ifndef DFLCSIZ
#define DFLCSIZ (0) /* initial core size limit */
#endif
#ifndef MAXCSIZ
#define MAXCSIZ (RLIM_INFINITY) /* max core size */
#endif /* MAXCSIZ */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _BSD_I386_VMPARAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/_limits.h | /*
* Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
* "License"). You may not use this file except in compliance with the
* License. Please obtain a copy of the License at
* http://www.apple.com/publicsource and read it before using this file.
*
* This 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,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#ifndef _I386__LIMITS_H_
#define _I386__LIMITS_H_
#if defined (__i386__) || defined (__x86_64__)
#define __DARWIN_CLK_TCK 100 /* ticks per second */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386__LIMITS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/eflags.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
#ifndef _I386_EFLAGS_H_
#define _I386_EFLAGS_H_
#if defined (__i386__) || defined (__x86_64__)
/*
* i386 flags register
*/
#ifndef EFL_CF
#define EFL_CF 0x00000001 /* carry */
#define EFL_PF 0x00000004 /* parity of low 8 bits */
#define EFL_AF 0x00000010 /* carry out of bit 3 */
#define EFL_ZF 0x00000040 /* zero */
#define EFL_SF 0x00000080 /* sign */
#define EFL_TF 0x00000100 /* trace trap */
#define EFL_IF 0x00000200 /* interrupt enable */
#define EFL_DF 0x00000400 /* direction */
#define EFL_OF 0x00000800 /* overflow */
#define EFL_IOPL 0x00003000 /* IO privilege level: */
#define EFL_IOPL_KERNEL 0x00000000 /* kernel */
#define EFL_IOPL_USER 0x00003000 /* user */
#define EFL_NT 0x00004000 /* nested task */
#define EFL_RF 0x00010000 /* resume without tracing */
#define EFL_VM 0x00020000 /* virtual 8086 mode */
#define EFL_AC 0x00040000 /* alignment check */
#define EFL_VIF 0x00080000 /* virtual interrupt flag */
#define EFL_VIP 0x00100000 /* virtual interrupt pending */
#define EFL_ID 0x00200000 /* cpuID instruction */
#endif
#define EFL_CLR 0xfff88028
#define EFL_SET 0x00000002
#define EFL_USER_SET (EFL_IF)
#define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF)
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386_EFLAGS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/vmx.h | /*
* Copyright (c) 2006 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _I386_VMX_H_
#define _I386_VMX_H_
#if defined(__cplusplus)
extern "C" {
#endif
#include <mach/boolean.h>
/*
* Error codes
*/
#define VMX_OK 0 /* all ok */
#define VMX_UNSUPPORTED 1 /* VT unsupported or disabled on 1+ cores */
#define VMX_INUSE 2 /* VT is being exclusively used already */
/* SPI */
int host_vmxon(boolean_t exclusive);
void host_vmxoff(void);
#if defined(__cplusplus)
}
#endif
#endif
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/proc_reg.h | /*
* Copyright (c) 2000-2020 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/* CMU_ENDHIST */
/*
* Mach Operating System
* Copyright (c) 1991,1990 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* Processor registers for i386 and i486.
*/
#ifndef _I386_PROC_REG_H_
#define _I386_PROC_REG_H_
/*
* Model Specific Registers
*/
#define MSR_P5_TSC 0x10 /* Time Stamp Register */
#define MSR_P5_CESR 0x11 /* Control and Event Select Register */
#define MSR_P5_CTR0 0x12 /* Counter #0 */
#define MSR_P5_CTR1 0x13 /* Counter #1 */
#define MSR_P5_CESR_PC 0x0200 /* Pin Control */
#define MSR_P5_CESR_CC 0x01C0 /* Counter Control mask */
#define MSR_P5_CESR_ES 0x003F /* Event Control mask */
#define MSR_P5_CESR_SHIFT 16 /* Shift to get Counter 1 */
#define MSR_P5_CESR_MASK (MSR_P5_CESR_PC|\
MSR_P5_CESR_CC|\
MSR_P5_CESR_ES) /* Mask Counter */
#define MSR_P5_CESR_CC_CLOCK 0x0100 /* Clock Counting (otherwise Event) */
#define MSR_P5_CESR_CC_DISABLE 0x0000 /* Disable counter */
#define MSR_P5_CESR_CC_CPL012 0x0040 /* Count if the CPL == 0, 1, 2 */
#define MSR_P5_CESR_CC_CPL3 0x0080 /* Count if the CPL == 3 */
#define MSR_P5_CESR_CC_CPL 0x00C0 /* Count regardless of the CPL */
#define MSR_P5_CESR_ES_DATA_READ 0x000000 /* Data Read */
#define MSR_P5_CESR_ES_DATA_WRITE 0x000001 /* Data Write */
#define MSR_P5_CESR_ES_DATA_RW 0x101000 /* Data Read or Write */
#define MSR_P5_CESR_ES_DATA_TLB_MISS 0x000010 /* Data TLB Miss */
#define MSR_P5_CESR_ES_DATA_READ_MISS 0x000011 /* Data Read Miss */
#define MSR_P5_CESR_ES_DATA_WRITE_MISS 0x000100 /* Data Write Miss */
#define MSR_P5_CESR_ES_DATA_RW_MISS 0x101001 /* Data Read or Write Miss */
#define MSR_P5_CESR_ES_HIT_EM 0x000101 /* Write (hit) to M|E state */
#define MSR_P5_CESR_ES_DATA_CACHE_WB 0x000110 /* Cache lines written back */
#define MSR_P5_CESR_ES_EXTERNAL_SNOOP 0x000111 /* External Snoop */
#define MSR_P5_CESR_ES_CACHE_SNOOP_HIT 0x001000 /* Data cache snoop hits */
#define MSR_P5_CESR_ES_MEM_ACCESS_PIPE 0x001001 /* Mem. access in both pipes */
#define MSR_P5_CESR_ES_BANK_CONFLICTS 0x001010 /* Bank conflicts */
#define MSR_P5_CESR_ES_MISALIGNED 0x001011 /* Misaligned Memory or I/O */
#define MSR_P5_CESR_ES_CODE_READ 0x001100 /* Code Read */
#define MSR_P5_CESR_ES_CODE_TLB_MISS 0x001101 /* Code TLB miss */
#define MSR_P5_CESR_ES_CODE_CACHE_MISS 0x001110 /* Code Cache miss */
#define MSR_P5_CESR_ES_SEGMENT_LOADED 0x001111 /* Any segment reg. loaded */
#define MSR_P5_CESR_ES_BRANCHE 0x010010 /* Branches */
#define MSR_P5_CESR_ES_BTB_HIT 0x010011 /* BTB Hits */
#define MSR_P5_CESR_ES_BRANCHE_BTB 0x010100 /* Taken branch or BTB Hit */
#define MSR_P5_CESR_ES_PIPELINE_FLUSH 0x010101 /* Pipeline Flushes */
#define MSR_P5_CESR_ES_INSTRUCTION 0x010110 /* Instruction executed */
#define MSR_P5_CESR_ES_INSTRUCTION_V 0x010111 /* Inst. executed (v-pipe) */
#define MSR_P5_CESR_ES_BUS_CYCLE 0x011000 /* Clocks while bus cycle */
#define MSR_P5_CESR_ES_FULL_WRITE_BUF 0x011001 /* Clocks while full wrt buf. */
#define MSR_P5_CESR_ES_DATA_MEM_READ 0x011010 /* Pipeline waiting for read */
#define MSR_P5_CESR_ES_WRITE_EM 0x011011 /* Stall on write E|M state */
#define MSR_P5_CESR_ES_LOCKED_CYCLE 0x011100 /* Locked bus cycles */
#define MSR_P5_CESR_ES_IO_CYCLE 0x011101 /* I/O Read or Write cycles */
#define MSR_P5_CESR_ES_NON_CACHEABLE 0x011110 /* Non-cacheable Mem. read */
#define MSR_P5_CESR_ES_AGI 0x011111 /* Stall because of AGI */
#define MSR_P5_CESR_ES_FLOP 0x100010 /* Floating Point operations */
#define MSR_P5_CESR_ES_BREAK_DR0 0x100011 /* Breakpoint matches on DR0 */
#define MSR_P5_CESR_ES_BREAK_DR1 0x100100 /* Breakpoint matches on DR1 */
#define MSR_P5_CESR_ES_BREAK_DR2 0x100101 /* Breakpoint matches on DR2 */
#define MSR_P5_CESR_ES_BREAK_DR3 0x100110 /* Breakpoint matches on DR3 */
#define MSR_P5_CESR_ES_HARDWARE_IT 0x100111 /* Hardware interrupts */
/*
* CR0
*/
#define CR0_PG 0x80000000 /* Enable paging */
#define CR0_CD 0x40000000 /* i486: Cache disable */
#define CR0_NW 0x20000000 /* i486: No write-through */
#define CR0_AM 0x00040000 /* i486: Alignment check mask */
#define CR0_WP 0x00010000 /* i486: Write-protect kernel access */
#define CR0_NE 0x00000020 /* i486: Handle numeric exceptions */
#define CR0_ET 0x00000010 /* Extension type is 80387 */
/* (not official) */
#define CR0_TS 0x00000008 /* Task switch */
#define CR0_EM 0x00000004 /* Emulate coprocessor */
#define CR0_MP 0x00000002 /* Monitor coprocessor */
#define CR0_PE 0x00000001 /* Enable protected mode */
/*
* CR4
*/
#define CR4_SEE 0x00008000 /* Secure Enclave Enable XXX */
#define CR4_SMAP 0x00200000 /* Supervisor-Mode Access Protect */
#define CR4_SMEP 0x00100000 /* Supervisor-Mode Execute Protect */
#define CR4_OSXSAVE 0x00040000 /* OS supports XSAVE */
#define CR4_PCIDE 0x00020000 /* PCID Enable */
#define CR4_RDWRFSGS 0x00010000 /* RDWRFSGS Enable */
#define CR4_SMXE 0x00004000 /* Enable SMX operation */
#define CR4_VMXE 0x00002000 /* Enable VMX operation */
#define CR4_OSXMM 0x00000400 /* SSE/SSE2 exception support in OS */
#define CR4_OSFXS 0x00000200 /* SSE/SSE2 OS supports FXSave */
#define CR4_PCE 0x00000100 /* Performance-Monitor Count Enable */
#define CR4_PGE 0x00000080 /* Page Global Enable */
#define CR4_MCE 0x00000040 /* Machine Check Exceptions */
#define CR4_PAE 0x00000020 /* Physical Address Extensions */
#define CR4_PSE 0x00000010 /* Page Size Extensions */
#define CR4_DE 0x00000008 /* Debugging Extensions */
#define CR4_TSD 0x00000004 /* Time Stamp Disable */
#define CR4_PVI 0x00000002 /* Protected-mode Virtual Interrupts */
#define CR4_VME 0x00000001 /* Virtual-8086 Mode Extensions */
/*
* XCR0 - XFEATURE_ENABLED_MASK (a.k.a. XFEM) register
*/
#define XCR0_X87 (1ULL << 0) /* x87, FPU/MMX (always set) */
#define XCR0_SSE (1ULL << 1) /* SSE supported by XSAVE/XRESTORE */
#define XCR0_YMM (1ULL << 2) /* YMM state available */
#define XCR0_BNDREGS (1ULL << 3) /* MPX Bounds register state */
#define XCR0_BNDCSR (1ULL << 4) /* MPX Bounds configuration/state */
#define XCR0_OPMASK (1ULL << 5) /* Opmask register state */
#define XCR0_ZMM_HI256 (1ULL << 6) /* ZMM upper 256-bit state */
#define XCR0_HI16_ZMM (1ULL << 7) /* ZMM16..ZMM31 512-bit state */
#define XFEM_X87 XCR0_X87
#define XFEM_SSE XCR0_SSE
#define XFEM_YMM XCR0_YMM
#define XFEM_BNDREGS XCR0_BNDREGS
#define XFEM_BNDCSR XCR0_BNDCSR
#define XFEM_OPMASK XCR0_OPMASK
#define XFEM_ZMM_HI256 XCR0_ZMM_HI256
#define XFEM_HI16_ZMM XCR0_HI16_ZMM
#define XFEM_ZMM (XFEM_ZMM_HI256 | XFEM_HI16_ZMM | XFEM_OPMASK)
#define XCR0 (0)
#define PMAP_PCID_PRESERVE (1ULL << 63)
#define PMAP_PCID_MASK (0xFFF)
#define EARLY_GSBASE_MAGIC 0xffffdeadbeefee00
/*
* If thread groups are needed for x86, set this to 1
*/
#define CONFIG_THREAD_GROUPS 0
#define MAX_CPUS 64
#define MAX_PSETS 64
#ifndef ASSEMBLER
#include <sys/cdefs.h>
#include <stdint.h>
__BEGIN_DECLS
#define set_ts() set_cr0(get_cr0() | CR0_TS)
static inline uint16_t
get_es(void)
{
uint16_t es;
__asm__ volatile ("mov %%es, %0" : "=r" (es));
return es;
}
static inline void
set_es(uint16_t es)
{
__asm__ volatile ("mov %0, %%es" : : "r" (es));
}
static inline uint16_t
get_ds(void)
{
uint16_t ds;
__asm__ volatile ("mov %%ds, %0" : "=r" (ds));
return ds;
}
static inline void
set_ds(uint16_t ds)
{
__asm__ volatile ("mov %0, %%ds" : : "r" (ds));
}
static inline uint16_t
get_fs(void)
{
uint16_t fs;
__asm__ volatile ("mov %%fs, %0" : "=r" (fs));
return fs;
}
static inline void
set_fs(uint16_t fs)
{
__asm__ volatile ("mov %0, %%fs" : : "r" (fs));
}
static inline uint16_t
get_gs(void)
{
uint16_t gs;
__asm__ volatile ("mov %%gs, %0" : "=r" (gs));
return gs;
}
static inline void
set_gs(uint16_t gs)
{
__asm__ volatile ("mov %0, %%gs" : : "r" (gs));
}
static inline uint16_t
get_ss(void)
{
uint16_t ss;
__asm__ volatile ("mov %%ss, %0" : "=r" (ss));
return ss;
}
static inline void
set_ss(uint16_t ss)
{
__asm__ volatile ("mov %0, %%ss" : : "r" (ss));
}
static inline uintptr_t
get_cr0(void)
{
uintptr_t cr0;
__asm__ volatile ("mov %%cr0, %0" : "=r" (cr0));
return cr0;
}
static inline void
set_cr0(uintptr_t value)
{
__asm__ volatile ("mov %0, %%cr0" : : "r" (value));
}
static inline uintptr_t
get_cr2(void)
{
uintptr_t cr2;
__asm__ volatile ("mov %%cr2, %0" : "=r" (cr2));
return cr2;
}
static inline uintptr_t
get_cr3_raw(void)
{
uintptr_t cr3;
__asm__ volatile ("mov %%cr3, %0" : "=r" (cr3));
return cr3;
}
static inline void
set_cr3_raw(uintptr_t value)
{
__asm__ volatile ("mov %0, %%cr3" : : "r" (value));
}
static inline uintptr_t
get_cr3_base(void)
{
uintptr_t cr3;
__asm__ volatile ("mov %%cr3, %0" : "=r" (cr3));
return cr3 & ~(0xFFFULL);
}
static inline void
set_cr3_composed(uintptr_t base, uint16_t pcid, uint64_t preserve)
{
__asm__ volatile ("mov %0, %%cr3" : : "r" (base | pcid | ( (preserve) << 63) ));
}
static inline uintptr_t
get_cr4(void)
{
uintptr_t cr4;
__asm__ volatile ("mov %%cr4, %0" : "=r" (cr4));
return cr4;
}
static inline void
set_cr4(uintptr_t value)
{
__asm__ volatile ("mov %0, %%cr4" : : "r" (value));
}
static inline uintptr_t
x86_get_flags(void)
{
uintptr_t erflags;
__asm__ volatile ("pushf; pop %0" : "=r" (erflags));
return erflags;
}
static inline void
clear_ts(void)
{
__asm__ volatile ("clts");
}
static inline unsigned short
get_tr(void)
{
unsigned short seg;
__asm__ volatile ("str %0" : "=rm" (seg));
return seg;
}
static inline void
set_tr(unsigned int seg)
{
__asm__ volatile ("ltr %0" : : "rm" ((unsigned short)(seg)));
}
static inline unsigned short
sldt(void)
{
unsigned short seg;
__asm__ volatile ("sldt %0" : "=rm" (seg));
return seg;
}
static inline void
lldt(unsigned int seg)
{
__asm__ volatile ("lldt %0" : : "rm" ((unsigned short)(seg)));
}
static inline void
lgdt(uintptr_t *desc)
{
__asm__ volatile ("lgdt %0" : : "m" (*desc));
}
static inline void
lidt(uintptr_t *desc)
{
__asm__ volatile ("lidt %0" : : "m" (*desc));
}
static inline void
swapgs(void)
{
__asm__ volatile ("swapgs");
}
static inline void
hlt(void)
{
__asm__ volatile ("hlt");
}
static inline void
wbinvd(void)
{
__asm__ volatile ("wbinvd");
}
static inline void
invlpg(uintptr_t addr)
{
__asm__ volatile ("invlpg (%0)" :: "r" (addr) : "memory");
}
static inline void
clac(void)
{
__asm__ volatile ("clac");
}
static inline void
stac(void)
{
__asm__ volatile ("stac");
}
/*
* Access to machine-specific registers (available on 586 and better only)
* Note: the rd* operations modify the parameters directly (without using
* pointer indirection), this allows gcc to optimize better
*/
#define rdmsr(msr, lo, hi) \
__asm__ volatile("rdmsr" : "=a" (lo), "=d" (hi) : "c" (msr))
#define wrmsr(msr, lo, hi) \
__asm__ volatile("wrmsr" : : "c" (msr), "a" (lo), "d" (hi))
#define rdtsc(lo, hi) \
__asm__ volatile("lfence; rdtsc" : "=a" (lo), "=d" (hi))
#define rdtsc_nofence(lo, hi) \
__asm__ volatile("rdtsc" : "=a" (lo), "=d" (hi))
#define write_tsc(lo, hi) wrmsr(0x10, lo, hi)
#define rdpmc(counter, lo, hi) \
__asm__ volatile("rdpmc" : "=a" (lo), "=d" (hi) : "c" (counter))
#ifdef __LP64__
static inline uint64_t
rdpmc64(uint32_t pmc)
{
uint32_t lo = 0, hi = 0;
rdpmc(pmc, lo, hi);
return (((uint64_t)hi) << 32) | ((uint64_t)lo);
}
static inline uint64_t
rdmsr64(uint32_t msr)
{
uint32_t lo = 0, hi = 0;
rdmsr(msr, lo, hi);
return (((uint64_t)hi) << 32) | ((uint64_t)lo);
}
static inline void
wrmsr64(uint32_t msr, uint64_t val)
{
wrmsr(msr, (val & 0xFFFFFFFFUL), ((val >> 32) & 0xFFFFFFFFUL));
}
static inline uint64_t
rdtsc64(void)
{
uint64_t lo, hi;
rdtsc(lo, hi);
return ((hi) << 32) | (lo);
}
static inline uint64_t
rdtsc64_nofence(void)
{
uint64_t lo, hi;
rdtsc_nofence(lo, hi);
return ((hi) << 32) | (lo);
}
static inline uint64_t
rdtscp64(uint32_t *aux)
{
uint64_t lo, hi;
__asm__ volatile ("rdtscp; mov %%ecx, %1"
: "=a" (lo), "=d" (hi), "=m" (*aux)
:
: "ecx");
return ((hi) << 32) | (lo);
}
#endif /* __LP64__ */
/*
* rdmsr_carefully() returns 0 when the MSR has been read successfully,
* or non-zero (1) if the MSR does not exist.
* The implementation is in locore.s.
*/
extern int rdmsr_carefully(uint32_t msr, uint32_t *lo, uint32_t *hi);
__END_DECLS
#endif /* ASSEMBLER */
#define MSR_IA32_P5_MC_ADDR 0
#define MSR_IA32_P5_MC_TYPE 1
#define MSR_IA32_PLATFORM_ID 0x17
#define MSR_IA32_EBL_CR_POWERON 0x2a
#define MSR_IA32_APIC_BASE 0x1b
#define MSR_IA32_APIC_BASE_BSP (1<<8)
#define MSR_IA32_APIC_BASE_EXTENDED (1<<10)
#define MSR_IA32_APIC_BASE_ENABLE (1<<11)
#define MSR_IA32_APIC_BASE_BASE (0xfffff<<12)
#define MSR_CORE_THREAD_COUNT 0x35
#define MSR_IA32_FEATURE_CONTROL 0x3a
#define MSR_IA32_FEATCTL_LOCK (1<<0)
#define MSR_IA32_FEATCTL_VMXON_SMX (1<<1)
#define MSR_IA32_FEATCTL_VMXON (1<<2)
#define MSR_IA32_FEATCTL_CSTATE_SMI (1<<16)
#define MSR_IA32_UPDT_TRIG 0x79
#define MSR_IA32_BIOS_SIGN_ID 0x8b
#define MSR_IA32_UCODE_WRITE MSR_IA32_UPDT_TRIG
#define MSR_IA32_UCODE_REV MSR_IA32_BIOS_SIGN_ID
#define MSR_IA32_PERFCTR0 0xc1
#define MSR_IA32_PERFCTR1 0xc2
#define MSR_IA32_PERFCTR3 0xc3
#define MSR_IA32_PERFCTR4 0xc4
#define MSR_PLATFORM_INFO 0xce
#define MSR_IA32_MPERF 0xE7
#define MSR_IA32_APERF 0xE8
#define MSR_IA32_ARCH_CAPABILITIES 0x10a
#define MSR_IA32_ARCH_CAPABILITIES_RDCL_NO (1ULL << 0)
#define MSR_IA32_ARCH_CAPABILITIES_IBRS_ALL (1ULL << 1)
#define MSR_IA32_ARCH_CAPABILITIES_RSBA (1ULL << 2)
#define MSR_IA32_ARCH_CAPABILITIES_L1DF_NO (1ULL << 3)
#define MSR_IA32_ARCH_CAPABILITIES_SSB_NO (1ULL << 4)
#define MSR_IA32_ARCH_CAPABILITIES_MDS_NO (1ULL << 5)
#define MSR_IA32_ARCH_CAPABILITIES_IFU_NO (1ULL << 6) /* This CPU is not susceptible to the instruction-fetch erratum */
#define MSR_IA32_ARCH_CAPABILITIES_TSX_CTRL (1ULL << 7) /* This CPU supports the TSX_CTRL MSR */
#define MSR_IA32_ARCH_CAPABILITIES_TAA_NO (1ULL << 8) /* This CPU is not susceptible to TAA */
#define MSR_IA32_TSX_FORCE_ABORT 0x10f
#define MSR_IA32_TSXFA_RTM_FORCE_ABORT (1ULL << 0) /* Bit 0 */
#define MSR_IA32_BBL_CR_CTL 0x119
#define MSR_IA32_TSX_CTRL 0x122
#define MSR_IA32_TSXCTRL_RTM_DISABLE (1ULL << 0) /* Bit 0 */
#define MSR_IA32_TSXCTRL_TSX_CPU_CLEAR (1ULL << 1) /* Bit 1 */
#define MSR_IA32_MCU_OPT_CTRL 0x123
#define MSR_IA32_MCUOPTCTRL_RNGDS_MITG_DIS (1ULL << 0) /* Bit 0 */
#define MSR_IA32_SYSENTER_CS 0x174
#define MSR_IA32_SYSENTER_ESP 0x175
#define MSR_IA32_SYSENTER_EIP 0x176
#define MSR_IA32_MCG_CAP 0x179
#define MSR_IA32_MCG_STATUS 0x17a
#define MSR_IA32_MCG_CTL 0x17b
#define MSR_IA32_EVNTSEL0 0x186
#define MSR_IA32_EVNTSEL1 0x187
#define MSR_IA32_EVNTSEL2 0x188
#define MSR_IA32_EVNTSEL3 0x189
#define MSR_FLEX_RATIO 0x194
#define MSR_IA32_PERF_STS 0x198
#define MSR_IA32_PERF_CTL 0x199
#define MSR_IA32_CLOCK_MODULATION 0x19a
#define MSR_IA32_MISC_ENABLE 0x1a0
#define MSR_IA32_PACKAGE_THERM_STATUS 0x1b1
#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x1b2
#define MSR_IA32_LBR_SELECT 0x1c8
#define LBR_SELECT_CPL_EQ_0 (1ULL) /* R/W When set, do not capture branches ending in ring 0 */
#define LBR_SELECT_CPL_NEQ_0 (1ULL << 1) /* R/W When set, do not capture branches ending in ring >0 */
#define LBR_SELECT_JCC (1ULL << 2) /* R/W When set, do not capture conditional branches */
#define LBR_SELECT_NEAR_REL_CALL (1ULL << 3) /* R/W When set, do not capture near relative calls */
#define LBR_SELECT_NEAR_IND_CALL (1ULL << 4) /* R/W When set, do not capture near indirect calls */
#define LBR_SELECT_NEAR_RET (1ULL << 5) /* R/W When set, do not capture near returns */
#define LBR_SELECT_NEAR_IND_JMP (1ULL << 6) /* R/W When set, do not capture near indirect jumps except near indirect calls and near returns */
#define LBR_SELECT_NEAR_REL_JMP (1ULL << 7) /* R/W When set, do not capture near relative jumps except near relative calls. */
#define LBR_SELECT_FAR_BRANCH (1ULL << 8) /* R/W When set, do not capture far branches */
#define LBR_SELECT_HSW_EN_CALLSTACK1 (1ULL << 9) /* Enable LBR stack to use LIFO filtering to capture Call stack profile */
#define MSR_IA32_LASTBRANCH_TOS 0x1c9
/* LBR INFO MSR fields (SKL and later) */
/* Same fields can be used for HSW in the FROM_x LBR MSRs */
#define MSR_IA32_LBRINFO_TSX_ABORT (1ULL << 61)
#define MSR_IA32_LBRINFO_IN_TSX (1ULL << 62)
#define MSR_IA32_LBRINFO_MISPREDICT (1ULL << 63)
#define MSR_IA32_LBRINFO_CYCLECNT_MASK (0xFFFFULL)
#define MSR_IA32_DEBUGCTLMSR 0x1d9
#define DEBUGCTL_LBR_ENA (1U)
#define MSR_IA32_LASTBRANCHFROMIP 0x1db
#define MSR_IA32_LASTBRANCHTOIP 0x1dc
#define MSR_IA32_LASTINTFROMIP 0x1dd
#define MSR_IA32_LASTINTTOIP 0x1de
#define MSR_IA32_CR_PAT 0x277
#define MSR_IA32_MTRRCAP 0xfe
#define MSR_IA32_MTRR_DEF_TYPE 0x2ff
#define MSR_IA32_MTRR_PHYSBASE(n) (0x200 + 2*(n))
#define MSR_IA32_MTRR_PHYSMASK(n) (0x200 + 2*(n) + 1)
#define MSR_IA32_MTRR_FIX64K_00000 0x250
#define MSR_IA32_MTRR_FIX16K_80000 0x258
#define MSR_IA32_MTRR_FIX16K_A0000 0x259
#define MSR_IA32_MTRR_FIX4K_C0000 0x268
#define MSR_IA32_MTRR_FIX4K_C8000 0x269
#define MSR_IA32_MTRR_FIX4K_D0000 0x26a
#define MSR_IA32_MTRR_FIX4K_D8000 0x26b
#define MSR_IA32_MTRR_FIX4K_E0000 0x26c
#define MSR_IA32_MTRR_FIX4K_E8000 0x26d
#define MSR_IA32_MTRR_FIX4K_F0000 0x26e
#define MSR_IA32_MTRR_FIX4K_F8000 0x26f
#define MSR_IA32_PERF_FIXED_CTR0 0x309
#define MSR_IA32_PERF_CAPABILITIES 0x345
#define PERFCAP_LBR_FMT_MASK (0x3f)
#define PERFCAP_LBR_TYPE(msrval) ((msrval) & PERFCAP_LBR_FMT_MASK)
#define PERFCAP_LBR_TYPE_MISPRED 3 /* NHM */
#define PERFCAP_LBR_TYPE_TSXINFO 4 /* HSW/BDW */
#define PERFCAP_LBR_TYPE_EIP_WITH_LBRINFO 5 /* SKL+ */
/* Types 6 & 7 are for Goldmont and Goldmont Plus, respectively */
#define LBR_TYPE_MISPRED_FROMRIP(from_rip) (((from_rip) & 0xFFFFFFFFFFFFULL) | (((from_rip) & (1ULL << 47)) ? 0xFFFF000000000000ULL : 0))
#define LBR_TYPE_MISPRED_MISPREDICT(from_rip) (((from_rip) & MSR_IA32_LBRINFO_MISPREDICT) ? 1 : 0)
#define LBR_TYPE_TSXINFO_FROMRIP(from_rip) (LBR_TYPE_MISPRED_FROMRIP(from_rip))
#define LBR_TYPE_TSXINFO_MISPREDICT(from_rip) (((from_rip) & MSR_IA32_LBRINFO_MISPREDICT) ? 1 : 0)
#define LBR_TYPE_TSXINFO_TSX_ABORT(from_rip) (((from_rip) & MSR_IA32_LBRINFO_TSX_ABORT) ? 1 : 0)
#define LBR_TYPE_TSXINFO_IN_TSX(from_rip) (((from_rip) & MSR_IA32_LBRINFO_IN_TSX) ? 1 : 0)
#define LBR_TYPE_EIP_WITH_LBRINFO_MISPREDICT(lbrinfo) LBR_TYPE_TSXINFO_MISPREDICT(lbrinfo)
#define LBR_TYPE_EIP_WITH_LBRINFO_TSX_ABORT(lbrinfo) LBR_TYPE_TSXINFO_TSX_ABORT(lbrinfo)
#define LBR_TYPE_EIP_WITH_LBRINFO_IN_TSX(lbrinfo) LBR_TYPE_TSXINFO_IN_TSX(lbrinfo)
#define LBR_TYPE_EIP_WITH_LBRINFO_CYC_COUNT(lbrinfo) ((lbrinfo) & 0xFFFFULL)
#define MSR_IA32_PERF_FIXED_CTR_CTRL 0x38D
#define MSR_IA32_PERF_GLOBAL_STATUS 0x38E
#define MSR_IA32_PERF_GLOBAL_CTRL 0x38F
#define MSR_IA32_PERF_GLOBAL_OVF_CTRL 0x390
#define MSR_IA32_PKG_C3_RESIDENCY 0x3F8
#define MSR_IA32_PKG_C6_RESIDENCY 0x3F9
#define MSR_IA32_PKG_C7_RESIDENCY 0x3FA
#define MSR_IA32_CORE_C3_RESIDENCY 0x3FC
#define MSR_IA32_CORE_C6_RESIDENCY 0x3FD
#define MSR_IA32_CORE_C7_RESIDENCY 0x3FE
#define MSR_IA32_MC0_CTL 0x400
#define MSR_IA32_MC0_STATUS 0x401
#define MSR_IA32_MC0_ADDR 0x402
#define MSR_IA32_MC0_MISC 0x403
#define MSR_IA32_VMX_BASE 0x480
#define MSR_IA32_VMX_BASIC MSR_IA32_VMX_BASE
#define MSR_IA32_VMX_PINBASED_CTLS MSR_IA32_VMX_BASE+1
#define MSR_IA32_VMX_PROCBASED_CTLS MSR_IA32_VMX_BASE+2
#define MSR_IA32_VMX_EXIT_CTLS MSR_IA32_VMX_BASE+3
#define MSR_IA32_VMX_ENTRY_CTLS MSR_IA32_VMX_BASE+4
#define MSR_IA32_VMX_MISC MSR_IA32_VMX_BASE+5
#define MSR_IA32_VMX_CR0_FIXED0 MSR_IA32_VMX_BASE+6
#define MSR_IA32_VMX_CR0_FIXED1 MSR_IA32_VMX_BASE+7
#define MSR_IA32_VMX_CR4_FIXED0 MSR_IA32_VMX_BASE+8
#define MSR_IA32_VMX_CR4_FIXED1 MSR_IA32_VMX_BASE+9
#define MSR_IA32_VMX_VMCS_ENUM MSR_IA32_VMX_BASE+10
#define MSR_IA32_VMX_PROCBASED_CTLS2 MSR_IA32_VMX_BASE+11
#define MSR_IA32_VMX_EPT_VPID_CAP MSR_IA32_VMX_BASE+12
#define MSR_IA32_VMX_EPT_VPID_CAP_AD_SHIFT 21
#define MSR_IA32_VMX_TRUE_PINBASED_CTLS MSR_IA32_VMX_BASE+13
#define MSR_IA32_VMX_TRUE_PROCBASED_CTLS MSR_IA32_VMX_BASE+14
#define MSR_IA32_VMX_TRUE_VMEXIT_CTLS MSR_IA32_VMX_BASE+15
#define MSR_IA32_VMX_TRUE_VMENTRY_CTLS MSR_IA32_VMX_BASE+16
#define MSR_IA32_VMX_VMFUNC MSR_IA32_VMX_BASE+17
#define MSR_IA32_DS_AREA 0x600
#define MSR_IA32_PKG_POWER_SKU_UNIT 0x606
#define MSR_IA32_PKG_C2_RESIDENCY 0x60D
#define MSR_IA32_PKG_ENERGY_STATUS 0x611
#define MSR_IA32_DDR_ENERGY_STATUS 0x619
#define MSR_IA32_LLC_FLUSHED_RESIDENCY_TIMER 0x61D
#define MSR_IA32_RING_PERF_STATUS 0x621
#define MSR_IA32_PKG_C8_RESIDENCY 0x630
#define MSR_IA32_PKG_C9_RESIDENCY 0x631
#define MSR_IA32_PKG_C10_RESIDENCY 0x632
#define MSR_IA32_PP0_ENERGY_STATUS 0x639
#define MSR_IA32_PP1_ENERGY_STATUS 0x641
#define MSR_IA32_IA_PERF_LIMIT_REASONS_SKL 0x64F
#define MSR_IA32_IA_PERF_LIMIT_REASONS 0x690
#define MSR_IA32_GT_PERF_LIMIT_REASONS 0x6B0
#define MSR_IA32_TSC_DEADLINE 0x6e0
#define MSR_IA32_EFER 0xC0000080
#define MSR_IA32_EFER_SCE 0x00000001
#define MSR_IA32_EFER_LME 0x00000100
#define MSR_IA32_EFER_LMA 0x00000400
#define MSR_IA32_EFER_NXE 0x00000800
#define MSR_IA32_STAR 0xC0000081
#define MSR_IA32_LSTAR 0xC0000082
#define MSR_IA32_CSTAR 0xC0000083
#define MSR_IA32_FMASK 0xC0000084
#define MSR_IA32_FS_BASE 0xC0000100
#define MSR_IA32_GS_BASE 0xC0000101
#define MSR_IA32_KERNEL_GS_BASE 0xC0000102
#define MSR_IA32_TSC_AUX 0xC0000103
#define HV_VMX_EPTP_MEMORY_TYPE_UC 0x0
#define HV_VMX_EPTP_MEMORY_TYPE_WB 0x6
#define HV_VMX_EPTP_WALK_LENGTH(wl) (0ULL | ((((wl) - 1) & 0x7) << 3))
#define HV_VMX_EPTP_ENABLE_AD_FLAGS (1ULL << 6)
#endif /* _I386_PROC_REG_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/_mcontext.h | /*
* Copyright (c) 2003-2012 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 __I386_MCONTEXT_H_
#define __I386_MCONTEXT_H_
#if defined (__i386__) || defined (__x86_64__)
#include <sys/cdefs.h> /* __DARWIN_UNIX03 */
#include <sys/appleapiopts.h>
#include <mach/machine/_structs.h>
#ifndef _STRUCT_MCONTEXT32
#if __DARWIN_UNIX03
#define _STRUCT_MCONTEXT32 struct __darwin_mcontext32
_STRUCT_MCONTEXT32
{
_STRUCT_X86_EXCEPTION_STATE32 __es;
_STRUCT_X86_THREAD_STATE32 __ss;
_STRUCT_X86_FLOAT_STATE32 __fs;
};
#define _STRUCT_MCONTEXT_AVX32 struct __darwin_mcontext_avx32
_STRUCT_MCONTEXT_AVX32
{
_STRUCT_X86_EXCEPTION_STATE32 __es;
_STRUCT_X86_THREAD_STATE32 __ss;
_STRUCT_X86_AVX_STATE32 __fs;
};
#if defined(_STRUCT_X86_AVX512_STATE32)
#define _STRUCT_MCONTEXT_AVX512_32 struct __darwin_mcontext_avx512_32
_STRUCT_MCONTEXT_AVX512_32
{
_STRUCT_X86_EXCEPTION_STATE32 __es;
_STRUCT_X86_THREAD_STATE32 __ss;
_STRUCT_X86_AVX512_STATE32 __fs;
};
#endif /* _STRUCT_X86_AVX512_STATE32 */
#else /* !__DARWIN_UNIX03 */
#define _STRUCT_MCONTEXT32 struct mcontext32
_STRUCT_MCONTEXT32
{
_STRUCT_X86_EXCEPTION_STATE32 es;
_STRUCT_X86_THREAD_STATE32 ss;
_STRUCT_X86_FLOAT_STATE32 fs;
};
#define _STRUCT_MCONTEXT_AVX32 struct mcontext_avx32
_STRUCT_MCONTEXT_AVX32
{
_STRUCT_X86_EXCEPTION_STATE32 es;
_STRUCT_X86_THREAD_STATE32 ss;
_STRUCT_X86_AVX_STATE32 fs;
};
#if defined(_STRUCT_X86_AVX512_STATE32)
#define _STRUCT_MCONTEXT_AVX512_32 struct mcontext_avx512_32
_STRUCT_MCONTEXT_AVX512_32
{
_STRUCT_X86_EXCEPTION_STATE32 es;
_STRUCT_X86_THREAD_STATE32 ss;
_STRUCT_X86_AVX512_STATE32 fs;
};
#endif /* _STRUCT_X86_AVX512_STATE32 */
#endif /* __DARWIN_UNIX03 */
#endif /* _STRUCT_MCONTEXT32 */
#ifndef _STRUCT_MCONTEXT64
#if __DARWIN_UNIX03
#define _STRUCT_MCONTEXT64 struct __darwin_mcontext64
_STRUCT_MCONTEXT64
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_STATE64 __ss;
_STRUCT_X86_FLOAT_STATE64 __fs;
};
#define _STRUCT_MCONTEXT64_FULL struct __darwin_mcontext64_full
_STRUCT_MCONTEXT64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_FULL_STATE64 __ss;
_STRUCT_X86_FLOAT_STATE64 __fs;
};
#define _STRUCT_MCONTEXT_AVX64 struct __darwin_mcontext_avx64
_STRUCT_MCONTEXT_AVX64
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_STATE64 __ss;
_STRUCT_X86_AVX_STATE64 __fs;
};
#define _STRUCT_MCONTEXT_AVX64_FULL struct __darwin_mcontext_avx64_full
_STRUCT_MCONTEXT_AVX64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_FULL_STATE64 __ss;
_STRUCT_X86_AVX_STATE64 __fs;
};
#if defined(_STRUCT_X86_AVX512_STATE64)
#define _STRUCT_MCONTEXT_AVX512_64 struct __darwin_mcontext_avx512_64
_STRUCT_MCONTEXT_AVX512_64
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_STATE64 __ss;
_STRUCT_X86_AVX512_STATE64 __fs;
};
#define _STRUCT_MCONTEXT_AVX512_64_FULL struct __darwin_mcontext_avx512_64_full
_STRUCT_MCONTEXT_AVX512_64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 __es;
_STRUCT_X86_THREAD_FULL_STATE64 __ss;
_STRUCT_X86_AVX512_STATE64 __fs;
};
#endif /* _STRUCT_X86_AVX512_STATE64 */
#else /* !__DARWIN_UNIX03 */
#define _STRUCT_MCONTEXT64 struct mcontext64
_STRUCT_MCONTEXT64
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_STATE64 ss;
_STRUCT_X86_FLOAT_STATE64 fs;
};
#define _STRUCT_MCONTEXT64_FULL struct mcontext64_full
_STRUCT_MCONTEXT64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_FULL_STATE64 ss;
_STRUCT_X86_FLOAT_STATE64 fs;
};
#define _STRUCT_MCONTEXT_AVX64 struct mcontext_avx64
_STRUCT_MCONTEXT_AVX64
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_STATE64 ss;
_STRUCT_X86_AVX_STATE64 fs;
};
#define _STRUCT_MCONTEXT_AVX64_FULL struct mcontext_avx64_full
_STRUCT_MCONTEXT_AVX64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_FULL_STATE64 ss;
_STRUCT_X86_AVX_STATE64 fs;
};
#if defined(_STRUCT_X86_AVX512_STATE64)
#define _STRUCT_MCONTEXT_AVX512_64 struct mcontext_avx512_64
_STRUCT_MCONTEXT_AVX512_64
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_STATE64 ss;
_STRUCT_X86_AVX512_STATE64 fs;
};
#define _STRUCT_MCONTEXT_AVX512_64_FULL struct mcontext_avx512_64_full
_STRUCT_MCONTEXT_AVX512_64_FULL
{
_STRUCT_X86_EXCEPTION_STATE64 es;
_STRUCT_X86_THREAD_FULL_STATE64 ss;
_STRUCT_X86_AVX512_STATE64 fs;
};
#endif /* _STRUCT_X86_AVX512_STATE64 */
#endif /* __DARWIN_UNIX03 */
#endif /* _STRUCT_MCONTEXT64 */
#ifndef _MCONTEXT_T
#define _MCONTEXT_T
#if defined(__LP64__)
typedef _STRUCT_MCONTEXT64 *mcontext_t;
#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT64
#else
typedef _STRUCT_MCONTEXT32 *mcontext_t;
#define _STRUCT_MCONTEXT _STRUCT_MCONTEXT32
#endif
#endif /* _MCONTEXT_T */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* __I386_MCONTEXT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/asm.h | /*
* Copyright (c) 2000-2018 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
#ifndef _I386_ASM_H_
#define _I386_ASM_H_
#if defined (__i386__) || defined (__x86_64__)
#if defined(__i386__)
#define S_PC (%esp)
#define S_ARG0 4(%esp)
#define S_ARG1 8(%esp)
#define S_ARG2 12(%esp)
#define S_ARG3 16(%esp)
#define S_ARG4 20(%esp)
#define FRAME pushl %ebp; movl %esp, %ebp
#define EMARF leave
#define B_LINK (%ebp)
#define B_PC 4(%ebp)
#define B_ARG0 8(%ebp)
#define B_ARG1 12(%ebp)
#define B_ARG2 16(%ebp)
#define B_ARG3 20(%ebp)
#elif defined(__x86_64__)
#define S_PC (%rsp)
#define FRAME pushq %rbp; movq %rsp, %rbp
#define EMARF leave
#define B_LINK (%rbp)
#define B_PC 8(%rbp)
#else
#error unsupported architecture
#endif
/* There is another definition of ALIGN for .c sources */
#ifdef __ASSEMBLER__
#define ALIGN 4,0x90
#endif /* __ASSEMBLER__ */
#ifndef FALIGN
#define FALIGN ALIGN
#endif
#define LB(x,n) n
#if __STDC__
#ifndef __NO_UNDERSCORES__
#define LCL(x) L ## x
#define EXT(x) _ ## x
#define LEXT(x) _ ## x ## :
#else
#define LCL(x) .L ## x
#define EXT(x) x
#define LEXT(x) x ## :
#endif
#define LBc(x,n) n ## :
#define LBb(x,n) n ## b
#define LBf(x,n) n ## f
#else /* __STDC__ */
#ifndef __NO_UNDERSCORES__
#define LCL(x) L/**/x
#define EXT(x) _/**/x
#define LEXT(x) _/**/x/**/:
#else /* __NO_UNDERSCORES__ */
#define LCL(x) .L/**/x
#define EXT(x) x
#define LEXT(x) x/**/:
#endif /* __NO_UNDERSCORES__ */
#define LBc(x,n) n/**/:
#define LBb(x,n) n/**/b
#define LBf(x,n) n/**/f
#endif /* __STDC__ */
#define SVC .byte 0x9a; .long 0; .word 0x7
#define RPC_SVC .byte 0x9a; .long 0; .word 0xf
#define String .asciz
#define Value .word
#define Times(a,b) (a*b)
#define Divide(a,b) (a/b)
#define INB inb %dx, %al
#define OUTB outb %al, %dx
#define INL inl %dx, %eax
#define OUTL outl %eax, %dx
#define data16 .byte 0x66
#define addr16 .byte 0x67
#define MCOUNT
#if defined(__SHARED__)
#define MCOUNT ; .data;\
.align ALIGN;\
LBc(x, 8) .long 0;\
.text;\
Gpush;\
Gload;\
leal Gotoff(LBb(x,8)),%edx;\
Egaddr(%eax,_mcount_ptr);\
Gpop;\
call *(%eax);
#endif /* __SHARED__ */
#ifdef __ELF__
#define ELF_FUNC(x) .type x,@function
#define ELF_DATA(x) .type x,@object
#define ELF_SIZE(x,s) .size x,s
#else
#define ELF_FUNC(x)
#define ELF_DATA(x)
#define ELF_SIZE(x,s)
#endif
#define Entry(x) .globl EXT(x); ELF_FUNC(EXT(x)); .align FALIGN; LEXT(x)
#define ENTRY(x) Entry(x) MCOUNT
#define ENTRY2(x,y) .globl EXT(x); .globl EXT(y); \
ELF_FUNC(EXT(x)); ELF_FUNC(EXT(y)); \
.align FALIGN; LEXT(x); LEXT(y) \
MCOUNT
#if __STDC__
#define ASENTRY(x) .globl x; .align FALIGN; x ## : ELF_FUNC(x) MCOUNT
#else
#define ASENTRY(x) .globl x; .align FALIGN; x: ELF_FUNC(x) MCOUNT
#endif /* __STDC__ */
#define DATA(x) .globl EXT(x); ELF_DATA(EXT(x)); .align ALIGN; LEXT(x)
#define End(x) ELF_SIZE(x,.-x)
#define END(x) End(EXT(x))
#define ENDDATA(x) END(x)
#define Enddata(x) End(x)
/*
* ELF shared library accessor macros.
* Gpush saves the %ebx register used for the GOT address
* Gpop pops %ebx if we need a GOT
* Gload loads %ebx with the GOT address if shared libraries are used
* Gcall calls an external function.
* Gotoff allows you to reference local labels.
* Gotoff2 allows you to reference local labels with an index reg.
* Gotoff3 allows you to reference local labels with an index reg & size.
* Gaddr loads up a register with an address of an external item.
* Gstack is the number of bytes that Gpush pushes on the stack.
*
* Varients of the above with E or L prefixes do EXT(name) or LCL(name)
* respectively.
*/
#ifndef __SHARED__
#define Gpush
#define Gpop
#define Gload
#define Gcall(func) call func
#define Gotoff(lab) lab
#define Gotoff2(l,r) l(r)
#define Gotoff3(l,r,s) l(,r,s)
#define Gaddr(to,lab) movl $lab,to
#define Gcmp(lab,reg) cmpl $lab,reg
#define Gmemload(lab,reg) movl lab,reg
#define Gmemstore(reg,lab,tmp) movl reg,lab
#define Gstack 0
#else
#ifdef __ELF__ /* ELF shared libraries */
#define Gpush pushl %ebx
#define Gpop popl %ebx
#define Gload call 9f; 9: popl %ebx; addl $_GLOBAL_OFFSET_TABLE_+[.-9b],%ebx
#define Gcall(func) call EXT(func)@PLT
#define Gotoff(lab) lab@GOTOFF(%ebx)
#define Gotoff2(l,r) l@GOTOFF(%ebx,r)
#define Gotoff3(l,r,s) l@GOTOFF(%ebx,r,s)
#define Gaddr(to,lab) movl lab@GOT(%ebx),to
#define Gcmp(lab,reg) cmpl reg,lab@GOT(%ebx)
#define Gmemload(lab,reg) movl lab@GOT(%ebx),reg; movl (reg),reg
#define Gmemstore(reg,lab,tmp) movl lab@GOT(%ebx),tmp; movl reg,(tmp)
#define Gstack 4
#else /* ROSE shared libraries */
#define Gpush
#define Gpop
#define Gload
#define Gcall(func) call *9f; .data; .align ALIGN; 9: .long func; .text
#define Gotoff(lab) lab
#define Gotoff2(l,r) l(r)
#define Gotoff3(l,r,s) l(,r,s)
#define Gaddr(to,lab) movl 9f,to; .data; .align ALIGN; 9: .long lab; .text
#define Gcmp(lab,reg) cmpl reg,9f; .data; .align ALIGN; 9: .long lab; .text
#define Gmemload(lab,reg) movl 9f,reg; movl (reg),reg; .data; .align ALIGN; 9: .long lab; .text
#define Gmemstore(reg,lab,tmp) movl 9f,tmp; movl reg,(tmp); .data; .align ALIGN; 9: .long lab; .text
#define Gstack 0
#endif /* __ELF__ */
#endif /* __SHARED__ */
/* Egotoff is not provided, since external symbols should not use @GOTOFF
relocations. */
#define Egcall(func) Gcall(EXT(func))
#define Egaddr(to,lab) Gaddr(to,EXT(lab))
#define Egcmp(lab,reg) Gcmp(EXT(lab),reg)
#define Egmemload(lab,reg) Gmemload(EXT(lab),reg)
#define Egmemstore(reg,lab,tmp) Gmemstore(reg,EXT(lab),tmp)
#define Lgotoff(lab) Gotoff(LCL(lab))
#define Lgotoff2(l,r) Gotoff2(LCL(l),r)
#define Lgotoff3(l,r,s) Gotoff3(LCL(l),r,s)
#define Lgcmp(lab,reg) Gcmp(LCL(lab),reg)
#define Lgmemload(lab,reg) movl Lgotoff(lab),reg
#define Lgmemstore(reg,lab,tmp) movl reg,Lgotoff(lab)
#ifndef __ASSEMBLER__
/* These defines are here for .c files that wish to reference global symbols
* within __asm__ statements.
*/
#ifndef __NO_UNDERSCORES__
#define CC_SYM_PREFIX "_"
#else
#define CC_SYM_PREFIX ""
#endif /* __NO_UNDERSCORES__ */
#endif /* __ASSEMBLER__ */
/*
* The following macros make calls into C code.
* They dynamically align the stack to 16 bytes.
*/
#if defined(__i386__)
/*
* Arguments are moved (not pushed) onto the correctly aligned stack.
* NOTE: ESI is destroyed in the process, and hence cannot
* be directly used as a parameter. Users of this macro must
* independently preserve ESI (a non-volatile) if the routine is
* intended to be called from C, for instance.
*/
#define CCALL(fn) \
movl %esp, %esi ;\
andl $0xFFFFFFF0, %esp ;\
call EXT(fn) ;\
movl %esi, %esp
#define CCALL1(fn, arg1) \
movl %esp, %esi ;\
subl $4, %esp ;\
andl $0xFFFFFFF0, %esp ;\
movl arg1, (%esp) ;\
call EXT(fn) ;\
movl %esi, %esp
#define CCALL2(fn, arg1, arg2) \
movl %esp, %esi ;\
subl $8, %esp ;\
andl $0xFFFFFFF0, %esp ;\
movl arg2, 4(%esp) ;\
movl arg1, (%esp) ;\
call EXT(fn) ;\
movl %esi, %esp
/* This variant exists to permit adjustment of the stack by "dtrace" */
#define CCALL1WITHSP(fn, arg1) \
movl %esp, %esi ;\
subl $12, %esp ;\
andl $0xFFFFFFF0, %esp ;\
movl %esi, 8(%esp) ;\
leal 8(%esp), %esi ;\
movl %esi, 4(%esp) ;\
movl arg1, (%esp) ;\
call EXT(fn) ;\
movl 8(%esp), %esp
/*
* CCALL5 is used for callee functions with 3 arguments but
* where arg2 (a3:a2) and arg3 (a5:a4) are 64-bit values.
*/
#define CCALL5(fn, a1, a2, a3, a4, a5) \
movl %esp, %esi ;\
subl $20, %esp ;\
andl $0xFFFFFFF0, %esp ;\
movl a5, 16(%esp) ;\
movl a4, 12(%esp) ;\
movl a3, 8(%esp) ;\
movl a2, 4(%esp) ;\
movl a1, (%esp) ;\
call EXT(fn) ;\
movl %esi, %esp
#elif defined(__x86_64__)
/* This variant exists to permit adjustment of the stack by "dtrace" */
#define CCALLWITHSP(fn) \
mov %rsp, %r12 ;\
sub $8, %rsp ;\
and $0xFFFFFFFFFFFFFFF0, %rsp ;\
mov %r12, (%rsp) ;\
leaq (%rsp), %rsi ;\
call EXT(fn) ;\
mov (%rsp), %rsp
#define CCALL(fn) \
mov %rsp, %r12 ;\
and $0xFFFFFFFFFFFFFFF0, %rsp ;\
call EXT(fn) ;\
mov %r12, %rsp
#define CCALL1(fn, arg1) \
mov arg1, %rdi ;\
CCALL(fn)
#define CCALL2(fn, arg1, arg2) \
mov arg1, %rdi ;\
mov arg2, %rsi ;\
CCALL(fn)
#define CCALL3(fn, arg1, arg2, arg3) \
mov arg1, %rdi ;\
mov arg2, %rsi ;\
mov arg3, %rdx ;\
CCALL(fn)
#else
#error unsupported architecture
#endif
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386_ASM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/limits.h | /*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)limits.h 8.3 (Berkeley) 1/4/94
*/
#ifndef _I386_LIMITS_H_
#define _I386_LIMITS_H_
#if defined (__i386__) || defined (__x86_64__)
#include <sys/cdefs.h>
#include <i386/_limits.h>
#define CHAR_BIT 8 /* number of bits in a char */
#define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */
#if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define CLK_TCK __DARWIN_CLK_TCK /* ticks per second */
#endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
/*
* According to ANSI (section 2.2.4.2), the values below must be usable by
* #if preprocessing directives. Additionally, the expression must have the
* same type as would an expression that is an object of the corresponding
* type converted according to the integral promotions. The subtraction for
* INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
* unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
* These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values
* are written as hex so that GCC will be quiet about large integer constants.
*/
#define SCHAR_MAX 127 /* min value for a signed char */
#define SCHAR_MIN (-128) /* max value for a signed char */
#define UCHAR_MAX 255 /* max value for an unsigned char */
#define CHAR_MAX 127 /* max value for a char */
#define CHAR_MIN (-128) /* min value for a char */
#define USHRT_MAX 65535 /* max value for an unsigned short */
#define SHRT_MAX 32767 /* max value for a short */
#define SHRT_MIN (-32768) /* min value for a short */
#define UINT_MAX 0xffffffff /* max value for an unsigned int */
#define INT_MAX 2147483647 /* max value for an int */
#define INT_MIN (-2147483647-1) /* min value for an int */
#ifdef __LP64__
#define ULONG_MAX 0xffffffffffffffffUL /* max unsigned long */
#define LONG_MAX 0x7fffffffffffffffL /* max signed long */
#define LONG_MIN (-0x7fffffffffffffffL-1) /* min signed long */
#else /* !__LP64__ */
#define ULONG_MAX 0xffffffffUL /* max unsigned long */
#define LONG_MAX 2147483647L /* max signed long */
#define LONG_MIN (-2147483647L-1) /* min signed long */
#endif /* __LP64__ */
#define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */
#define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */
#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */
#if !defined(_ANSI_SOURCE)
#ifdef __LP64__
#define LONG_BIT 64
#else /* !__LP64__ */
#define LONG_BIT 32
#endif /* __LP64__ */
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#define WORD_BIT 32
#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE)
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#define UQUAD_MAX ULLONG_MAX
#define QUAD_MAX LLONG_MAX
#define QUAD_MIN LLONG_MIN
#endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */
#endif /* !_ANSI_SOURCE */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386_LIMITS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/cpuid.h | /*
* Copyright (c) 2000-2020 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* x86 CPU identification
*
*/
#ifndef _MACHINE_CPUID_H_
#define _MACHINE_CPUID_H_
#include <sys/appleapiopts.h>
#ifdef __APPLE_API_PRIVATE
#define CPUID_VID_INTEL "GenuineIntel"
#define CPUID_VID_AMD "AuthenticAMD"
#define CPUID_VMM_ID_VMWARE "VMwareVMware"
#define CPUID_VMM_ID_PARALLELS "Parallels\0\0\0"
#define CPUID_VMM_ID_HYVE "bhyve bhyve "
#define CPUID_VMM_ID_HVF "HVFHVFHVFHVF"
#define CPUID_VMM_ID_KVM "KVMKVMKVM\0\0\0"
#define CPUID_STRING_UNKNOWN "Unknown CPU Typ"
#define _Bit(n) (1ULL << n)
#define _HBit(n) (1ULL << ((n)+32))
/*
* The CPUID_FEATURE_XXX values define 64-bit values
* returned in %ecx:%edx to a CPUID request with %eax of 1:
*/
#define CPUID_FEATURE_FPU _Bit(0) /* Floating point unit on-chip */
#define CPUID_FEATURE_VME _Bit(1) /* Virtual Mode Extension */
#define CPUID_FEATURE_DE _Bit(2) /* Debugging Extension */
#define CPUID_FEATURE_PSE _Bit(3) /* Page Size Extension */
#define CPUID_FEATURE_TSC _Bit(4) /* Time Stamp Counter */
#define CPUID_FEATURE_MSR _Bit(5) /* Model Specific Registers */
#define CPUID_FEATURE_PAE _Bit(6) /* Physical Address Extension */
#define CPUID_FEATURE_MCE _Bit(7) /* Machine Check Exception */
#define CPUID_FEATURE_CX8 _Bit(8) /* CMPXCHG8B */
#define CPUID_FEATURE_APIC _Bit(9) /* On-chip APIC */
#define CPUID_FEATURE_SEP _Bit(11) /* Fast System Call */
#define CPUID_FEATURE_MTRR _Bit(12) /* Memory Type Range Register */
#define CPUID_FEATURE_PGE _Bit(13) /* Page Global Enable */
#define CPUID_FEATURE_MCA _Bit(14) /* Machine Check Architecture */
#define CPUID_FEATURE_CMOV _Bit(15) /* Conditional Move Instruction */
#define CPUID_FEATURE_PAT _Bit(16) /* Page Attribute Table */
#define CPUID_FEATURE_PSE36 _Bit(17) /* 36-bit Page Size Extension */
#define CPUID_FEATURE_PSN _Bit(18) /* Processor Serial Number */
#define CPUID_FEATURE_CLFSH _Bit(19) /* CLFLUSH Instruction supported */
#define CPUID_FEATURE_DS _Bit(21) /* Debug Store */
#define CPUID_FEATURE_ACPI _Bit(22) /* Thermal monitor and Clock Ctrl */
#define CPUID_FEATURE_MMX _Bit(23) /* MMX supported */
#define CPUID_FEATURE_FXSR _Bit(24) /* Fast floating pt save/restore */
#define CPUID_FEATURE_SSE _Bit(25) /* Streaming SIMD extensions */
#define CPUID_FEATURE_SSE2 _Bit(26) /* Streaming SIMD extensions 2 */
#define CPUID_FEATURE_SS _Bit(27) /* Self-Snoop */
#define CPUID_FEATURE_HTT _Bit(28) /* Hyper-Threading Technology */
#define CPUID_FEATURE_TM _Bit(29) /* Thermal Monitor (TM1) */
#define CPUID_FEATURE_PBE _Bit(31) /* Pend Break Enable */
#define CPUID_FEATURE_SSE3 _HBit(0) /* Streaming SIMD extensions 3 */
#define CPUID_FEATURE_PCLMULQDQ _HBit(1) /* PCLMULQDQ instruction */
#define CPUID_FEATURE_DTES64 _HBit(2) /* 64-bit DS layout */
#define CPUID_FEATURE_MONITOR _HBit(3) /* Monitor/mwait */
#define CPUID_FEATURE_DSCPL _HBit(4) /* Debug Store CPL */
#define CPUID_FEATURE_VMX _HBit(5) /* VMX */
#define CPUID_FEATURE_SMX _HBit(6) /* SMX */
#define CPUID_FEATURE_EST _HBit(7) /* Enhanced SpeedsTep (GV3) */
#define CPUID_FEATURE_TM2 _HBit(8) /* Thermal Monitor 2 */
#define CPUID_FEATURE_SSSE3 _HBit(9) /* Supplemental SSE3 instructions */
#define CPUID_FEATURE_CID _HBit(10) /* L1 Context ID */
#define CPUID_FEATURE_SEGLIM64 _HBit(11) /* 64-bit segment limit checking */
#define CPUID_FEATURE_FMA _HBit(12) /* Fused-Multiply-Add support */
#define CPUID_FEATURE_CX16 _HBit(13) /* CmpXchg16b instruction */
#define CPUID_FEATURE_xTPR _HBit(14) /* Send Task PRiority msgs */
#define CPUID_FEATURE_PDCM _HBit(15) /* Perf/Debug Capability MSR */
#define CPUID_FEATURE_PCID _HBit(17) /* ASID-PCID support */
#define CPUID_FEATURE_DCA _HBit(18) /* Direct Cache Access */
#define CPUID_FEATURE_SSE4_1 _HBit(19) /* Streaming SIMD extensions 4.1 */
#define CPUID_FEATURE_SSE4_2 _HBit(20) /* Streaming SIMD extensions 4.2 */
#define CPUID_FEATURE_x2APIC _HBit(21) /* Extended APIC Mode */
#define CPUID_FEATURE_MOVBE _HBit(22) /* MOVBE instruction */
#define CPUID_FEATURE_POPCNT _HBit(23) /* POPCNT instruction */
#define CPUID_FEATURE_TSCTMR _HBit(24) /* TSC deadline timer */
#define CPUID_FEATURE_AES _HBit(25) /* AES instructions */
#define CPUID_FEATURE_XSAVE _HBit(26) /* XSAVE instructions */
#define CPUID_FEATURE_OSXSAVE _HBit(27) /* XGETBV/XSETBV instructions */
#define CPUID_FEATURE_AVX1_0 _HBit(28) /* AVX 1.0 instructions */
#define CPUID_FEATURE_F16C _HBit(29) /* Float16 convert instructions */
#define CPUID_FEATURE_RDRAND _HBit(30) /* RDRAND instruction */
#define CPUID_FEATURE_VMM _HBit(31) /* VMM (Hypervisor) present */
/*
* Leaf 7, subleaf 0 additional features.
* Bits returned in %ebx:%ecx to a CPUID request with {%eax,%ecx} of (0x7,0x0}:
*/
#define CPUID_LEAF7_FEATURE_RDWRFSGS _Bit(0) /* FS/GS base read/write */
#define CPUID_LEAF7_FEATURE_TSCOFF _Bit(1) /* TSC thread offset */
#define CPUID_LEAF7_FEATURE_SGX _Bit(2) /* Software Guard eXtensions */
#define CPUID_LEAF7_FEATURE_BMI1 _Bit(3) /* Bit Manipulation Instrs, set 1 */
#define CPUID_LEAF7_FEATURE_HLE _Bit(4) /* Hardware Lock Elision*/
#define CPUID_LEAF7_FEATURE_AVX2 _Bit(5) /* AVX2 Instructions */
#define CPUID_LEAF7_FEATURE_FDPEO _Bit(6) /* x87 FPU Data Pointer updated only on x87 exceptions */
#define CPUID_LEAF7_FEATURE_SMEP _Bit(7) /* Supervisor Mode Execute Protect */
#define CPUID_LEAF7_FEATURE_BMI2 _Bit(8) /* Bit Manipulation Instrs, set 2 */
#define CPUID_LEAF7_FEATURE_ERMS _Bit(9) /* Enhanced Rep Movsb/Stosb */
#define CPUID_LEAF7_FEATURE_INVPCID _Bit(10) /* INVPCID intruction, TDB */
#define CPUID_LEAF7_FEATURE_RTM _Bit(11) /* RTM */
#define CPUID_LEAF7_FEATURE_PQM _Bit(12) /* Platform Qos Monitoring */
#define CPUID_LEAF7_FEATURE_FPU_CSDS _Bit(13) /* FPU CS/DS deprecation */
#define CPUID_LEAF7_FEATURE_MPX _Bit(14) /* Memory Protection eXtensions */
#define CPUID_LEAF7_FEATURE_PQE _Bit(15) /* Platform Qos Enforcement */
#define CPUID_LEAF7_FEATURE_AVX512F _Bit(16) /* AVX512F instructions */
#define CPUID_LEAF7_FEATURE_AVX512DQ _Bit(17) /* AVX512DQ instructions */
#define CPUID_LEAF7_FEATURE_RDSEED _Bit(18) /* RDSEED Instruction */
#define CPUID_LEAF7_FEATURE_ADX _Bit(19) /* ADX Instructions */
#define CPUID_LEAF7_FEATURE_SMAP _Bit(20) /* Supervisor Mode Access Protect */
#define CPUID_LEAF7_FEATURE_AVX512IFMA _Bit(21) /* AVX512IFMA instructions */
#define CPUID_LEAF7_FEATURE_CLFSOPT _Bit(23) /* CLFSOPT */
#define CPUID_LEAF7_FEATURE_CLWB _Bit(24) /* CLWB */
#define CPUID_LEAF7_FEATURE_IPT _Bit(25) /* Intel Processor Trace */
#define CPUID_LEAF7_FEATURE_AVX512CD _Bit(28) /* AVX512CD instructions */
#define CPUID_LEAF7_FEATURE_SHA _Bit(29) /* SHA instructions */
#define CPUID_LEAF7_FEATURE_AVX512BW _Bit(30) /* AVX512BW instructions */
#define CPUID_LEAF7_FEATURE_AVX512VL _Bit(31) /* AVX512VL instructions */
#define CPUID_LEAF7_FEATURE_PREFETCHWT1 _HBit(0) /* Prefetch Write/T1 hint */
#define CPUID_LEAF7_FEATURE_AVX512VBMI _HBit(1) /* AVX512VBMI instructions */
#define CPUID_LEAF7_FEATURE_UMIP _HBit(2) /* User Mode Instruction Prevention */
#define CPUID_LEAF7_FEATURE_PKU _HBit(3) /* Protection Keys for Usermode */
#define CPUID_LEAF7_FEATURE_OSPKE _HBit(4) /* OS has enabled PKE */
#define CPUID_LEAF7_FEATURE_WAITPKG _HBit(5) /* WAITPKG instructions */
#define CPUID_LEAF7_FEATURE_GFNI _HBit(8) /* Galois Field New Instructions */
#define CPUID_LEAF7_FEATURE_VAES _HBit(9) /* Vector-encoded AES */
#define CPUID_LEAF7_FEATURE_VPCLMULQDQ _HBit(10) /* Vector Carryless-multiply */
#define CPUID_LEAF7_FEATURE_AVX512VNNI _HBit(11) /* AVX512 Vector Neural Net Instructions */
#define CPUID_LEAF7_FEATURE_AVX512BITALG _HBit(12) /* AVX512 VPOPCNT{B,W} and VPSHUFBITQMB */
#define CPUID_LEAF7_FEATURE_AVX512VPCDQ _HBit(14) /* AVX512 VPOPCNTDQ instruction */
#define CPUID_LEAF7_FEATURE_RDPID _HBit(22) /* RDPID and IA32_TSC_AUX */
#define CPUID_LEAF7_FEATURE_CLDEMOTE _HBit(25) /* Cache line demote */
#define CPUID_LEAF7_FEATURE_MOVDIRI _HBit(27) /* MOVDIRI instruction */
#define CPUID_LEAF7_FEATURE_MOVDIRI64B _HBit(28) /* MOVDIRI64B instruction */
#define CPUID_LEAF7_FEATURE_SGXLC _HBit(30) /* SGX Launch Configuration */
/*
* Values in EDX returned by CPUID Leaf 7, subleaf 0
*/
#define CPUID_LEAF7_EXTFEATURE_AVX5124VNNIW _Bit(2) /* AVX512_4VNNIW */
#define CPUID_LEAF7_EXTFEATURE_AVX5124FMAPS _Bit(3) /* AVX512_4FMAPS */
#define CPUID_LEAF7_EXTFEATURE_FSREPMOV _Bit(4) /* Fast Short REP MOV */
#define CPUID_LEAF7_EXTFEATURE_SRBDS_CTRL _Bit(9) /* SRBDS MSR Presence and Mitigation Control */
#define CPUID_LEAF7_EXTFEATURE_MDCLEAR _Bit(10) /* Overloaded VERW / L1D_FLUSH */
#define CPUID_LEAF7_EXTFEATURE_TSXFA _Bit(13) /* TSX RTM_FORCE_ABORT MSR */
#define CPUID_LEAF7_EXTFEATURE_IBRS _Bit(26) /* IBRS / IBPB */
#define CPUID_LEAF7_EXTFEATURE_STIBP _Bit(27) /* Single Thread Indirect Branch Predictors */
#define CPUID_LEAF7_EXTFEATURE_L1DF _Bit(28) /* L1D_FLUSH MSR */
#define CPUID_LEAF7_EXTFEATURE_ACAPMSR _Bit(29) /* ARCH_CAP MSR */
#define CPUID_LEAF7_EXTFEATURE_CCAPMSR _Bit(30) /* CORE_CAP MSR */
#define CPUID_LEAF7_EXTFEATURE_SSBD _Bit(31) /* Speculative Store Bypass Disable */
/*
* The CPUID_EXTFEATURE_XXX values define 64-bit values
* returned in %ecx:%edx to a CPUID request with %eax of 0x80000001:
*/
#define CPUID_EXTFEATURE_SYSCALL _Bit(11) /* SYSCALL/sysret */
#define CPUID_EXTFEATURE_XD _Bit(20) /* eXecute Disable */
#define CPUID_EXTFEATURE_1GBPAGE _Bit(26) /* 1GB pages */
#define CPUID_EXTFEATURE_RDTSCP _Bit(27) /* RDTSCP */
#define CPUID_EXTFEATURE_EM64T _Bit(29) /* Extended Mem 64 Technology */
#define CPUID_EXTFEATURE_LAHF _HBit(0) /* LAFH/SAHF instructions */
#define CPUID_EXTFEATURE_LZCNT _HBit(5) /* LZCNT instruction */
#define CPUID_EXTFEATURE_PREFETCHW _HBit(8) /* PREFETCHW instruction */
/*
* The CPUID_EXTFEATURE_XXX values define 64-bit values
* returned in %ecx:%edx to a CPUID request with %eax of 0x80000007:
*/
#define CPUID_EXTFEATURE_TSCI _Bit(8) /* TSC Invariant */
/*
* CPUID_X86_64_H_FEATURE_SUBSET and CPUID_X86_64_H_LEAF7_FEATURE_SUBSET
* indicate the bitmask of features that must be present before the system
* is eligible to run the "x86_64h" "Haswell feature subset" slice.
*/
#define CPUID_X86_64_H_FEATURE_SUBSET ( CPUID_FEATURE_FMA | \
CPUID_FEATURE_SSE4_2 | \
CPUID_FEATURE_MOVBE | \
CPUID_FEATURE_POPCNT | \
CPUID_FEATURE_AVX1_0 \
)
#define CPUID_X86_64_H_EXTFEATURE_SUBSET ( CPUID_EXTFEATURE_LZCNT \
)
#define CPUID_X86_64_H_LEAF7_FEATURE_SUBSET ( CPUID_LEAF7_FEATURE_BMI1 | \
CPUID_LEAF7_FEATURE_AVX2 | \
CPUID_LEAF7_FEATURE_BMI2 \
)
#define CPUID_CACHE_SIZE 16 /* Number of descriptor values */
#define CPUID_MWAIT_EXTENSION _Bit(0) /* enumeration of WMAIT extensions */
#define CPUID_MWAIT_BREAK _Bit(1) /* interrupts are break events */
#define CPUID_MODEL_PENRYN 0x17
#define CPUID_MODEL_NEHALEM 0x1A
#define CPUID_MODEL_FIELDS 0x1E /* Lynnfield, Clarksfield */
#define CPUID_MODEL_DALES 0x1F /* Havendale, Auburndale */
#define CPUID_MODEL_NEHALEM_EX 0x2E
#define CPUID_MODEL_DALES_32NM 0x25 /* Clarkdale, Arrandale */
#define CPUID_MODEL_WESTMERE 0x2C /* Gulftown, Westmere-EP/-WS */
#define CPUID_MODEL_WESTMERE_EX 0x2F
#define CPUID_MODEL_SANDYBRIDGE 0x2A
#define CPUID_MODEL_JAKETOWN 0x2D
#define CPUID_MODEL_IVYBRIDGE 0x3A
#define CPUID_MODEL_IVYBRIDGE_EP 0x3E
#define CPUID_MODEL_CRYSTALWELL 0x46
#define CPUID_MODEL_HASWELL 0x3C
#define CPUID_MODEL_HASWELL_EP 0x3F
#define CPUID_MODEL_HASWELL_ULT 0x45
#define CPUID_MODEL_BROADWELL 0x3D
#define CPUID_MODEL_BROADWELL_ULX 0x3D
#define CPUID_MODEL_BROADWELL_ULT 0x3D
#define CPUID_MODEL_BRYSTALWELL 0x47
#define CPUID_MODEL_SKYLAKE 0x4E
#define CPUID_MODEL_SKYLAKE_ULT 0x4E
#define CPUID_MODEL_SKYLAKE_ULX 0x4E
#define CPUID_MODEL_SKYLAKE_DT 0x5E
#define CPUID_MODEL_SKYLAKE_W 0x55
#define PLATID_XEON_SP_1 0x00
#define PLATID_XEON_SP_2 0x07
#define PLATID_MAYBE_XEON_SP 0x01
#define CPUID_MODEL_KABYLAKE 0x8E
#define CPUID_MODEL_KABYLAKE_ULT 0x8E
#define CPUID_MODEL_KABYLAKE_ULX 0x8E
#define CPUID_MODEL_KABYLAKE_DT 0x9E
#define CPUID_MODEL_ICELAKE 0x7E
#define CPUID_MODEL_ICELAKE_ULT 0x7E
#define CPUID_MODEL_ICELAKE_ULX 0x7E
#define CPUID_MODEL_ICELAKE_DT 0x7D
#define CPUID_MODEL_ICELAKE_H 0x9F
#define CPUID_MODEL_COMETLAKE_DT 0xA5
#define CPUID_VMM_FAMILY_NONE 0x0
#define CPUID_VMM_FAMILY_UNKNOWN 0x1
#define CPUID_VMM_FAMILY_VMWARE 0x2
#define CPUID_VMM_FAMILY_PARALLELS 0x3
#define CPUID_VMM_FAMILY_HYVE 0x4
#define CPUID_VMM_FAMILY_HVF 0x5
#define CPUID_VMM_FAMILY_KVM 0x6
/*
* Apple Paravirtualization CPUID leaves
* The base leaf can be placed at any unused 0x100 aligned boundary
* in the hypervisor class leaves [0x4000_0000-0x4001_0000].
*/
#define APPLEPV_INTERFACE_LEAF_INDEX 1
#define APPLEPV_FEATURES_LEAF_INDEX 2
#define APPLEPV_LEAF_INDEX_MAX APPLEPV_FEATURES_LEAF_INDEX
#define APPLEPV_SIGNATURE "apple-pv-xnu"
#define APPLEPV_INTERFACE "AH#1"
/*
* Apple Hypercall Feature Vector:
* Values in ECX:EDX returned by the base leaf
*/
#define CPUID_LEAF_FEATURE_COREDUMP _Bit(0)
#define CPUID_LEAF_FEATURE_XNU_DEBUG _Bit(1)
#ifndef ASSEMBLER
#include <stdint.h>
#include <mach/mach_types.h>
#include <kern/kern_types.h>
#include <mach/machine.h>
typedef enum { eax, ebx, ecx, edx } cpuid_register_t;
static inline void
cpuid(uint32_t *data)
{
__asm__ volatile ("cpuid"
: "=a" (data[eax]),
"=b" (data[ebx]),
"=c" (data[ecx]),
"=d" (data[edx])
: "a" (data[eax]),
"b" (data[ebx]),
"c" (data[ecx]),
"d" (data[edx]));
}
static inline void
do_cpuid(uint32_t selector, uint32_t *data)
{
__asm__ volatile ("cpuid"
: "=a" (data[0]),
"=b" (data[1]),
"=c" (data[2]),
"=d" (data[3])
: "a"(selector),
"b" (0),
"c" (0),
"d" (0));
}
/*
* Cache ID descriptor structure, used to parse CPUID leaf 2.
* Note: not used in kernel.
*/
typedef enum { Lnone, L1I, L1D, L2U, L3U, LCACHE_MAX } cache_type_t;
typedef struct {
unsigned char value; /* Descriptor value */
cache_type_t type; /* Cache type */
unsigned int size; /* Cache size */
unsigned int linesize; /* Cache line size */
const char *description; /* Cache description */
} cpuid_cache_desc_t;
#define CACHE_DESC(value, type, size, linesize, text) \
{ value, type, size, linesize, text }
/* Monitor/mwait Leaf: */
typedef struct {
uint32_t linesize_min;
uint32_t linesize_max;
uint32_t extensions;
uint32_t sub_Cstates;
} cpuid_mwait_leaf_t;
/* Thermal and Power Management Leaf: */
typedef struct {
boolean_t sensor;
boolean_t dynamic_acceleration;
boolean_t invariant_APIC_timer;
boolean_t core_power_limits;
boolean_t fine_grain_clock_mod;
boolean_t package_thermal_intr;
uint32_t thresholds;
boolean_t ACNT_MCNT;
boolean_t hardware_feedback;
boolean_t energy_policy;
} cpuid_thermal_leaf_t;
/* XSAVE Feature Leaf: */
typedef struct {
uint32_t extended_state[4]; /* eax .. edx */
} cpuid_xsave_leaf_t;
/* Architectural Performance Monitoring Leaf: */
typedef struct {
uint8_t version;
uint8_t number;
uint8_t width;
uint8_t events_number;
uint32_t events;
uint8_t fixed_number;
uint8_t fixed_width;
} cpuid_arch_perf_leaf_t;
/* The TSC to Core Crystal (RefCLK) Clock Information leaf */
typedef struct {
uint32_t numerator;
uint32_t denominator;
} cpuid_tsc_leaf_t;
/* Physical CPU info - this is exported out of the kernel (kexts), so be wary of changes */
typedef struct i386_cpu_info {
char cpuid_vendor[16];
char cpuid_brand_string[48];
const char *cpuid_model_string;
cpu_type_t cpuid_type; /* this is *not* a cpu_type_t in our <mach/machine.h> */
uint8_t cpuid_family;
uint8_t cpuid_model;
uint8_t cpuid_extmodel;
uint8_t cpuid_extfamily;
uint8_t cpuid_stepping;
uint64_t cpuid_features;
uint64_t cpuid_extfeatures;
uint32_t cpuid_signature;
uint8_t cpuid_brand;
uint8_t cpuid_processor_flag;
uint32_t cache_size[LCACHE_MAX];
uint32_t cache_linesize;
uint8_t cache_info[64]; /* list of cache descriptors */
uint32_t cpuid_cores_per_package;
uint32_t cpuid_logical_per_package;
uint32_t cache_sharing[LCACHE_MAX];
uint32_t cache_partitions[LCACHE_MAX];
cpu_type_t cpuid_cpu_type; /* <mach/machine.h> */
cpu_subtype_t cpuid_cpu_subtype; /* <mach/machine.h> */
/* Per-vendor info */
cpuid_mwait_leaf_t cpuid_mwait_leaf;
#define cpuid_mwait_linesize_max cpuid_mwait_leaf.linesize_max
#define cpuid_mwait_linesize_min cpuid_mwait_leaf.linesize_min
#define cpuid_mwait_extensions cpuid_mwait_leaf.extensions
#define cpuid_mwait_sub_Cstates cpuid_mwait_leaf.sub_Cstates
cpuid_thermal_leaf_t cpuid_thermal_leaf;
cpuid_arch_perf_leaf_t cpuid_arch_perf_leaf;
uint32_t unused[4]; /* cpuid_xsave_leaf */
/* Cache details: */
uint32_t cpuid_cache_linesize;
uint32_t cpuid_cache_L2_associativity;
uint32_t cpuid_cache_size;
/* Virtual and physical address aize: */
uint32_t cpuid_address_bits_physical;
uint32_t cpuid_address_bits_virtual;
uint32_t cpuid_microcode_version;
/* Numbers of tlbs per processor [i|d, small|large, level0|level1] */
uint32_t cpuid_tlb[2][2][2];
#define TLB_INST 0
#define TLB_DATA 1
#define TLB_SMALL 0
#define TLB_LARGE 1
uint32_t cpuid_stlb;
uint32_t core_count;
uint32_t thread_count;
/* Max leaf ids available from CPUID */
uint32_t cpuid_max_basic;
uint32_t cpuid_max_ext;
/* Family-specific info links */
uint32_t cpuid_cpufamily;
cpuid_mwait_leaf_t *cpuid_mwait_leafp;
cpuid_thermal_leaf_t *cpuid_thermal_leafp;
cpuid_arch_perf_leaf_t *cpuid_arch_perf_leafp;
cpuid_xsave_leaf_t *cpuid_xsave_leafp;
uint64_t cpuid_leaf7_features;
uint64_t cpuid_leaf7_extfeatures;
cpuid_tsc_leaf_t cpuid_tsc_leaf;
cpuid_xsave_leaf_t cpuid_xsave_leaf[2];
} i386_cpu_info_t;
#ifdef __cplusplus
extern "C" {
#endif
/*
* External declarations
*/
extern cpu_type_t cpuid_cputype(void);
extern cpu_subtype_t cpuid_cpusubtype(void);
extern void cpuid_cpu_display(const char *);
extern void cpuid_feature_display(const char *);
extern void cpuid_extfeature_display(const char *);
extern char * cpuid_get_feature_names(uint64_t, char *, unsigned);
extern char * cpuid_get_extfeature_names(uint64_t, char *, unsigned);
extern char * cpuid_get_leaf7_feature_names(uint64_t, char *, unsigned);
extern char * cpuid_get_leaf7_extfeature_names(uint64_t, char *, unsigned);
extern uint64_t cpuid_features(void);
extern uint64_t cpuid_extfeatures(void);
extern uint64_t cpuid_leaf7_features(void);
extern uint64_t cpuid_leaf7_extfeatures(void);
extern uint32_t cpuid_family(void);
extern uint32_t cpuid_cpufamily(void);
extern i386_cpu_info_t *cpuid_info(void);
extern void cpuid_set_info(void);
extern boolean_t cpuid_vmm_present(void);
extern uint32_t cpuid_vmm_family(void);
extern uint64_t cpuid_vmm_get_applepv_features(void);
#ifdef __cplusplus
}
#endif
#endif /* ASSEMBLER */
#endif /* __APPLE_API_PRIVATE */
#endif /* _MACHINE_CPUID_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/_types.h | /*
* Copyright (c) 2000-2003 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _BSD_I386__TYPES_H_
#define _BSD_I386__TYPES_H_
#if defined (__i386__) || defined (__x86_64__)
/*
* This header file contains integer types. It's intended to also contain
* flotaing point and other arithmetic types, as needed, later.
*/
#ifdef __GNUC__
typedef __signed char __int8_t;
#else /* !__GNUC__ */
typedef char __int8_t;
#endif /* !__GNUC__ */
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long long __int64_t;
typedef unsigned long long __uint64_t;
typedef long __darwin_intptr_t;
typedef unsigned int __darwin_natural_t;
/*
* The rune type below is declared to be an ``int'' instead of the more natural
* ``unsigned long'' or ``long''. Two things are happening here. It is not
* unsigned so that EOF (-1) can be naturally assigned to it and used. Also,
* it looks like 10646 will be a 31 bit standard. This means that if your
* ints cannot hold 32 bits, you will be in trouble. The reason an int was
* chosen over a long is that the is*() and to*() routines take ints (says
* ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it
* here, you lose a bit of ANSI conformance, but your programs will still
* work.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
* be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
* rune_t must be the same type. Also wint_t must be no narrower than
* wchar_t, and should also be able to hold all members of the largest
* character set plus one extra value (WEOF). wint_t must be at least 16 bits.
*/
typedef int __darwin_ct_rune_t; /* ct_rune_t */
/*
* mbstate_t is an opaque object to keep conversion state, during multibyte
* stream conversions. The content must not be referenced by user programs.
*/
typedef union {
char __mbstate8[128];
long long _mbstateL; /* for alignment */
} __mbstate_t;
typedef __mbstate_t __darwin_mbstate_t; /* mbstate_t */
#if defined(__PTRDIFF_TYPE__)
typedef __PTRDIFF_TYPE__ __darwin_ptrdiff_t; /* ptr1 - ptr2 */
#elif defined(__LP64__)
typedef long __darwin_ptrdiff_t; /* ptr1 - ptr2 */
#else
typedef int __darwin_ptrdiff_t; /* ptr1 - ptr2 */
#endif /* __GNUC__ */
#if defined(__SIZE_TYPE__)
typedef __SIZE_TYPE__ __darwin_size_t; /* sizeof() */
#else
typedef unsigned long __darwin_size_t; /* sizeof() */
#endif
#if (__GNUC__ > 2)
typedef __builtin_va_list __darwin_va_list; /* va_list */
#else
typedef void * __darwin_va_list; /* va_list */
#endif
#if defined(__WCHAR_TYPE__)
typedef __WCHAR_TYPE__ __darwin_wchar_t; /* wchar_t */
#else
typedef __darwin_ct_rune_t __darwin_wchar_t; /* wchar_t */
#endif
typedef __darwin_wchar_t __darwin_rune_t; /* rune_t */
#if defined(__WINT_TYPE__)
typedef __WINT_TYPE__ __darwin_wint_t; /* wint_t */
#else
typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */
#endif
typedef unsigned long __darwin_clock_t; /* clock() */
typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */
typedef long __darwin_ssize_t; /* byte count or error */
typedef long __darwin_time_t; /* time() */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _BSD_I386__TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/locks.h | /*
* Copyright (c) 2004-2012 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _I386_LOCKS_H_
#define _I386_LOCKS_H_
#include <sys/appleapiopts.h>
#include <kern/kern_types.h>
#include <kern/assert.h>
typedef struct __lck_spin_t__ lck_spin_t;
typedef struct __lck_mtx_t__ lck_mtx_t;
typedef struct __lck_mtx_ext_t__ lck_mtx_ext_t;
#endif /* _I386_LOCKS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/machine_routines.h | /*
* Copyright (c) 2000-2019 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
#ifndef _I386_MACHINE_ROUTINES_H_
#define _I386_MACHINE_ROUTINES_H_
#include <mach/mach_types.h>
#include <mach/boolean.h>
#include <kern/kern_types.h>
#include <pexpert/pexpert.h>
#include <sys/cdefs.h>
#include <sys/appleapiopts.h>
#include <stdarg.h>
__BEGIN_DECLS
/* Get Interrupts Enabled */
boolean_t ml_get_interrupts_enabled(void);
/* Set Interrupts Enabled */
boolean_t ml_set_interrupts_enabled(boolean_t enable);
boolean_t ml_early_set_interrupts_enabled(boolean_t enable);
/* Check if running at interrupt context */
boolean_t ml_at_interrupt_context(void);
/* Zero bytes starting at a physical address */
void bzero_phys(
addr64_t phys_address,
uint32_t length);
/* Bytes available on current stack */
vm_offset_t ml_stack_remaining(void);
__END_DECLS
#endif /* _I386_MACHINE_ROUTINES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/param.h | /*
* Copyright (c) 2000-2010 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)param.h 8.1 (Berkeley) 4/4/95
*/
/*
* Machine dependent constants for Intel 386.
*/
#ifndef _I386_PARAM_H_
#define _I386_PARAM_H_
#if defined (__i386__) || defined (__x86_64__)
#include <i386/_param.h>
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
* data types (int, long, ...). The result is unsigned int and must be
* cast to any desired pointer type.
*/
#define ALIGNBYTES __DARWIN_ALIGNBYTES
#define ALIGN(p) __DARWIN_ALIGN(p)
#define NBPG 4096 /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define PGSHIFT 12 /* LOG2(NBPG) */
#define DEV_BSIZE 512
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define BLKDEV_IOSIZE 2048
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
#define CLSIZE 1
#define CLSIZELOG2 0
/*
* Constants related to network buffer management.
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
* on machines that exchange pages of input or output buffers with mbuf
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
* of the hardware page size.
*/
#define MSIZESHIFT 8 /* 256 */
#define MSIZE (1 << MSIZESHIFT) /* size of an mbuf */
#define MCLSHIFT 11 /* 2048 */
#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
#define MBIGCLSHIFT 12 /* 4096 */
#define MBIGCLBYTES (1 << MBIGCLSHIFT) /* size of a big cluster */
#define M16KCLSHIFT 14 /* 16384 */
#define M16KCLBYTES (1 << M16KCLSHIFT) /* size of a jumbo cluster */
#define MCLOFSET (MCLBYTES - 1)
#ifndef NMBCLUSTERS
#define NMBCLUSTERS ((1024 * 1024) / MCLBYTES) /* cl map size: 1MB */
#endif
/*
* Some macros for units conversion
*/
/* Core clicks (NeXT_page_size bytes) to segments and vice versa */
#define ctos(x) (x)
#define stoc(x) (x)
/* Core clicks (4096 bytes) to disk blocks */
#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT))
#define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT))
#define dtob(x) ((x)<<DEV_BSHIFT)
/* clicks to bytes */
#define ctob(x) ((x)<<PGSHIFT)
/* bytes to clicks */
#define btoc(x) (((unsigned)(x)+(NBPG-1))>>PGSHIFT)
#ifdef __APPLE__
#define btodb(bytes, devBlockSize) \
((unsigned)(bytes) / devBlockSize)
#define dbtob(db, devBlockSize) \
((unsigned)(db) * devBlockSize)
#else
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
((unsigned)(bytes) >> DEV_BSHIFT)
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
((unsigned)(db) << DEV_BSHIFT)
#endif
/*
* Map a ``block device block'' to a file system block.
* This should be device dependent, and will be if we
* add an entry to cdevsw/bdevsw for that purpose.
* For now though just use DEV_BSIZE.
*/
#define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE))
/*
* Macros to decode (and encode) processor status word.
*/
#define STATUS_WORD(rpl, ipl) (((ipl) << 8) | (rpl))
#define USERMODE(x) (((x) & 3) == 3)
#define BASEPRI(x) (((x) & (255 << 8)) == 0)
#define DELAY(n) delay(n)
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386_PARAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/profile.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* Copyright (c) 1997, Apple Computer, Inc. All rights reserved.
*
*/
#ifndef _BSD_I386_PROFILE_H_
#define _BSD_I386_PROFILE_H_
#if defined (__i386__) || defined (__x86_64__)
#include <sys/appleapiopts.h>
#ifdef __APPLE_API_UNSTABLE
/*
* Block interrupts during mcount so that those interrupts can also be
* counted (as soon as we get done with the current counting). On the
* i386 platfom, can't do splhigh/splx as those are C routines and can
* recursively invoke mcount.
*/
#warning MCOUNT_* not implemented yet.
#define MCOUNT_INIT
#define MCOUNT_ENTER /* s = splhigh(); */ /* XXX TODO */
#define MCOUNT_EXIT /* (void) splx(s); */ /* XXX TODO */
#endif /* __APPLE_API_UNSTABLE */
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _BSD_I386_PROFILE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/i386/_param.h | /*
* Copyright (c) 2008 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _I386__PARAM_H_
#define _I386__PARAM_H_
#if defined (__i386__) || defined (__x86_64__)
#include <i386/_types.h>
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
* data types (int, long, ...). The result is unsigned int and must be
* cast to any desired pointer type.
*/
#define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1)
#define __DARWIN_ALIGN(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES)
#define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1)
#define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32)
#endif /* defined (__i386__) || defined (__x86_64__) */
#endif /* _I386__PARAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_special_ports.h | /*
* Copyright (c) 2003 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/host_special_ports.h
*
* Defines codes for access to host-wide special ports.
*/
#ifndef _MACH_HOST_SPECIAL_PORTS_H_
#define _MACH_HOST_SPECIAL_PORTS_H_
/*
* Cannot be set or gotten from user space
*/
#define HOST_SECURITY_PORT 0
#define HOST_MIN_SPECIAL_PORT HOST_SECURITY_PORT
/*
* Always provided by kernel (cannot be set from user-space).
*/
#define HOST_PORT 1
#define HOST_PRIV_PORT 2
#define HOST_IO_MASTER_PORT 3
#define HOST_MAX_SPECIAL_KERNEL_PORT 7 /* room to grow */
#define HOST_LAST_SPECIAL_KERNEL_PORT HOST_IO_MASTER_PORT
/*
* Not provided by kernel
*/
#define HOST_DYNAMIC_PAGER_PORT (1 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_AUDIT_CONTROL_PORT (2 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_USER_NOTIFICATION_PORT (3 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_AUTOMOUNTD_PORT (4 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_LOCKD_PORT (5 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_KTRACE_BACKGROUND_PORT (6 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_SEATBELT_PORT (7 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_KEXTD_PORT (8 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_LAUNCHCTL_PORT (9 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_UNFREED_PORT (10 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_AMFID_PORT (11 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_GSSD_PORT (12 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_TELEMETRY_PORT (13 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_ATM_NOTIFICATION_PORT (14 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_COALITION_PORT (15 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_SYSDIAGNOSE_PORT (16 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_XPC_EXCEPTION_PORT (17 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_CONTAINERD_PORT (18 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_NODE_PORT (19 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_RESOURCE_NOTIFY_PORT (20 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_CLOSURED_PORT (21 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_SYSPOLICYD_PORT (22 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_FILECOORDINATIOND_PORT (23 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_FAIRPLAYD_PORT (24 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_IOCOMPRESSIONSTATS_PORT (25 + HOST_MAX_SPECIAL_KERNEL_PORT)
#define HOST_MAX_SPECIAL_PORT HOST_IOCOMPRESSIONSTATS_PORT
/* MAX = last since rdar://59872249 */
/* obsolete name */
#define HOST_CHUD_PORT HOST_LAUNCHCTL_PORT
/*
* Special node identifier to always represent the local node.
*/
#define HOST_LOCAL_NODE -1
/*
* Definitions for ease of use.
*
* In the get call, the host parameter can be any host, but will generally
* be the local node host port. In the set call, the host must the per-node
* host port for the node being affected.
*/
#define host_get_host_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_PORT, (port)))
#define host_set_host_port(host, port) (KERN_INVALID_ARGUMENT)
#define host_get_host_priv_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_PRIV_PORT, (port)))
#define host_set_host_priv_port(host, port) (KERN_INVALID_ARGUMENT)
#define host_get_io_master_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_IO_MASTER_PORT, (port)))
#define host_set_io_master_port(host, port) (KERN_INVALID_ARGUMENT)
/*
* User-settable special ports.
*/
#define host_get_dynamic_pager_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_DYNAMIC_PAGER_PORT, (port)))
#define host_set_dynamic_pager_port(host, port) \
(host_set_special_port((host), HOST_DYNAMIC_PAGER_PORT, (port)))
#define host_get_audit_control_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_AUDIT_CONTROL_PORT, (port)))
#define host_set_audit_control_port(host, port) \
(host_set_special_port((host), HOST_AUDIT_CONTROL_PORT, (port)))
#define host_get_user_notification_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_USER_NOTIFICATION_PORT, (port)))
#define host_set_user_notification_port(host, port) \
(host_set_special_port((host), HOST_USER_NOTIFICATION_PORT, (port)))
#define host_get_automountd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_AUTOMOUNTD_PORT, (port)))
#define host_set_automountd_port(host, port) \
(host_set_special_port((host), HOST_AUTOMOUNTD_PORT, (port)))
#define host_get_lockd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_LOCKD_PORT, (port)))
#define host_set_lockd_port(host, port) \
(host_set_special_port((host), HOST_LOCKD_PORT, (port)))
#define host_get_ktrace_background_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_KTRACE_BACKGROUND_PORT, (port)))
#define host_set_ktrace_background_port(host, port) \
(host_set_special_port((host), HOST_KTRACE_BACKGROUND_PORT, (port)))
#define host_get_kextd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_KEXTD_PORT, (port)))
#define host_set_kextd_port(host, port) \
(host_set_special_port((host), HOST_KEXTD_PORT, (port)))
#define host_get_launchctl_port(host, port) \
(host_get_special_port((host), HOST_LOCAL_NODE, HOST_LAUNCHCTL_PORT, \
(port)))
#define host_set_launchctl_port(host, port) \
(host_set_special_port((host), HOST_LAUNCHCTL_PORT, (port)))
#define host_get_chud_port(host, port) host_get_launchctl_port(host, port)
#define host_set_chud_port(host, port) host_set_launchctl_port(host, port)
#define host_get_unfreed_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_UNFREED_PORT, (port)))
#define host_set_unfreed_port(host, port) \
(host_set_special_port((host), HOST_UNFREED_PORT, (port)))
#define host_get_amfid_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_AMFID_PORT, (port)))
#define host_set_amfid_port(host, port) \
(host_set_special_port((host), HOST_AMFID_PORT, (port)))
#define host_get_gssd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_GSSD_PORT, (port)))
#define host_set_gssd_port(host, port) \
(host_set_special_port((host), HOST_GSSD_PORT, (port)))
#define host_get_telemetry_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_TELEMETRY_PORT, (port)))
#define host_set_telemetry_port(host, port) \
(host_set_special_port((host), HOST_TELEMETRY_PORT, (port)))
#define host_get_atm_notification_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_ATM_NOTIFICATION_PORT, (port)))
#define host_set_atm_notification_port(host, port) \
(host_set_special_port((host), HOST_ATM_NOTIFICATION_PORT, (port)))
#define host_get_coalition_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_COALITION_PORT, (port)))
#define host_set_coalition_port(host, port) \
(host_set_special_port((host), HOST_COALITION_PORT, (port)))
#define host_get_sysdiagnose_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_SYSDIAGNOSE_PORT, (port)))
#define host_set_sysdiagnose_port(host, port) \
(host_set_special_port((host), HOST_SYSDIAGNOSE_PORT, (port)))
#define host_get_container_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_CONTAINERD_PORT, (port)))
#define host_set_container_port(host, port) \
(host_set_special_port((host), HOST_CONTAINERD_PORT, (port)))
#define host_get_node_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_NODE_PORT, (port)))
#define host_set_node_port(host, port) \
(host_set_special_port((host), HOST_NODE_PORT, (port)))
#define host_get_closured_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_CLOSURED_PORT, (port)))
#define host_set_closured_port(host, port) \
(host_set_special_port((host), HOST_CLOSURED_PORT, (port)))
#define host_get_syspolicyd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_SYSPOLICYD_PORT, (port)))
#define host_set_syspolicyd_port(host, port) \
(host_set_special_port((host), HOST_SYSPOLICYD_PORT, (port)))
#define host_get_filecoordinationd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_FILECOORDINATIOND_PORT, (port)))
#define host_set_filecoordinationd_port(host, port) \
(host_set_special_port((host), HOST_FILECOORDINATIOND_PORT, (port)))
#define host_get_fairplayd_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_FAIRPLAYD_PORT, (port)))
#define host_set_fairplayd_port(host, port) \
(host_set_special_port((host), HOST_FAIRPLAYD_PORT, (port)))
#define host_get_iocompressionstats_port(host, port) \
(host_get_special_port((host), \
HOST_LOCAL_NODE, HOST_IOCOMPRESSIONSTATS_PORT, (port)))
#define host_set_iocompressionstats_port(host, port) \
(host_set_special_port((host), HOST_IOCOMPRESSIONSTATS_PORT, (port)))
/* HOST_RESOURCE_NOTIFY_PORT doesn't #defines these conveniences.
* All lookups go through send_resource_violation()
*/
#endif /* _MACH_HOST_SPECIAL_PORTS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/audit_triggers_server.h | #ifndef _audit_triggers_server_
#define _audit_triggers_server_
/* Module audit_triggers */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef audit_triggers_MSG_COUNT
#define audit_triggers_MSG_COUNT 2
#endif /* audit_triggers_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach/audit_triggers_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine audit_triggers */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t audit_triggers
(
mach_port_t audit_port,
int flags
);
/* SimpleRoutine audit_analytics */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t audit_analytics
(
mach_port_t audit_port,
string_t caller_id,
string_t caller_name
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t audit_triggers_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t audit_triggers_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct audit_triggers_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[2];
} audit_triggers_subsystem;
/* typedefs for all requests */
#ifndef __Request__audit_triggers_subsystem__defined
#define __Request__audit_triggers_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int flags;
} __Request__audit_triggers_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t caller_idOffset; /* MiG doesn't use it */
mach_msg_type_number_t caller_idCnt;
char caller_id[1024];
mach_msg_type_number_t caller_nameOffset; /* MiG doesn't use it */
mach_msg_type_number_t caller_nameCnt;
char caller_name[1024];
} __Request__audit_analytics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__audit_triggers_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__audit_triggers_subsystem__defined
#define __RequestUnion__audit_triggers_subsystem__defined
union __RequestUnion__audit_triggers_subsystem {
__Request__audit_triggers_t Request_audit_triggers;
__Request__audit_analytics_t Request_audit_analytics;
};
#endif /* __RequestUnion__audit_triggers_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__audit_triggers_subsystem__defined
#define __Reply__audit_triggers_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__audit_triggers_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__audit_analytics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__audit_triggers_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__audit_triggers_subsystem__defined
#define __ReplyUnion__audit_triggers_subsystem__defined
union __ReplyUnion__audit_triggers_subsystem {
__Reply__audit_triggers_t Reply_audit_triggers;
__Reply__audit_analytics_t Reply_audit_analytics;
};
#endif /* __ReplyUnion__audit_triggers_subsystem__defined */
#ifndef subsystem_to_name_map_audit_triggers
#define subsystem_to_name_map_audit_triggers \
{ "audit_triggers", 123 },\
{ "audit_analytics", 124 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _audit_triggers_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_voucher.h | #ifndef _mach_voucher_user_
#define _mach_voucher_user_
/* Module mach_voucher */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_voucher_MSG_COUNT
#define mach_voucher_MSG_COUNT 5
#endif /* mach_voucher_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine mach_voucher_extract_attr_content */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_extract_attr_content
(
ipc_voucher_t voucher,
mach_voucher_attr_key_t key,
mach_voucher_attr_content_t content,
mach_msg_type_number_t *contentCnt
);
/* Routine mach_voucher_extract_attr_recipe */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_extract_attr_recipe
(
ipc_voucher_t voucher,
mach_voucher_attr_key_t key,
mach_voucher_attr_raw_recipe_t recipe,
mach_msg_type_number_t *recipeCnt
);
/* Routine mach_voucher_extract_all_attr_recipes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_extract_all_attr_recipes
(
ipc_voucher_t voucher,
mach_voucher_attr_raw_recipe_array_t recipes,
mach_msg_type_number_t *recipesCnt
);
/* Routine mach_voucher_attr_command */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_attr_command
(
ipc_voucher_t voucher,
mach_voucher_attr_key_t key,
mach_voucher_attr_command_t command,
mach_voucher_attr_content_t in_content,
mach_msg_type_number_t in_contentCnt,
mach_voucher_attr_content_t out_content,
mach_msg_type_number_t *out_contentCnt
);
/* Routine mach_voucher_debug_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_debug_info
(
ipc_space_read_t task,
mach_port_name_t voucher_name,
mach_voucher_attr_raw_recipe_array_t recipes,
mach_msg_type_number_t *recipesCnt
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__mach_voucher_subsystem__defined
#define __Request__mach_voucher_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_voucher_attr_key_t key;
mach_msg_type_number_t contentCnt;
} __Request__mach_voucher_extract_attr_content_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_voucher_attr_key_t key;
mach_msg_type_number_t recipeCnt;
} __Request__mach_voucher_extract_attr_recipe_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t recipesCnt;
} __Request__mach_voucher_extract_all_attr_recipes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_voucher_attr_key_t key;
mach_voucher_attr_command_t command;
mach_msg_type_number_t in_contentCnt;
uint8_t in_content[4096];
mach_msg_type_number_t out_contentCnt;
} __Request__mach_voucher_attr_command_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t voucher_name;
mach_msg_type_number_t recipesCnt;
} __Request__mach_voucher_debug_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_voucher_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__mach_voucher_subsystem__defined
#define __RequestUnion__mach_voucher_subsystem__defined
union __RequestUnion__mach_voucher_subsystem {
__Request__mach_voucher_extract_attr_content_t Request_mach_voucher_extract_attr_content;
__Request__mach_voucher_extract_attr_recipe_t Request_mach_voucher_extract_attr_recipe;
__Request__mach_voucher_extract_all_attr_recipes_t Request_mach_voucher_extract_all_attr_recipes;
__Request__mach_voucher_attr_command_t Request_mach_voucher_attr_command;
__Request__mach_voucher_debug_info_t Request_mach_voucher_debug_info;
};
#endif /* !__RequestUnion__mach_voucher_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_voucher_subsystem__defined
#define __Reply__mach_voucher_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t contentCnt;
uint8_t content[4096];
} __Reply__mach_voucher_extract_attr_content_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t recipeCnt;
uint8_t recipe[4096];
} __Reply__mach_voucher_extract_attr_recipe_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t recipesCnt;
uint8_t recipes[5120];
} __Reply__mach_voucher_extract_all_attr_recipes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t out_contentCnt;
uint8_t out_content[4096];
} __Reply__mach_voucher_attr_command_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t recipesCnt;
uint8_t recipes[5120];
} __Reply__mach_voucher_debug_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_voucher_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__mach_voucher_subsystem__defined
#define __ReplyUnion__mach_voucher_subsystem__defined
union __ReplyUnion__mach_voucher_subsystem {
__Reply__mach_voucher_extract_attr_content_t Reply_mach_voucher_extract_attr_content;
__Reply__mach_voucher_extract_attr_recipe_t Reply_mach_voucher_extract_attr_recipe;
__Reply__mach_voucher_extract_all_attr_recipes_t Reply_mach_voucher_extract_all_attr_recipes;
__Reply__mach_voucher_attr_command_t Reply_mach_voucher_attr_command;
__Reply__mach_voucher_debug_info_t Reply_mach_voucher_debug_info;
};
#endif /* !__RequestUnion__mach_voucher_subsystem__defined */
#ifndef subsystem_to_name_map_mach_voucher
#define subsystem_to_name_map_mach_voucher \
{ "mach_voucher_extract_attr_content", 5400 },\
{ "mach_voucher_extract_attr_recipe", 5401 },\
{ "mach_voucher_extract_all_attr_recipes", 5402 },\
{ "mach_voucher_attr_command", 5403 },\
{ "mach_voucher_debug_info", 5404 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _mach_voucher_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/exc_server.h | #ifndef _exc_server_
#define _exc_server_
/* Module exc */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef exc_MSG_COUNT
#define exc_MSG_COUNT 3
#endif /* exc_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* Routine exception_raise */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_exception_raise
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt
);
/* Routine exception_raise_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_exception_raise_state
(
mach_port_t exception_port,
exception_type_t exception,
const exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
const thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
);
/* Routine exception_raise_state_identity */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_exception_raise_state_identity
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t exc_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t exc_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct catch_exc_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[3];
} catch_exc_subsystem;
/* typedefs for all requests */
#ifndef __Request__exc_subsystem__defined
#define __Request__exc_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
} __Request__exception_raise_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Request__exception_raise_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
integer_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Request__exception_raise_state_identity_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__exc_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__catch_exc_subsystem__defined
#define __RequestUnion__catch_exc_subsystem__defined
union __RequestUnion__catch_exc_subsystem {
__Request__exception_raise_t Request_exception_raise;
__Request__exception_raise_state_t Request_exception_raise_state;
__Request__exception_raise_state_identity_t Request_exception_raise_state_identity;
};
#endif /* __RequestUnion__catch_exc_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__exc_subsystem__defined
#define __Reply__exc_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__exception_raise_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Reply__exception_raise_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Reply__exception_raise_state_identity_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__exc_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__catch_exc_subsystem__defined
#define __ReplyUnion__catch_exc_subsystem__defined
union __ReplyUnion__catch_exc_subsystem {
__Reply__exception_raise_t Reply_exception_raise;
__Reply__exception_raise_state_t Reply_exception_raise_state;
__Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity;
};
#endif /* __ReplyUnion__catch_exc_subsystem__defined */
#ifndef subsystem_to_name_map_exc
#define subsystem_to_name_map_exc \
{ "exception_raise", 2401 },\
{ "exception_raise_state", 2402 },\
{ "exception_raise_state_identity", 2403 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _exc_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/error.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/error.h
* Purpose:
* error module definitions
*
*/
#ifndef _MACH_ERROR_H_
#define _MACH_ERROR_H_
#include <mach/kern_return.h>
/*
* error number layout as follows:
*
* hi lo
* | system(6) | subsystem(12) | code(14) |
*/
#define err_none (mach_error_t)0
#define ERR_SUCCESS (mach_error_t)0
#define ERR_ROUTINE_NIL (mach_error_fn_t)0
#define err_system(x) ((signed)((((unsigned)(x))&0x3f)<<26))
#define err_sub(x) (((x)&0xfff)<<14)
#define err_get_system(err) (((err)>>26)&0x3f)
#define err_get_sub(err) (((err)>>14)&0xfff)
#define err_get_code(err) ((err)&0x3fff)
#define system_emask (err_system(0x3f))
#define sub_emask (err_sub(0xfff))
#define code_emask (0x3fff)
/* major error systems */
#define err_kern err_system(0x0) /* kernel */
#define err_us err_system(0x1) /* user space library */
#define err_server err_system(0x2) /* user space servers */
#define err_ipc err_system(0x3) /* old ipc errors */
#define err_mach_ipc err_system(0x4) /* mach-ipc errors */
#define err_dipc err_system(0x7) /* distributed ipc */
#define err_local err_system(0x3e) /* user defined errors */
#define err_ipc_compat err_system(0x3f) /* (compatibility) mach-ipc errors */
#define err_max_system 0x3f
/* unix errors get lumped into one subsystem */
#define unix_err(errno) (err_kern|err_sub(3)|errno)
typedef kern_return_t mach_error_t;
typedef mach_error_t (* mach_error_fn_t)( void );
#endif /* _MACH_ERROR_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_voucher_attr_control.h | #ifndef _mach_voucher_attr_control_user_
#define _mach_voucher_attr_control_user_
/* Module mach_voucher_attr_control */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_voucher_attr_control_MSG_COUNT
#define mach_voucher_attr_control_MSG_COUNT 2
#endif /* mach_voucher_attr_control_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine mach_voucher_attr_control_get_values */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_attr_control_get_values
(
ipc_voucher_attr_control_t control,
ipc_voucher_t voucher,
mach_voucher_attr_value_handle_array_t value_handles,
mach_msg_type_number_t *value_handlesCnt
);
/* Routine mach_voucher_attr_control_create_mach_voucher */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_voucher_attr_control_create_mach_voucher
(
ipc_voucher_attr_control_t control,
mach_voucher_attr_raw_recipe_array_t recipes,
mach_msg_type_number_t recipesCnt,
ipc_voucher_t *voucher
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__mach_voucher_attr_control_subsystem__defined
#define __Request__mach_voucher_attr_control_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t voucher;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t value_handlesCnt;
} __Request__mach_voucher_attr_control_get_values_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t recipesCnt;
uint8_t recipes[5120];
} __Request__mach_voucher_attr_control_create_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_voucher_attr_control_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__mach_voucher_attr_control_subsystem__defined
#define __RequestUnion__mach_voucher_attr_control_subsystem__defined
union __RequestUnion__mach_voucher_attr_control_subsystem {
__Request__mach_voucher_attr_control_get_values_t Request_mach_voucher_attr_control_get_values;
__Request__mach_voucher_attr_control_create_mach_voucher_t Request_mach_voucher_attr_control_create_mach_voucher;
};
#endif /* !__RequestUnion__mach_voucher_attr_control_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_voucher_attr_control_subsystem__defined
#define __Reply__mach_voucher_attr_control_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t value_handlesCnt;
mach_voucher_attr_value_handle_t value_handles[4];
} __Reply__mach_voucher_attr_control_get_values_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t voucher;
/* end of the kernel processed data */
} __Reply__mach_voucher_attr_control_create_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_voucher_attr_control_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__mach_voucher_attr_control_subsystem__defined
#define __ReplyUnion__mach_voucher_attr_control_subsystem__defined
union __ReplyUnion__mach_voucher_attr_control_subsystem {
__Reply__mach_voucher_attr_control_get_values_t Reply_mach_voucher_attr_control_get_values;
__Reply__mach_voucher_attr_control_create_mach_voucher_t Reply_mach_voucher_attr_control_create_mach_voucher;
};
#endif /* !__RequestUnion__mach_voucher_attr_control_subsystem__defined */
#ifndef subsystem_to_name_map_mach_voucher_attr_control
#define subsystem_to_name_map_mach_voucher_attr_control \
{ "mach_voucher_attr_control_get_values", 5600 },\
{ "mach_voucher_attr_control_create_mach_voucher", 5601 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _mach_voucher_attr_control_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/machine.h | /*
* Copyright (c) 2007-2016 Apple, Inc. All rights reserved.
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/* File: machine.h
* Author: Avadis Tevanian, Jr.
* Date: 1986
*
* Machine independent machine abstraction.
*/
#ifndef _MACH_MACHINE_H_
#define _MACH_MACHINE_H_
#ifndef __ASSEMBLER__
#include <stdint.h>
#include <mach/machine/vm_types.h>
#include <mach/boolean.h>
typedef integer_t cpu_type_t;
typedef integer_t cpu_subtype_t;
typedef integer_t cpu_threadtype_t;
#define CPU_STATE_MAX 4
#define CPU_STATE_USER 0
#define CPU_STATE_SYSTEM 1
#define CPU_STATE_IDLE 2
#define CPU_STATE_NICE 3
/*
* Capability bits used in the definition of cpu_type.
*/
#define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */
#define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */
#define CPU_ARCH_ABI64_32 0x02000000 /* ABI for 64-bit hardware with 32-bit types; LP32 */
/*
* Machine types known by all.
*/
#define CPU_TYPE_ANY ((cpu_type_t) -1)
#define CPU_TYPE_VAX ((cpu_type_t) 1)
/* skip ((cpu_type_t) 2) */
/* skip ((cpu_type_t) 3) */
/* skip ((cpu_type_t) 4) */
/* skip ((cpu_type_t) 5) */
#define CPU_TYPE_MC680x0 ((cpu_type_t) 6)
#define CPU_TYPE_X86 ((cpu_type_t) 7)
#define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */
#define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64)
/* skip CPU_TYPE_MIPS ((cpu_type_t) 8) */
/* skip ((cpu_type_t) 9) */
#define CPU_TYPE_MC98000 ((cpu_type_t) 10)
#define CPU_TYPE_HPPA ((cpu_type_t) 11)
#define CPU_TYPE_ARM ((cpu_type_t) 12)
#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64)
#define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32)
#define CPU_TYPE_MC88000 ((cpu_type_t) 13)
#define CPU_TYPE_SPARC ((cpu_type_t) 14)
#define CPU_TYPE_I860 ((cpu_type_t) 15)
/* skip CPU_TYPE_ALPHA ((cpu_type_t) 16) */
/* skip ((cpu_type_t) 17) */
#define CPU_TYPE_POWERPC ((cpu_type_t) 18)
#define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64)
/* skip ((cpu_type_t) 19) */
/* skip ((cpu_type_t) 20 */
/* skip ((cpu_type_t) 21 */
/* skip ((cpu_type_t) 22 */
/*
* Machine subtypes (these are defined here, instead of in a machine
* dependent directory, so that any program can get all definitions
* regardless of where is it compiled).
*/
/*
* Capability bits used in the definition of cpu_subtype.
*/
#define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */
#define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */
#define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */
/*
* When selecting a slice, ANY will pick the slice with the best
* grading for the selected cpu_type_t, unlike the "ALL" subtypes,
* which are the slices that can run on any hardware for that cpu type.
*/
#define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1)
/*
* Object files that are hand-crafted to run on any
* implementation of an architecture are tagged with
* CPU_SUBTYPE_MULTIPLE. This functions essentially the same as
* the "ALL" subtype of an architecture except that it allows us
* to easily find object files that may need to be modified
* whenever a new implementation of an architecture comes out.
*
* It is the responsibility of the implementor to make sure the
* software handles unsupported implementations elegantly.
*/
#define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1)
#define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1)
/*
* Machine threadtypes.
* This is none - not defined - for most machine types/subtypes.
*/
#define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0)
/*
* VAX subtypes (these do *not* necessary conform to the actual cpu
* ID assigned by DEC available via the SID register).
*/
#define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2)
#define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3)
#define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4)
#define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5)
#define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6)
#define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7)
#define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8)
#define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9)
#define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10)
#define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11)
#define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12)
/*
* 680x0 subtypes
*
* The subtype definitions here are unusual for historical reasons.
* NeXT used to consider 68030 code as generic 68000 code. For
* backwards compatability:
*
* CPU_SUBTYPE_MC68030 symbol has been preserved for source code
* compatability.
*
* CPU_SUBTYPE_MC680x0_ALL has been defined to be the same
* subtype as CPU_SUBTYPE_MC68030 for binary comatability.
*
* CPU_SUBTYPE_MC68030_ONLY has been added to allow new object
* files to be tagged as containing 68030-specific instructions.
*/
#define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */
#define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2)
#define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3)
/*
* I386 subtypes
*/
#define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4))
#define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0)
#define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0)
#define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0)
#define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128
#define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0)
#define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0)
#define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1)
#define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3)
#define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5)
#define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6)
#define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7)
#define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0)
#define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1)
#define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2)
#define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0)
#define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0)
#define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1)
#define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0)
#define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1)
#define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0)
#define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1)
#define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15)
#define CPU_SUBTYPE_INTEL_FAMILY_MAX 15
#define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4)
#define CPU_SUBTYPE_INTEL_MODEL_ALL 0
/*
* X86 subtypes.
*/
#define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3)
#define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3)
#define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4)
#define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8) /* Haswell feature subset */
#define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1)
/*
* Mips subtypes.
*/
#define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2)
#define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3)
#define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */
#define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5)
#define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */
#define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7)
/*
* MC98000 (PowerPC) subtypes
*/
#define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1)
/*
* HPPA subtypes for Hewlett-Packard HP-PA family of
* risc processors. Port by NeXT to 700 series.
*/
#define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */
#define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1)
/*
* MC88000 subtypes.
*/
#define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2)
/*
* SPARC subtypes
*/
#define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0)
/*
* I860 subtypes
*/
#define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1)
/*
* PowerPC subtypes
*/
#define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2)
#define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3)
#define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4)
#define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5)
#define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6)
#define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7)
#define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8)
#define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9)
#define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10)
#define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11)
#define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100)
/*
* ARM subtypes
*/
#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5)
#define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6)
#define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7)
#define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8)
#define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) /* ARMv7-A and ARMv7-R */
#define CPU_SUBTYPE_ARM_V7F ((cpu_subtype_t) 10) /* Cortex A9 */
#define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */
#define CPU_SUBTYPE_ARM_V7K ((cpu_subtype_t) 12)
#define CPU_SUBTYPE_ARM_V8 ((cpu_subtype_t) 13)
#define CPU_SUBTYPE_ARM_V6M ((cpu_subtype_t) 14) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V7M ((cpu_subtype_t) 15) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V7EM ((cpu_subtype_t) 16) /* Not meant to be run under xnu */
#define CPU_SUBTYPE_ARM_V8M ((cpu_subtype_t) 17) /* Not meant to be run under xnu */
/*
* ARM64 subtypes
*/
#define CPU_SUBTYPE_ARM64_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_ARM64_V8 ((cpu_subtype_t) 1)
#define CPU_SUBTYPE_ARM64E ((cpu_subtype_t) 2)
/* CPU subtype feature flags for ptrauth on arm64e platforms */
#define CPU_SUBTYPE_ARM64_PTR_AUTH_MASK 0x0f000000
#define CPU_SUBTYPE_ARM64_PTR_AUTH_VERSION(x) (((x) & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) >> 24)
/*
* ARM64_32 subtypes
*/
#define CPU_SUBTYPE_ARM64_32_ALL ((cpu_subtype_t) 0)
#define CPU_SUBTYPE_ARM64_32_V8 ((cpu_subtype_t) 1)
#endif /* !__ASSEMBLER__ */
/*
* CPU families (sysctl hw.cpufamily)
*
* These are meant to identify the CPU's marketing name - an
* application can map these to (possibly) localized strings.
* NB: the encodings of the CPU families are intentionally arbitrary.
* There is no ordering, and you should never try to deduce whether
* or not some feature is available based on the family.
* Use feature flags (eg, hw.optional.altivec) to test for optional
* functionality.
*/
#define CPUFAMILY_UNKNOWN 0
#define CPUFAMILY_POWERPC_G3 0xcee41549
#define CPUFAMILY_POWERPC_G4 0x77c184ae
#define CPUFAMILY_POWERPC_G5 0xed76d8aa
#define CPUFAMILY_INTEL_6_13 0xaa33392b
#define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc
#define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2
#define CPUFAMILY_INTEL_WESTMERE 0x573b5eec
#define CPUFAMILY_INTEL_SANDYBRIDGE 0x5490b78c
#define CPUFAMILY_INTEL_IVYBRIDGE 0x1f65e835
#define CPUFAMILY_INTEL_HASWELL 0x10b282dc
#define CPUFAMILY_INTEL_BROADWELL 0x582ed09c
#define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f
#define CPUFAMILY_INTEL_KABYLAKE 0x0f817246
#define CPUFAMILY_INTEL_ICELAKE 0x38435547
#define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e
#define CPUFAMILY_ARM_9 0xe73283ae
#define CPUFAMILY_ARM_11 0x8ff620d8
#define CPUFAMILY_ARM_XSCALE 0x53b005f5
#define CPUFAMILY_ARM_12 0xbd1b0ae9
#define CPUFAMILY_ARM_13 0x0cc90e64
#define CPUFAMILY_ARM_14 0x96077ef1
#define CPUFAMILY_ARM_15 0xa8511bca
#define CPUFAMILY_ARM_SWIFT 0x1e2d6381
#define CPUFAMILY_ARM_CYCLONE 0x37a09642
#define CPUFAMILY_ARM_TYPHOON 0x2c91a47e
#define CPUFAMILY_ARM_TWISTER 0x92fb37c8
#define CPUFAMILY_ARM_HURRICANE 0x67ceee93
#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6
#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f
#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2
#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3
#define CPUFAMILY_ARM_BLIZZARD_AVALANCHE 0xda33d83d
#define CPUSUBFAMILY_UNKNOWN 0
#define CPUSUBFAMILY_ARM_HP 1
#define CPUSUBFAMILY_ARM_HG 2
#define CPUSUBFAMILY_ARM_M 3
#define CPUSUBFAMILY_ARM_HS 4
#define CPUSUBFAMILY_ARM_HC_HD 5
/* The following synonyms are deprecated: */
#define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN
#define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM
#endif /* _MACH_MACHINE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_purgable.h | /*
* Copyright (c) 2003-2007 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* Virtual memory map purgeable object definitions.
* Objects that will be needed in the future (forward cached objects) should be queued LIFO.
* Objects that have been used and are cached for reuse (backward cached) should be queued FIFO.
* Every user of purgeable memory is entitled to using the highest volatile group (7).
* Only if a client wants some of its objects to definitely be purged earlier, it can put those in
* another group. This could be used to make all FIFO objects (in the lower group) go away before
* any LIFO objects (in the higher group) go away.
* Objects that should not get any chance to stay around can be marked as "obsolete". They will
* be emptied before any other objects or pages are reclaimed. Obsolete objects are not emptied
* in any particular order.
* 'purgeable' is recognized as the correct spelling. For historical reasons, definitions
* in this file are spelled 'purgable'.
*/
#ifndef _MACH_VM_PURGABLE_H_
#define _MACH_VM_PURGABLE_H_
/*
* Types defined:
*
* vm_purgable_t purgeable object control codes.
*/
typedef int vm_purgable_t;
/*
* Enumeration of valid values for vm_purgable_t.
*/
#define VM_PURGABLE_SET_STATE ((vm_purgable_t) 0) /* set state of purgeable object */
#define VM_PURGABLE_GET_STATE ((vm_purgable_t) 1) /* get state of purgeable object */
#define VM_PURGABLE_PURGE_ALL ((vm_purgable_t) 2) /* purge all volatile objects now */
#define VM_PURGABLE_SET_STATE_FROM_KERNEL ((vm_purgable_t) 3) /* set state from kernel */
/*
* Purgeable state:
*
* 31 15 14 13 12 11 10 8 7 6 5 4 3 2 1 0
* +-----+--+-----+--+----+-+-+---+---+---+
* | |NA|DEBUG| | GRP| |B|ORD| |STA|
* +-----+--+-----+--+----+-+-+---+---+---+
* " ": unused (i.e. reserved)
* STA: purgeable state
* see: VM_PURGABLE_NONVOLATILE=0 to VM_PURGABLE_DENY=3
* ORD: order
* see:VM_VOLATILE_ORDER_*
* B: behavior
* see: VM_PURGABLE_BEHAVIOR_*
* GRP: group
* see: VM_VOLATILE_GROUP_*
* DEBUG: debug
* see: VM_PURGABLE_DEBUG_*
* NA: no aging
* see: VM_PURGABLE_NO_AGING*
*/
#define VM_PURGABLE_NO_AGING_SHIFT 16
#define VM_PURGABLE_NO_AGING_MASK (0x1 << VM_PURGABLE_NO_AGING_SHIFT)
#define VM_PURGABLE_NO_AGING (0x1 << VM_PURGABLE_NO_AGING_SHIFT)
#define VM_PURGABLE_DEBUG_SHIFT 12
#define VM_PURGABLE_DEBUG_MASK (0x3 << VM_PURGABLE_DEBUG_SHIFT)
#define VM_PURGABLE_DEBUG_EMPTY (0x1 << VM_PURGABLE_DEBUG_SHIFT)
#define VM_PURGABLE_DEBUG_FAULT (0x2 << VM_PURGABLE_DEBUG_SHIFT)
/*
* Volatile memory ordering groups (group zero objects are purged before group 1, etc...
* It is implementation dependent as to whether these groups are global or per-address space.
* (for the moment, they are global).
*/
#define VM_VOLATILE_GROUP_SHIFT 8
#define VM_VOLATILE_GROUP_MASK (7 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_DEFAULT VM_VOLATILE_GROUP_0
#define VM_VOLATILE_GROUP_0 (0 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_1 (1 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_2 (2 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_3 (3 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_4 (4 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_5 (5 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_6 (6 << VM_VOLATILE_GROUP_SHIFT)
#define VM_VOLATILE_GROUP_7 (7 << VM_VOLATILE_GROUP_SHIFT)
/*
* Purgeable behavior
* Within the same group, FIFO objects will be emptied before objects that are added later.
* LIFO objects will be emptied after objects that are added later.
* - Input only, not returned on state queries.
*/
#define VM_PURGABLE_BEHAVIOR_SHIFT 6
#define VM_PURGABLE_BEHAVIOR_MASK (1 << VM_PURGABLE_BEHAVIOR_SHIFT)
#define VM_PURGABLE_BEHAVIOR_FIFO (0 << VM_PURGABLE_BEHAVIOR_SHIFT)
#define VM_PURGABLE_BEHAVIOR_LIFO (1 << VM_PURGABLE_BEHAVIOR_SHIFT)
/*
* Obsolete object.
* Disregard volatile group, and put object into obsolete queue instead, so it is the next object
* to be purged.
* - Input only, not returned on state queries.
*/
#define VM_PURGABLE_ORDERING_SHIFT 5
#define VM_PURGABLE_ORDERING_MASK (1 << VM_PURGABLE_ORDERING_SHIFT)
#define VM_PURGABLE_ORDERING_OBSOLETE (1 << VM_PURGABLE_ORDERING_SHIFT)
#define VM_PURGABLE_ORDERING_NORMAL (0 << VM_PURGABLE_ORDERING_SHIFT)
/*
* Obsolete parameter - do not use
*/
#define VM_VOLATILE_ORDER_SHIFT 4
#define VM_VOLATILE_ORDER_MASK (1 << VM_VOLATILE_ORDER_SHIFT)
#define VM_VOLATILE_MAKE_FIRST_IN_GROUP (1 << VM_VOLATILE_ORDER_SHIFT)
#define VM_VOLATILE_MAKE_LAST_IN_GROUP (0 << VM_VOLATILE_ORDER_SHIFT)
/*
* Valid states of a purgeable object.
*/
#define VM_PURGABLE_STATE_MIN 0 /* minimum purgeable object state value */
#define VM_PURGABLE_STATE_MAX 3 /* maximum purgeable object state value */
#define VM_PURGABLE_STATE_MASK 3 /* mask to separate state from group */
#define VM_PURGABLE_NONVOLATILE 0 /* purgeable object is non-volatile */
#define VM_PURGABLE_VOLATILE 1 /* purgeable object is volatile */
#define VM_PURGABLE_EMPTY 2 /* purgeable object is volatile and empty */
#define VM_PURGABLE_DENY 3 /* (mark) object not purgeable */
#define VM_PURGABLE_ALL_MASKS (VM_PURGABLE_STATE_MASK | \
VM_VOLATILE_ORDER_MASK | \
VM_PURGABLE_ORDERING_MASK | \
VM_PURGABLE_BEHAVIOR_MASK | \
VM_VOLATILE_GROUP_MASK | \
VM_PURGABLE_DEBUG_MASK | \
VM_PURGABLE_NO_AGING_MASK)
#endif /* _MACH_VM_PURGABLE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_info.h | /*
* Copyright (c) 2000-2005, 2015 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/thread_info
*
* Thread information structure and definitions.
*
* The defintions in this file are exported to the user. The kernel
* will translate its internal data structures to these structures
* as appropriate.
*
*/
#ifndef _MACH_THREAD_INFO_H_
#define _MACH_THREAD_INFO_H_
#include <mach/boolean.h>
#include <mach/policy.h>
#include <mach/time_value.h>
#include <mach/message.h>
#include <mach/machine/vm_types.h>
/*
* Generic information structure to allow for expansion.
*/
typedef natural_t thread_flavor_t;
typedef integer_t *thread_info_t; /* varying array of int */
#define THREAD_INFO_MAX (32) /* maximum array size */
typedef integer_t thread_info_data_t[THREAD_INFO_MAX];
/*
* Currently defined information.
*/
#define THREAD_BASIC_INFO 3 /* basic information */
struct thread_basic_info {
time_value_t user_time; /* user run time */
time_value_t system_time; /* system run time */
integer_t cpu_usage; /* scaled cpu usage percentage */
policy_t policy; /* scheduling policy in effect */
integer_t run_state; /* run state (see below) */
integer_t flags; /* various flags (see below) */
integer_t suspend_count; /* suspend count for thread */
integer_t sleep_time; /* number of seconds that thread
* has been sleeping */
};
typedef struct thread_basic_info thread_basic_info_data_t;
typedef struct thread_basic_info *thread_basic_info_t;
#define THREAD_BASIC_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(thread_basic_info_data_t) / sizeof(natural_t)))
#define THREAD_IDENTIFIER_INFO 4 /* thread id and other information */
struct thread_identifier_info {
uint64_t thread_id; /* system-wide unique 64-bit thread id */
uint64_t thread_handle; /* handle to be used by libproc */
uint64_t dispatch_qaddr; /* libdispatch queue address */
};
typedef struct thread_identifier_info thread_identifier_info_data_t;
typedef struct thread_identifier_info *thread_identifier_info_t;
#define THREAD_IDENTIFIER_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(thread_identifier_info_data_t) / sizeof(natural_t)))
/*
* Scale factor for usage field.
*/
#define TH_USAGE_SCALE 1000
/*
* Thread run states (state field).
*/
#define TH_STATE_RUNNING 1 /* thread is running normally */
#define TH_STATE_STOPPED 2 /* thread is stopped */
#define TH_STATE_WAITING 3 /* thread is waiting normally */
#define TH_STATE_UNINTERRUPTIBLE 4 /* thread is in an uninterruptible
* wait */
#define TH_STATE_HALTED 5 /* thread is halted at a
* clean point */
/*
* Thread flags (flags field).
*/
#define TH_FLAGS_SWAPPED 0x1 /* thread is swapped out */
#define TH_FLAGS_IDLE 0x2 /* thread is an idle thread */
#define TH_FLAGS_GLOBAL_FORCED_IDLE 0x4 /* thread performs global forced idle */
/*
* Thread extended info (returns same info as proc_pidinfo(...,PROC_PIDTHREADINFO,...)
*/
#define THREAD_EXTENDED_INFO 5
#define MAXTHREADNAMESIZE 64
struct thread_extended_info { // same as proc_threadinfo (from proc_info.h) & proc_threadinfo_internal (from bsd_taskinfo.h)
uint64_t pth_user_time; /* user run time */
uint64_t pth_system_time; /* system run time */
int32_t pth_cpu_usage; /* scaled cpu usage percentage */
int32_t pth_policy; /* scheduling policy in effect */
int32_t pth_run_state; /* run state (see below) */
int32_t pth_flags; /* various flags (see below) */
int32_t pth_sleep_time; /* number of seconds that thread */
int32_t pth_curpri; /* cur priority*/
int32_t pth_priority; /* priority*/
int32_t pth_maxpriority; /* max priority*/
char pth_name[MAXTHREADNAMESIZE]; /* thread name, if any */
};
typedef struct thread_extended_info thread_extended_info_data_t;
typedef struct thread_extended_info * thread_extended_info_t;
#define THREAD_EXTENDED_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(thread_extended_info_data_t) / sizeof (natural_t)))
#define THREAD_DEBUG_INFO_INTERNAL 6 /* for kernel development internal info */
#define IO_NUM_PRIORITIES 4
#define UPDATE_IO_STATS(info, size) \
{ \
info.count++; \
info.size += size; \
}
#define UPDATE_IO_STATS_ATOMIC(info, io_size) \
{ \
OSIncrementAtomic64((SInt64 *)&(info.count)); \
OSAddAtomic64(io_size, (SInt64 *)&(info.size)); \
}
struct io_stat_entry {
uint64_t count;
uint64_t size;
};
struct io_stat_info {
struct io_stat_entry disk_reads;
struct io_stat_entry io_priority[IO_NUM_PRIORITIES];
struct io_stat_entry paging;
struct io_stat_entry metadata;
struct io_stat_entry total_io;
};
typedef struct io_stat_info *io_stat_info_t;
/*
* Obsolete interfaces.
*/
#define THREAD_SCHED_TIMESHARE_INFO 10
#define THREAD_SCHED_RR_INFO 11
#define THREAD_SCHED_FIFO_INFO 12
#endif /* _MACH_THREAD_INFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/port.h | /*
* Copyright (c) 2000-2006 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* NOTICE: This file was modified by McAfee Research in 2004 to introduce
* support for mandatory and extensible security protections. This notice
* is included in support of clause 2.2 (b) of the Apple Public License,
* Version 2.0.
*/
/*
*/
/*
* File: mach/port.h
*
* Definition of a Mach port
*
* Mach ports are the endpoints to Mach-implemented communications
* channels (usually uni-directional message queues, but other types
* also exist).
*
* Unique collections of these endpoints are maintained for each
* Mach task. Each Mach port in the task's collection is given a
* [task-local] name to identify it - and the the various "rights"
* held by the task for that specific endpoint.
*
* This header defines the types used to identify these Mach ports
* and the various rights associated with them. For more info see:
*
* <mach/mach_port.h> - manipulation of port rights in a given space
* <mach/message.h> - message queue [and port right passing] mechanism
*
*/
#ifndef _MACH_PORT_H_
#define _MACH_PORT_H_
#include <sys/cdefs.h>
#include <stdint.h>
#include <mach/boolean.h>
#include <mach/machine/vm_types.h>
/*
* mach_port_name_t - the local identity for a Mach port
*
* The name is Mach port namespace specific. It is used to
* identify the rights held for that port by the task whose
* namespace is implied [or specifically provided].
*
* Use of this type usually implies just a name - no rights.
* See mach_port_t for a type that implies a "named right."
*
*/
typedef natural_t mach_port_name_t;
typedef mach_port_name_t *mach_port_name_array_t;
/*
* mach_port_t - a named port right
*
* In the kernel, "rights" are represented [named] by pointers to
* the ipc port object in question. There is no port namespace for the
* rights to be collected.
*
* Actually, there is namespace for the kernel task. But most kernel
* code - including, but not limited to, Mach IPC code - lives in the
* limbo between the current user-level task and the "next" task. Very
* little of the kernel code runs in full kernel task context. So very
* little of it gets to use the kernel task's port name space.
*
* Because of this implementation approach, all in-kernel rights for
* a given port coalesce [have the same name/pointer]. The actual
* references are counted in the port itself. It is up to the kernel
* code in question to "just remember" how many [and what type of]
* rights it holds and handle them appropriately.
*
*/
/*
* For kernel code that resides outside of Mach proper, we opaque the
* port structure definition.
*/
struct ipc_port;
typedef struct ipc_port *ipc_port_t;
#define IPC_PORT_NULL ((ipc_port_t) NULL)
#define IPC_PORT_DEAD ((ipc_port_t)~0UL)
#define IPC_PORT_VALID(port) ipc_port_valid(port)
static inline boolean_t
ipc_port_valid(ipc_port_t port)
{
return port != IPC_PORT_DEAD && port;
}
typedef ipc_port_t mach_port_t;
/*
* Since the 32-bit and 64-bit representations of ~0 are different,
* explicitly handle MACH_PORT_DEAD
*/
#define CAST_MACH_PORT_TO_NAME(x) ((mach_port_name_t)(uintptr_t)(x))
#define CAST_MACH_NAME_TO_PORT(x) ((x) == MACH_PORT_DEAD ? (mach_port_t)IPC_PORT_DEAD : (mach_port_t)(uintptr_t)(x))
typedef mach_port_t *mach_port_array_t;
/*
* MACH_PORT_NULL is a legal value that can be carried in messages.
* It indicates the absence of any port or port rights. (A port
* argument keeps the message from being "simple", even if the
* value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal
* value that can be carried in messages. It indicates
* that a port right was present, but it died.
*/
#define MACH_PORT_NULL 0 /* intentional loose typing */
#define MACH_PORT_DEAD ((mach_port_name_t) ~0)
#define MACH_PORT_VALID(name) \
(((name) != MACH_PORT_NULL) && \
((name) != MACH_PORT_DEAD))
/*
* For kernel-selected [assigned] port names, the name is
* comprised of two parts: a generation number and an index.
* This approach keeps the exact same name from being generated
* and reused too quickly [to catch right/reference counting bugs].
* The dividing line between the constituent parts is exposed so
* that efficient "mach_port_name_t to data structure pointer"
* conversion implementation can be made. But it is possible
* for user-level code to assign their own names to Mach ports.
* These are not required to participate in this algorithm. So
* care should be taken before "assuming" this model.
*
*/
#ifndef NO_PORT_GEN
#define MACH_PORT_INDEX(name) ((name) >> 8)
#define MACH_PORT_GEN(name) (((name) & 0xff) << 24)
#define MACH_PORT_MAKE(index, gen) \
(((index) << 8) | (gen) >> 24)
#else /* NO_PORT_GEN */
#define MACH_PORT_INDEX(name) (name)
#define MACH_PORT_GEN(name) (0)
#define MACH_PORT_MAKE(index, gen) (index)
#endif /* NO_PORT_GEN */
/*
* These are the different rights a task may have for a port.
* The MACH_PORT_RIGHT_* definitions are used as arguments
* to mach_port_allocate, mach_port_get_refs, etc, to specify
* a particular right to act upon. The mach_port_names and
* mach_port_type calls return bitmasks using the MACH_PORT_TYPE_*
* definitions. This is because a single name may denote
* multiple rights.
*/
typedef natural_t mach_port_right_t;
#define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0)
#define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1)
#define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2)
#define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3)
#define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4)
#define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) /* obsolete right */
#define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) /* right not implemented */
typedef natural_t mach_port_type_t;
typedef mach_port_type_t *mach_port_type_array_t;
#define MACH_PORT_TYPE(right) \
((mach_port_type_t)(((mach_port_type_t) 1) \
<< ((right) + ((mach_port_right_t) 16))))
#define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L)
#define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND)
#define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE)
#define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE)
#define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET)
#define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME)
#define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) /* obsolete */
/* Convenient combinations. */
#define MACH_PORT_TYPE_SEND_RECEIVE \
(MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE)
#define MACH_PORT_TYPE_SEND_RIGHTS \
(MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE)
#define MACH_PORT_TYPE_PORT_RIGHTS \
(MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE)
#define MACH_PORT_TYPE_PORT_OR_DEAD \
(MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME)
#define MACH_PORT_TYPE_ALL_RIGHTS \
(MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET)
/* Dummy type bits that mach_port_type/mach_port_names can return. */
#define MACH_PORT_TYPE_DNREQUEST 0x80000000
#define MACH_PORT_TYPE_SPREQUEST 0x40000000
#define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000
/* User-references for capabilities. */
typedef natural_t mach_port_urefs_t;
typedef integer_t mach_port_delta_t; /* change in urefs */
/* Attributes of ports. (See mach_port_get_receive_status.) */
typedef natural_t mach_port_seqno_t; /* sequence number */
typedef natural_t mach_port_mscount_t; /* make-send count */
typedef natural_t mach_port_msgcount_t; /* number of msgs */
typedef natural_t mach_port_rights_t; /* number of rights */
/*
* Are there outstanding send rights for a given port?
*/
#define MACH_PORT_SRIGHTS_NONE 0 /* no srights */
#define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */
typedef unsigned int mach_port_srights_t; /* status of send rights */
typedef struct mach_port_status {
mach_port_rights_t mps_pset; /* count of containing port sets */
mach_port_seqno_t mps_seqno; /* sequence number */
mach_port_mscount_t mps_mscount; /* make-send count */
mach_port_msgcount_t mps_qlimit; /* queue limit */
mach_port_msgcount_t mps_msgcount; /* number in the queue */
mach_port_rights_t mps_sorights; /* how many send-once rights */
boolean_t mps_srights; /* do send rights exist? */
boolean_t mps_pdrequest; /* port-deleted requested? */
boolean_t mps_nsrequest; /* no-senders requested? */
natural_t mps_flags; /* port flags */
} mach_port_status_t;
/* System-wide values for setting queue limits on a port */
#define MACH_PORT_QLIMIT_ZERO (0)
#define MACH_PORT_QLIMIT_BASIC (5)
#define MACH_PORT_QLIMIT_SMALL (16)
#define MACH_PORT_QLIMIT_LARGE (1024)
#define MACH_PORT_QLIMIT_KERNEL (65534)
#define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO
#define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC
#define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE
typedef struct mach_port_limits {
mach_port_msgcount_t mpl_qlimit; /* number of msgs */
} mach_port_limits_t;
/* Possible values for mps_flags (part of mach_port_status_t) */
#define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01
#define MACH_PORT_STATUS_FLAG_GUARDED 0x02
#define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04
#define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08
#define MACH_PORT_STATUS_FLAG_REVIVE 0x10
#define MACH_PORT_STATUS_FLAG_TASKPTR 0x20
#define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40
#define MACH_PORT_STATUS_FLAG_NO_GRANT 0x80
typedef struct mach_port_info_ext {
mach_port_status_t mpie_status;
mach_port_msgcount_t mpie_boost_cnt;
uint32_t reserved[6];
} mach_port_info_ext_t;
typedef struct mach_port_guard_info {
uint64_t mpgi_guard; /* guard value */
} mach_port_guard_info_t;
typedef integer_t *mach_port_info_t; /* varying array of natural_t */
/* Flavors for mach_port_get/set/assert_attributes() */
typedef int mach_port_flavor_t;
#define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_limits_t */
#define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_status_t */
#define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */
#define MACH_PORT_TEMPOWNER 4 /* indicates receive right will be reassigned to another task */
#define MACH_PORT_IMPORTANCE_RECEIVER 5 /* indicates recieve right accepts priority donation */
#define MACH_PORT_DENAP_RECEIVER 6 /* indicates receive right accepts de-nap donation */
#define MACH_PORT_INFO_EXT 7 /* uses mach_port_info_ext_t */
#define MACH_PORT_GUARD_INFO 8 /* asserts if the strict guard value is correct */
#define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \
(sizeof(mach_port_limits_t)/sizeof(natural_t)))
#define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \
(sizeof(mach_port_status_t)/sizeof(natural_t)))
#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1
#define MACH_PORT_INFO_EXT_COUNT ((natural_t) \
(sizeof(mach_port_info_ext_t)/sizeof(natural_t)))
#define MACH_PORT_GUARD_INFO_COUNT ((natural_t) \
(sizeof(mach_port_guard_info_t)/sizeof(natural_t)))
/*
* Structure used to pass information about port allocation requests.
* Must be padded to 64-bits total length.
*/
typedef struct mach_port_qos {
unsigned int name:1; /* name given */
unsigned int prealloc:1; /* prealloced message */
boolean_t pad1:30;
natural_t len;
} mach_port_qos_t;
/*
* Structure used to pass information about the service port
*/
#define MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN 255 /* Maximum length of the port string name buffer */
typedef struct mach_service_port_info {
char mspi_string_name[MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN]; /* Service port's string name */
uint8_t mspi_domain_type; /* Service port domain */
} mach_service_port_info_data_t;
#define MACH_SERVICE_PORT_INFO_COUNT ((char) \
(sizeof(mach_service_port_info_data_t)/sizeof(char)))
typedef struct mach_service_port_info * mach_service_port_info_t;
/*
* Flags for mach_port_options (used for
* invocation of mach_port_construct).
* Indicates attributes to be set for the newly
* allocated port.
*/
#define MPO_CONTEXT_AS_GUARD 0x01 /* Add guard to the port */
#define MPO_QLIMIT 0x02 /* Set qlimit for the port msg queue */
#define MPO_TEMPOWNER 0x04 /* Set the tempowner bit of the port */
#define MPO_IMPORTANCE_RECEIVER 0x08 /* Mark the port as importance receiver */
#define MPO_INSERT_SEND_RIGHT 0x10 /* Insert a send right for the port */
#define MPO_STRICT 0x20 /* Apply strict guarding for port */
#define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */
#define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */
#define MPO_FILTER_MSG 0x100 /* Allow message filtering */
#define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */
#define MPO_SERVICE_PORT 0x400 /* Create a service port with the given name; should be used only by launchd */
#define MPO_CONNECTION_PORT 0x800 /* Derive new peer connection port from a given service port */
/*
* Structure to define optional attributes for a newly
* constructed port.
*/
typedef struct mach_port_options {
uint32_t flags; /* Flags defining attributes for port */
mach_port_limits_t mpl; /* Message queue limit for port */
union {
uint64_t reserved[2]; /* Reserved */
mach_port_name_t work_interval_port; /* Work interval port */
uint32_t service_port_info32; /* Service port (MPO_SERVICE_PORT) */
uint64_t service_port_info64; /* Service port (MPO_SERVICE_PORT) */
mach_port_name_t service_port_name; /* Service port (MPO_CONNECTION_PORT) */
};
}mach_port_options_t;
typedef mach_port_options_t *mach_port_options_ptr_t;
/* Mach Port Guarding definitions */
/*
* EXC_GUARD represents a guard violation for both
* mach ports and file descriptors. GUARD_TYPE_ is used
* to differentiate among them.
*/
#define GUARD_TYPE_MACH_PORT 0x1
/* Reasons for exception for a guarded mach port */
enum mach_port_guard_exception_codes {
kGUARD_EXC_DESTROY = 1u << 0,
kGUARD_EXC_MOD_REFS = 1u << 1,
kGUARD_EXC_SET_CONTEXT = 1u << 2,
kGUARD_EXC_UNGUARDED = 1u << 3,
kGUARD_EXC_INCORRECT_GUARD = 1u << 4,
kGUARD_EXC_IMMOVABLE = 1u << 5,
kGUARD_EXC_STRICT_REPLY = 1u << 6,
kGUARD_EXC_MSG_FILTERED = 1u << 7,
/* start of [optionally] non-fatal guards */
kGUARD_EXC_INVALID_RIGHT = 1u << 8,
kGUARD_EXC_INVALID_NAME = 1u << 9,
kGUARD_EXC_INVALID_VALUE = 1u << 10,
kGUARD_EXC_INVALID_ARGUMENT = 1u << 11,
kGUARD_EXC_RIGHT_EXISTS = 1u << 12,
kGUARD_EXC_KERN_NO_SPACE = 1u << 13,
kGUARD_EXC_KERN_FAILURE = 1u << 14,
kGUARD_EXC_KERN_RESOURCE = 1u << 15,
kGUARD_EXC_SEND_INVALID_REPLY = 1u << 16,
kGUARD_EXC_SEND_INVALID_VOUCHER = 1u << 17,
kGUARD_EXC_SEND_INVALID_RIGHT = 1u << 18,
kGUARD_EXC_RCV_INVALID_NAME = 1u << 19,
/* start of always non-fatal guards */
kGUARD_EXC_RCV_GUARDED_DESC = 1u << 20, /* for development only */
kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21,
kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22,
};
#define MAX_FATAL_kGUARD_EXC_CODE (1u << 7)
/*
* Mach port guard flags.
*/
#define MPG_FLAGS_NONE (0x00ull)
#define MAX_OPTIONAL_kGUARD_EXC_CODE (1u << 19)
/*
* These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions.
*/
#define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP (0x01ull << 56)
#define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT (0x02ull << 56)
#define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER (0x04ull << 56)
#define MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR (0x08ull << 56)
#define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA (0x10ull << 56)
#define MPG_FLAGS_STRICT_REPLY_MASK (0xffull << 56)
/*
* These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions.
*/
#define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC (0x01ull << 56)
#define MPG_FLAGS_MOD_REFS_PINNED_DESTROY (0x02ull << 56)
#define MPG_FLAGS_MOD_REFS_PINNED_COPYIN (0x04ull << 56)
/*
* These flags are used as bits in the subcode of kGUARD_EXC_IMMOVABLE exceptions.
*/
#define MPG_FLAGS_IMMOVABLE_PINNED (0x01ull << 56)
/*
* Flags for mach_port_guard_with_flags. These flags extend
* the attributes associated with a guarded port.
*/
#define MPG_STRICT 0x01 /* Apply strict guarding for a port */
#define MPG_IMMOVABLE_RECEIVE 0x02 /* Receive right cannot be moved out of the space */
#if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH)
/*
* Mach 3.0 renamed everything to have mach_ in front of it.
* These types and macros are provided for backward compatibility
* but are deprecated.
*/
typedef mach_port_t port_t;
typedef mach_port_name_t port_name_t;
typedef mach_port_name_t *port_name_array_t;
#define PORT_NULL ((port_t) 0)
#define PORT_DEAD ((port_t) ~0)
#define PORT_VALID(name) \
((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD)
#endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */
#endif /* _MACH_PORT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_status.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/thread_status.h
* Author: Avadis Tevanian, Jr.
*
* This file contains the structure definitions for the user-visible
* thread state. This thread state is examined with the thread_get_state
* kernel call and may be changed with the thread_set_state kernel call.
*
*/
#ifndef _MACH_THREAD_STATUS_H_
#define _MACH_THREAD_STATUS_H_
/*
* The actual structure that comprises the thread state is defined
* in the machine dependent module.
*/
#include <mach/machine/vm_types.h>
#include <mach/machine/thread_status.h>
#include <mach/machine/thread_state.h>
/*
* Generic definition for machine-dependent thread status.
*/
typedef natural_t *thread_state_t; /* Variable-length array */
/* THREAD_STATE_MAX is now defined in <mach/machine/thread_state.h> */
typedef natural_t thread_state_data_t[THREAD_STATE_MAX];
#define THREAD_STATE_FLAVOR_LIST 0 /* List of valid flavors */
#define THREAD_STATE_FLAVOR_LIST_NEW 128
#define THREAD_STATE_FLAVOR_LIST_10_9 129
#define THREAD_STATE_FLAVOR_LIST_10_13 130
#define THREAD_STATE_FLAVOR_LIST_10_15 131
typedef int thread_state_flavor_t;
typedef thread_state_flavor_t *thread_state_flavor_array_t;
#define THREAD_CONVERT_THREAD_STATE_TO_SELF 1
#define THREAD_CONVERT_THREAD_STATE_FROM_SELF 2
#endif /* _MACH_THREAD_STATUS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/exception_types.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
#ifndef _MACH_EXCEPTION_TYPES_H_
#define _MACH_EXCEPTION_TYPES_H_
#include <mach/machine/exception.h>
/*
* Machine-independent exception definitions.
*/
#define EXC_BAD_ACCESS 1 /* Could not access memory */
/* Code contains kern_return_t describing error. */
/* Subcode contains bad memory address. */
#define EXC_BAD_INSTRUCTION 2 /* Instruction failed */
/* Illegal or undefined instruction or operand */
#define EXC_ARITHMETIC 3 /* Arithmetic exception */
/* Exact nature of exception is in code field */
#define EXC_EMULATION 4 /* Emulation instruction */
/* Emulation support instruction encountered */
/* Details in code and subcode fields */
#define EXC_SOFTWARE 5 /* Software generated exception */
/* Exact exception is in code field. */
/* Codes 0 - 0xFFFF reserved to hardware */
/* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */
#define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */
/* Details in code field. */
#define EXC_SYSCALL 7 /* System calls. */
#define EXC_MACH_SYSCALL 8 /* Mach system calls. */
#define EXC_RPC_ALERT 9 /* RPC alert */
#define EXC_CRASH 10 /* Abnormal process exit */
#define EXC_RESOURCE 11 /* Hit resource consumption limit */
/* Exact resource is in code field. */
#define EXC_GUARD 12 /* Violated guarded resource protections */
#define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */
#define EXC_CORPSE_VARIANT_BIT 0x100 /* bit set for EXC_*_CORPSE variants of EXC_* */
/*
* Machine-independent exception behaviors
*/
# define EXCEPTION_DEFAULT 1
/* Send a catch_exception_raise message including the identity.
*/
# define EXCEPTION_STATE 2
/* Send a catch_exception_raise_state message including the
* thread state.
*/
# define EXCEPTION_STATE_IDENTITY 3
/* Send a catch_exception_raise_state_identity message including
* the thread identity and state.
*/
# define EXCEPTION_IDENTITY_PROTECTED 4
/* Send a catch_exception_raise message including protected task
* and thread identity.
*/
#define MACH_EXCEPTION_ERRORS 0x40000000
/* include additional exception specific errors, not used yet. */
#define MACH_EXCEPTION_CODES 0x80000000
/* Send 64-bit code and subcode in the exception header */
#define MACH_EXCEPTION_MASK (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS)
/*
* Masks for exception definitions, above
* bit zero is unused, therefore 1 word = 31 exception types
*/
#define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS)
#define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION)
#define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC)
#define EXC_MASK_EMULATION (1 << EXC_EMULATION)
#define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE)
#define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT)
#define EXC_MASK_SYSCALL (1 << EXC_SYSCALL)
#define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL)
#define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT)
#define EXC_MASK_CRASH (1 << EXC_CRASH)
#define EXC_MASK_RESOURCE (1 << EXC_RESOURCE)
#define EXC_MASK_GUARD (1 << EXC_GUARD)
#define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY)
#define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \
EXC_MASK_BAD_INSTRUCTION | \
EXC_MASK_ARITHMETIC | \
EXC_MASK_EMULATION | \
EXC_MASK_SOFTWARE | \
EXC_MASK_BREAKPOINT | \
EXC_MASK_SYSCALL | \
EXC_MASK_MACH_SYSCALL | \
EXC_MASK_RPC_ALERT | \
EXC_MASK_RESOURCE | \
EXC_MASK_GUARD | \
EXC_MASK_MACHINE)
#define FIRST_EXCEPTION 1 /* ZERO is illegal */
/*
* Machine independent codes for EXC_SOFTWARE
* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix)
* 0x10000 - 0x10002 in use for unix signals
* 0x20000 - 0x2FFFF reserved for MACF
*/
#define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */
#define EXC_MACF_MIN 0x20000 /* MACF exceptions */
#define EXC_MACF_MAX 0x2FFFF
#ifndef ASSEMBLER
#include <mach/port.h>
#include <mach/thread_status.h>
#include <mach/machine/vm_types.h>
#include <mach_debug/ipc_info.h>
/*
* Exported types
*/
typedef int exception_type_t;
typedef integer_t exception_data_type_t;
typedef int64_t mach_exception_data_type_t;
typedef int exception_behavior_t;
typedef exception_data_type_t *exception_data_t;
typedef mach_exception_data_type_t *mach_exception_data_t;
typedef unsigned int exception_mask_t;
typedef exception_mask_t *exception_mask_array_t;
typedef exception_behavior_t *exception_behavior_array_t;
typedef thread_state_flavor_t *exception_flavor_array_t;
typedef mach_port_t *exception_port_array_t;
typedef ipc_info_port_t *exception_port_info_array_t;
typedef mach_exception_data_type_t mach_exception_code_t;
typedef mach_exception_data_type_t mach_exception_subcode_t;
#endif /* ASSEMBLER */
#endif /* _MACH_EXCEPTION_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/audit_triggers_types.h | typedef const char* string_t;
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/coalition_notification_server.h | #ifndef _coalition_notification_server_
#define _coalition_notification_server_
/* Module coalition_notification */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef coalition_notification_MSG_COUNT
#define coalition_notification_MSG_COUNT 1
#endif /* coalition_notification_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine coalition_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t coalition_notification
(
mach_port_t coalition_port,
uint64_t id,
uint32_t flags
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t coalition_notification_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t coalition_notification_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct coalition_notification_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} coalition_notification_subsystem;
/* typedefs for all requests */
#ifndef __Request__coalition_notification_subsystem__defined
#define __Request__coalition_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint64_t id;
uint32_t flags;
} __Request__coalition_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__coalition_notification_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__coalition_notification_subsystem__defined
#define __RequestUnion__coalition_notification_subsystem__defined
union __RequestUnion__coalition_notification_subsystem {
__Request__coalition_notification_t Request_coalition_notification;
};
#endif /* __RequestUnion__coalition_notification_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__coalition_notification_subsystem__defined
#define __Reply__coalition_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__coalition_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__coalition_notification_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__coalition_notification_subsystem__defined
#define __ReplyUnion__coalition_notification_subsystem__defined
union __ReplyUnion__coalition_notification_subsystem {
__Reply__coalition_notification_t Reply_coalition_notification;
};
#endif /* __ReplyUnion__coalition_notification_subsystem__defined */
#ifndef subsystem_to_name_map_coalition_notification
#define subsystem_to_name_map_coalition_notification \
{ "coalition_notification", 5300 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _coalition_notification_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/kmod.h | /*
* Copyright (c) 2000-2007 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
* support for mandatory and extensible security protections. This notice
* is included in support of clause 2.2 (b) of the Apple Public License,
* Version 2.0.
*/
#ifndef _MACH_KMOD_H_
#define _MACH_KMOD_H_
#include <mach/kern_return.h>
#include <mach/mach_types.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
#if PRAGMA_MARK
#pragma mark Basic macros & typedefs
#endif
/***********************************************************************
* Basic macros & typedefs
***********************************************************************/
#define KMOD_MAX_NAME 64
#define KMOD_RETURN_SUCCESS KERN_SUCCESS
#define KMOD_RETURN_FAILURE KERN_FAILURE
typedef int kmod_t;
struct kmod_info;
typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data);
typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data);
#if PRAGMA_MARK
#pragma mark Structure definitions
#endif
/***********************************************************************
* Structure definitions
*
* All structures must be #pragma pack(4).
***********************************************************************/
#pragma pack(push, 4)
/* Run-time struct only; never saved to a file */
typedef struct kmod_reference {
struct kmod_reference * next;
struct kmod_info * info;
} kmod_reference_t;
/***********************************************************************
* Warning: Any changes to the kmod_info structure affect the
* KMOD_..._DECL macros below.
***********************************************************************/
/* The kmod_info_t structure is only safe to use inside the running
* kernel. If you need to work with a kmod_info_t structure outside
* the kernel, please use the compatibility definitions below.
*/
typedef struct kmod_info {
struct kmod_info * next;
int32_t info_version; // version of this structure
uint32_t id;
char name[KMOD_MAX_NAME];
char version[KMOD_MAX_NAME];
int32_t reference_count; // # linkage refs to this
kmod_reference_t * reference_list; // who this refs (links on)
vm_address_t address; // starting address
vm_size_t size; // total size
vm_size_t hdr_size; // unwired hdr size
kmod_start_func_t * start;
kmod_stop_func_t * stop;
} kmod_info_t;
/* A compatibility definition of kmod_info_t for 32-bit kexts.
*/
typedef struct kmod_info_32_v1 {
uint32_t next_addr;
int32_t info_version;
uint32_t id;
uint8_t name[KMOD_MAX_NAME];
uint8_t version[KMOD_MAX_NAME];
int32_t reference_count;
uint32_t reference_list_addr;
uint32_t address;
uint32_t size;
uint32_t hdr_size;
uint32_t start_addr;
uint32_t stop_addr;
} kmod_info_32_v1_t;
/* A compatibility definition of kmod_info_t for 64-bit kexts.
*/
typedef struct kmod_info_64_v1 {
uint64_t next_addr;
int32_t info_version;
uint32_t id;
uint8_t name[KMOD_MAX_NAME];
uint8_t version[KMOD_MAX_NAME];
int32_t reference_count;
uint64_t reference_list_addr;
uint64_t address;
uint64_t size;
uint64_t hdr_size;
uint64_t start_addr;
uint64_t stop_addr;
} kmod_info_64_v1_t;
#pragma pack(pop)
#if PRAGMA_MARK
#pragma mark Kmod structure declaration macros
#endif
/***********************************************************************
* Kmod structure declaration macros
***********************************************************************/
#define KMOD_INFO_NAME kmod_info
#define KMOD_INFO_VERSION 1
#define KMOD_DECL(name, version) \
static kmod_start_func_t name ## _module_start; \
static kmod_stop_func_t name ## _module_stop; \
kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \
{ #name }, { version }, -1, 0, 0, 0, 0, \
name ## _module_start, \
name ## _module_stop };
#define KMOD_EXPLICIT_DECL(name, version, start, stop) \
kmod_info_t KMOD_INFO_NAME = { 0, KMOD_INFO_VERSION, -1U, \
{ #name }, { version }, -1, 0, 0, 0, 0, \
start, stop };
#if PRAGMA_MARK
#pragma mark Kernel private declarations
#endif
/***********************************************************************
* Kernel private declarations.
***********************************************************************/
#if PRAGMA_MARK
#pragma mark Obsolete kmod stuff
#endif
/***********************************************************************
* These 3 should be dropped but they're referenced by MIG declarations.
***********************************************************************/
typedef void * kmod_args_t;
typedef int kmod_control_flavor_t;
typedef kmod_info_t * kmod_info_array_t;
__END_DECLS
#endif /* _MACH_KMOD_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/sdt.h | /*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MACH_SDT_H
#define _MACH_SDT_H
#include <mach/machine/sdt.h>
#endif /* _MACH_SDT_H */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_reboot.h | /*
* Copyright (c) 2000-2004 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
#ifndef _MACH_HOST_REBOOT_
#define _MACH_HOST_REBOOT_
#define HOST_REBOOT_HALT 0x0008
#define HOST_REBOOT_UPSDELAY 0x0100
#define HOST_REBOOT_DEBUGGER 0x1000
#endif /* _MACH_HOST_REBOOT_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_param.h | /*
* Copyright (c) 2000-2020 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/vm_param.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young
* Date: 1985
*
* Machine independent virtual memory parameters.
*
*/
#ifndef _MACH_VM_PARAM_H_
#define _MACH_VM_PARAM_H_
#include <mach/machine/vm_param.h>
#ifndef ASSEMBLER
#include <mach/vm_types.h>
#endif /* ASSEMBLER */
#include <os/base.h>
#include <os/overflow.h>
/*
* The machine independent pages are refered to as PAGES. A page
* is some number of hardware pages, depending on the target machine.
*/
#ifndef ASSEMBLER
#define PAGE_SIZE_64 (unsigned long long)PAGE_SIZE /* pagesize in addr units */
#define PAGE_MASK_64 (unsigned long long)PAGE_MASK /* mask for off in page */
/*
* Convert addresses to pages and vice versa. No rounding is used.
* The atop_32 and ptoa_32 macros should not be use on 64 bit types.
* The round_page_64 and trunc_page_64 macros should be used instead.
*/
#define atop_32(x) ((uint32_t)(x) >> PAGE_SHIFT)
#define ptoa_32(x) ((uint32_t)(x) << PAGE_SHIFT)
#define atop_64(x) ((uint64_t)(x) >> PAGE_SHIFT)
#define ptoa_64(x) ((uint64_t)(x) << PAGE_SHIFT)
#define atop_kernel(x) ((vm_address_t)(x) >> PAGE_SHIFT)
#define ptoa_kernel(x) ((vm_address_t)(x) << PAGE_SHIFT)
/*
* While the following block is enabled, the legacy atop and ptoa
* macros will behave correctly. If not, they will generate
* invalid lvalue errors.
*/
#if 1
#define atop(x) ((vm_address_t)(x) >> PAGE_SHIFT)
#define ptoa(x) ((vm_address_t)(x) << PAGE_SHIFT)
#else
#define atop(x) (0UL = 0)
#define ptoa(x) (0UL = 0)
#endif
/*
* Page-size rounding macros for the Public fixed-width VM types.
*/
#define mach_vm_round_page(x) (((mach_vm_offset_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK))
#define mach_vm_trunc_page(x) ((mach_vm_offset_t)(x) & ~((signed)PAGE_MASK))
#define round_page_overflow(in, out) __os_warn_unused(({ \
bool __ovr = os_add_overflow(in, (__typeof__(*out))PAGE_MASK, out); \
*out &= ~((__typeof__(*out))PAGE_MASK); \
__ovr; \
}))
static inline int OS_WARN_RESULT
mach_vm_round_page_overflow(mach_vm_offset_t in, mach_vm_offset_t *out)
{
return round_page_overflow(in, out);
}
#define memory_object_round_page(x) (((memory_object_offset_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK))
#define memory_object_trunc_page(x) ((memory_object_offset_t)(x) & ~((signed)PAGE_MASK))
/*
* Rounding macros for the legacy (scalable with the current task's
* address space size) VM types.
*/
#define round_page(x) (((vm_offset_t)(x) + PAGE_MASK) & ~((vm_offset_t)PAGE_MASK))
#define trunc_page(x) ((vm_offset_t)(x) & ~((vm_offset_t)PAGE_MASK))
/*
* Round off or truncate to the nearest page. These will work
* for either addresses or counts. (i.e. 1 byte rounds to 1 page
* bytes. The round_page_32 and trunc_page_32 macros should not be
* use on 64 bit types. The round_page_64 and trunc_page_64 macros
* should be used instead.
*
* These should only be used in the rare case the size of the address
* or length is hard-coded as 32 or 64 bit. Otherwise, the macros
* associated with the specific VM type should be used.
*/
#define round_page_32(x) (((uint32_t)(x) + PAGE_MASK) & ~((uint32_t)PAGE_MASK))
#define trunc_page_32(x) ((uint32_t)(x) & ~((uint32_t)PAGE_MASK))
#define round_page_64(x) (((uint64_t)(x) + PAGE_MASK_64) & ~((uint64_t)PAGE_MASK_64))
#define trunc_page_64(x) ((uint64_t)(x) & ~((uint64_t)PAGE_MASK_64))
#define round_page_mask_32(x, mask) (((uint32_t)(x) + (mask)) & ~((uint32_t)(mask)))
#define trunc_page_mask_32(x, mask) ((uint32_t)(x) & ~((uint32_t)(mask)))
#define round_page_mask_64(x, mask) (((uint64_t)(x) + (mask)) & ~((uint64_t)(mask)))
#define trunc_page_mask_64(x, mask) ((uint64_t)(x) & ~((uint64_t)(mask)))
/*
* Enable the following block to find uses of xxx_32 macros that should
* be xxx_64. These macros only work in C code, not C++. The resulting
* binaries are not functional. Look for invalid lvalue errors in
* the compiler output.
*
* Enabling the following block will also find use of the xxx_64 macros
* that have been passed pointers. The parameters should be case to an
* unsigned long type first. Look for invalid operands to binary + error
* in the compiler output.
*/
#if 0
#undef atop_32
#undef ptoa_32
#undef round_page_32
#undef trunc_page_32
#undef atop_64
#undef ptoa_64
#undef round_page_64
#undef trunc_page_64
#ifndef __cplusplus
#define atop_32(x) \
(__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
(*(long *)0), \
(0UL)) = 0)
#define ptoa_32(x) \
(__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
(*(long *)0), \
(0UL)) = 0)
#define round_page_32(x) \
(__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
(*(long *)0), \
(0UL)) = 0)
#define trunc_page_32(x) \
(__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
(*(long *)0), \
(0UL)) = 0)
#else
#define atop_32(x) (0)
#define ptoa_32(x) (0)
#define round_page_32(x) (0)
#define trunc_page_32(x) (0)
#endif /* ! __cplusplus */
#define atop_64(x) ((uint64_t)((x) + (uint8_t *)0))
#define ptoa_64(x) ((uint64_t)((x) + (uint8_t *)0))
#define round_page_64(x) ((uint64_t)((x) + (uint8_t *)0))
#define trunc_page_64(x) ((uint64_t)((x) + (uint8_t *)0))
#endif
/*
* Determine whether an address is page-aligned, or a count is
* an exact page multiple.
*/
#define page_aligned(x) (((x) & PAGE_MASK) == 0)
extern vm_size_t mem_size; /* 32-bit size of memory - limited by maxmem - deprecated */
extern uint64_t max_mem; /* 64-bit size of memory - limited by maxmem */
/*
* The default pager does not handle 64-bit offsets inside its objects,
* so this limits the size of anonymous memory objects to 4GB minus 1 page.
* When we need to allocate a chunk of anonymous memory over that size,
* we have to allocate more than one chunk.
*/
#define ANON_MAX_SIZE ((1ULL << 32) - PAGE_SIZE)
/*
* Work-around for <rdar://problem/6626493>
* Break large anonymous memory areas into 128MB chunks to alleviate
* the cost of copying when copy-on-write is not possible because a small
* portion of it being wired.
*/
#define ANON_CHUNK_SIZE (128ULL * 1024 * 1024) /* 128MB */
/*
* The 'medium' malloc allocator would like its regions
* to be chunked up into MALLOC_MEDIUM_CHUNK_SIZE chunks
* and backed by different objects. This avoids contention
* on a single large object and showed solid improvements on high
* core machines with workloads involving video and graphics processing.
*/
#define MALLOC_MEDIUM_CHUNK_SIZE (8ULL * 1024 * 1024) /* 8 MB */
extern vm_size_t page_size;
extern vm_size_t page_mask;
extern int page_shift;
/* We need a way to get rid of compiler warnings when we cast from */
/* a 64 bit value to an address (which may be 32 bits or 64-bits). */
/* An intptr_t is used convert the value to the right precision, and */
/* then to an address. This macro is also used to convert addresses */
/* to 32-bit integers, which is a hard failure for a 64-bit kernel */
#include <stdint.h>
#ifndef __CAST_DOWN_CHECK
#define __CAST_DOWN_CHECK
#define CAST_DOWN( type, addr ) \
( ((type)((uintptr_t) (addr)/(sizeof(type) < sizeof(uintptr_t) ? 0 : 1))) )
#define CAST_DOWN_EXPLICIT( type, addr ) ( ((type)((uintptr_t) (addr))) )
#endif /* __CAST_DOWN_CHECK */
#endif /* ASSEMBLER */
#endif /* _MACH_VM_PARAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_types.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* File: clock_types.h
* Purpose: Clock facility header definitions. These
* definitons are needed by both kernel and
* user-level software.
*/
/*
* All interfaces defined here are obsolete.
*/
#ifndef _MACH_CLOCK_TYPES_H_
#define _MACH_CLOCK_TYPES_H_
#include <stdint.h>
#include <mach/time_value.h>
/*
* Type definitions.
*/
typedef int alarm_type_t; /* alarm time type */
typedef int sleep_type_t; /* sleep time type */
typedef int clock_id_t; /* clock identification type */
typedef int clock_flavor_t; /* clock flavor type */
typedef int *clock_attr_t; /* clock attribute type */
typedef int clock_res_t; /* clock resolution type */
/*
* Normal time specification used by the kernel clock facility.
*/
struct mach_timespec {
unsigned int tv_sec; /* seconds */
clock_res_t tv_nsec; /* nanoseconds */
};
typedef struct mach_timespec mach_timespec_t;
/*
* Reserved clock id values for default clocks.
*/
#define SYSTEM_CLOCK 0
#define CALENDAR_CLOCK 1
#define REALTIME_CLOCK 0
/*
* Attribute names.
*/
#define CLOCK_GET_TIME_RES 1 /* get_time call resolution */
/* 2 * was map_time call resolution */
#define CLOCK_ALARM_CURRES 3 /* current alarm resolution */
#define CLOCK_ALARM_MINRES 4 /* minimum alarm resolution */
#define CLOCK_ALARM_MAXRES 5 /* maximum alarm resolution */
#define NSEC_PER_USEC 1000ull /* nanoseconds per microsecond */
#define USEC_PER_SEC 1000000ull /* microseconds per second */
#define NSEC_PER_SEC 1000000000ull /* nanoseconds per second */
#define NSEC_PER_MSEC 1000000ull /* nanoseconds per millisecond */
#define BAD_MACH_TIMESPEC(t) \
((t)->tv_nsec < 0 || (t)->tv_nsec >= (long)NSEC_PER_SEC)
/* t1 <=> t2, also (t1 - t2) in nsec with max of +- 1 sec */
#define CMP_MACH_TIMESPEC(t1, t2) \
((t1)->tv_sec > (t2)->tv_sec ? (long) +NSEC_PER_SEC : \
((t1)->tv_sec < (t2)->tv_sec ? (long) -NSEC_PER_SEC : \
(t1)->tv_nsec - (t2)->tv_nsec))
/* t1 += t2 */
#define ADD_MACH_TIMESPEC(t1, t2) \
do { \
if (((t1)->tv_nsec += (t2)->tv_nsec) >= (long) NSEC_PER_SEC) { \
(t1)->tv_nsec -= (long) NSEC_PER_SEC; \
(t1)->tv_sec += 1; \
} \
(t1)->tv_sec += (t2)->tv_sec; \
} while (0)
/* t1 -= t2 */
#define SUB_MACH_TIMESPEC(t1, t2) \
do { \
if (((t1)->tv_nsec -= (t2)->tv_nsec) < 0) { \
(t1)->tv_nsec += (long) NSEC_PER_SEC; \
(t1)->tv_sec -= 1; \
} \
(t1)->tv_sec -= (t2)->tv_sec; \
} while (0)
/*
* Alarm parameter defines.
*/
#define ALRMTYPE 0xff /* type (8-bit field) */
#define TIME_ABSOLUTE 0x00 /* absolute time */
#define TIME_RELATIVE 0x01 /* relative time */
#define BAD_ALRMTYPE(t) (((t) &~ TIME_RELATIVE) != 0)
#endif /* _MACH_CLOCK_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/clock_reply_server.h | #ifndef _clock_reply_server_
#define _clock_reply_server_
/* Module clock_reply */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef clock_reply_MSG_COUNT
#define clock_reply_MSG_COUNT 1
#endif /* clock_reply_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine clock_alarm_reply */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t clock_alarm_reply
(
clock_reply_t alarm_port,
kern_return_t alarm_code,
alarm_type_t alarm_type,
mach_timespec_t alarm_time
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t clock_reply_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t clock_reply_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct clock_reply_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} clock_reply_subsystem;
/* typedefs for all requests */
#ifndef __Request__clock_reply_subsystem__defined
#define __Request__clock_reply_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t alarm_code;
alarm_type_t alarm_type;
mach_timespec_t alarm_time;
} __Request__clock_alarm_reply_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__clock_reply_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__clock_reply_subsystem__defined
#define __RequestUnion__clock_reply_subsystem__defined
union __RequestUnion__clock_reply_subsystem {
__Request__clock_alarm_reply_t Request_clock_alarm_reply;
};
#endif /* __RequestUnion__clock_reply_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__clock_reply_subsystem__defined
#define __Reply__clock_reply_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__clock_alarm_reply_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__clock_reply_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__clock_reply_subsystem__defined
#define __ReplyUnion__clock_reply_subsystem__defined
union __ReplyUnion__clock_reply_subsystem {
__Reply__clock_alarm_reply_t Reply_clock_alarm_reply;
};
#endif /* __ReplyUnion__clock_reply_subsystem__defined */
#ifndef subsystem_to_name_map_clock_reply
#define subsystem_to_name_map_clock_reply \
{ "clock_alarm_reply", 3125107 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _clock_reply_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/rpc.h | /*
* Copyright (c) 2002,2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach RPC Subsystem Interfaces
*/
#ifndef _MACH_RPC_H_
#define _MACH_RPC_H_
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/vm_types.h>
#include <mach/mig.h>
#include <mach/mig_errors.h>
#include <mach/machine/rpc.h>
#include <mach/thread_status.h>
/*
* These are the types for RPC-specific variants of the MIG routine
* descriptor and subsystem data types.
*
* THIS IS ONLY FOR COMPATIBILITY. WE WILL NOT BE IMPLEMENTING THIS.
*/
/*
* Basic mach rpc types.
*/
typedef unsigned int routine_arg_type;
typedef unsigned int routine_arg_offset;
typedef unsigned int routine_arg_size;
/*
* Definitions for a signature's argument and routine descriptor's.
*/
struct rpc_routine_arg_descriptor {
routine_arg_type type; /* Port, Array, etc. */
routine_arg_size size; /* element size in bytes */
routine_arg_size count; /* number of elements */
routine_arg_offset offset; /* Offset in list of routine args */
};
typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t;
struct rpc_routine_descriptor {
mig_impl_routine_t impl_routine; /* Server work func pointer */
mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */
unsigned int argc; /* Number of argument words */
unsigned int descr_count; /* Number of complex argument */
/* descriptors */
rpc_routine_arg_descriptor_t
arg_descr; /* Pointer to beginning of */
/* the arg_descr array */
unsigned int max_reply_msg; /* Max size for reply msg */
};
typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t;
#define RPC_DESCR_SIZE(x) ((x)->descr_count * \
sizeof(struct rpc_routine_arg_descriptor))
struct rpc_signature {
struct rpc_routine_descriptor rd;
struct rpc_routine_arg_descriptor rad[1];
};
#define RPC_SIGBUF_SIZE 8
/*
* A subsystem describes a set of server routines that can be invoked by
* mach_rpc() on the ports that are registered with the subsystem. For
* each routine, the routine number is given, along with the
* address of the implementation function in the server and a
* description of the arguments of the routine (it's "signature").
*
* This structure definition is only a template for what is really a
* variable-length structure (generated by MIG for each subsystem).
* The actual structures do not always have one entry in the routine
* array, and also have a varying number of entries in the arg_descr
* array. Each routine has an array of zero or more arg descriptors
* one for each complex arg. These arrays are all catenated together
* to form the arg_descr field of the subsystem struct. The
* arg_descr field of each routine entry points to a unique sub-sequence
* within this catenated array. The goal is to keep everything
* contiguous.
*/
struct rpc_subsystem {
void *reserved; /* Reserved for system use */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max mach_msg size */
vm_address_t base_addr; /* Address of this struct in user */
struct rpc_routine_descriptor /* Array of routine descriptors */
routine[1 /* Actually, (start-end+1) */
];
struct rpc_routine_arg_descriptor
arg_descriptor[1 /* Actually, the sum of the descr_ */
]; /* count fields for all routines */
};
typedef struct rpc_subsystem *rpc_subsystem_t;
#define RPC_SUBSYSTEM_NULL ((rpc_subsystem_t) 0)
#endif /* _MACH_RPC_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/upl.h | #ifndef _upl_user_
#define _upl_user_
/* Module upl */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef upl_MSG_COUNT
#define upl_MSG_COUNT 4
#endif /* upl_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine upl_abort */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t upl_abort
(
upl_t upl_object,
integer_t abort_cond
);
/* Routine upl_abort_range */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t upl_abort_range
(
upl_t upl_object,
upl_offset_t offset,
upl_size_t size,
integer_t abort_cond,
boolean_t *empty
);
/* Routine upl_commit */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t upl_commit
(
upl_t upl_object,
upl_page_info_array_t page_list,
mach_msg_type_number_t page_listCnt
);
/* Routine upl_commit_range */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t upl_commit_range
(
upl_t upl_object,
upl_offset_t offset,
upl_size_t size,
integer_t cntrl_flags,
upl_page_info_array_t page_list,
mach_msg_type_number_t page_listCnt,
boolean_t *empty
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__upl_subsystem__defined
#define __Request__upl_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
integer_t abort_cond;
} __Request__upl_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
upl_offset_t offset;
upl_size_t size;
integer_t abort_cond;
} __Request__upl_abort_range_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t page_listCnt;
upl_page_info_t page_list[256];
} __Request__upl_commit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
upl_offset_t offset;
upl_size_t size;
integer_t cntrl_flags;
mach_msg_type_number_t page_listCnt;
upl_page_info_t page_list[256];
} __Request__upl_commit_range_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__upl_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__upl_subsystem__defined
#define __RequestUnion__upl_subsystem__defined
union __RequestUnion__upl_subsystem {
__Request__upl_abort_t Request_upl_abort;
__Request__upl_abort_range_t Request_upl_abort_range;
__Request__upl_commit_t Request_upl_commit;
__Request__upl_commit_range_t Request_upl_commit_range;
};
#endif /* !__RequestUnion__upl_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__upl_subsystem__defined
#define __Reply__upl_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__upl_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
boolean_t empty;
} __Reply__upl_abort_range_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__upl_commit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
boolean_t empty;
} __Reply__upl_commit_range_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__upl_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__upl_subsystem__defined
#define __ReplyUnion__upl_subsystem__defined
union __ReplyUnion__upl_subsystem {
__Reply__upl_abort_t Reply_upl_abort;
__Reply__upl_abort_range_t Reply_upl_abort_range;
__Reply__upl_commit_t Reply_upl_commit;
__Reply__upl_commit_range_t Reply_upl_commit_range;
};
#endif /* !__RequestUnion__upl_subsystem__defined */
#ifndef subsystem_to_name_map_upl
#define subsystem_to_name_map_upl \
{ "upl_abort", 2050 },\
{ "upl_abort_range", 2051 },\
{ "upl_commit", 2052 },\
{ "upl_commit_range", 2053 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _upl_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_param.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/mach_param.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young
* Date: 1986
*
* Mach system sizing parameters
*/
#ifndef _MACH_MACH_PARAM_H_
#define _MACH_MACH_PARAM_H_
/* Number of "registered" ports */
#define TASK_PORT_REGISTER_MAX 3
/* Number of watchport for task */
#define TASK_MAX_WATCHPORT_COUNT 32
/* Number of different task port flavor */
#define TASK_SELF_PORT_COUNT 4
/* Number of different thread port flavor */
#define THREAD_SELF_PORT_COUNT 3
#endif /* _MACH_MACH_PARAM_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vfs_nspace.h | #ifndef _vfs_nspace_user_
#define _vfs_nspace_user_
/* Module vfs_nspace */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef vfs_nspace_MSG_COUNT
#define vfs_nspace_MSG_COUNT 7
#endif /* vfs_nspace_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <atm/atm_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine nspace_handle */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_nspace_handle
(
mach_port_t nspace_handler_port,
uint32_t pid,
vfs_path_t path,
int *handler_error
);
/* Routine nspace_resolve_cancel */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_nspace_resolve_cancel
(
mach_port_t nspace_handler_port,
uint32_t req_id
);
/* Routine nspace_resolve_path */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_nspace_resolve_path
(
mach_port_t nspace_handler_port,
uint32_t req_id,
uint32_t pid,
uint32_t op,
nspace_path_t path,
int *xxx_rdar44371223
);
/* Routine vfs_resolve_file */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_vfs_resolve_file
(
mach_port_t nspace_handler_port,
uint32_t req_id,
uint32_t pid,
uint32_t op,
int64_t offset,
int64_t size,
nspace_path_t path
);
/* Routine vfs_resolve_dir */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_vfs_resolve_dir
(
mach_port_t nspace_handler_port,
uint32_t req_id,
uint32_t pid,
uint32_t op,
nspace_name_t file_name,
nspace_path_t path
);
/* Routine vfs_resolve_file_with_audit_token */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_vfs_resolve_file_with_audit_token
(
mach_port_t nspace_handler_port,
uint32_t req_id,
uint32_t op,
int64_t offset,
int64_t size,
nspace_path_t path,
audit_token_t req_atoken
);
/* Routine vfs_resolve_dir_with_audit_token */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_vfs_resolve_dir_with_audit_token
(
mach_port_t nspace_handler_port,
uint32_t req_id,
uint32_t op,
nspace_name_t file_name,
nspace_path_t path,
audit_token_t req_atoken
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__vfs_nspace_subsystem__defined
#define __Request__vfs_nspace_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t pid;
vfs_path_t path;
} __Request__nspace_handle_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
} __Request__nspace_resolve_cancel_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
uint32_t pid;
uint32_t op;
nspace_path_t path;
} __Request__nspace_resolve_path_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
uint32_t pid;
uint32_t op;
int64_t offset;
int64_t size;
nspace_path_t path;
} __Request__vfs_resolve_file_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
uint32_t pid;
uint32_t op;
nspace_name_t file_name;
nspace_path_t path;
} __Request__vfs_resolve_dir_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
uint32_t op;
int64_t offset;
int64_t size;
nspace_path_t path;
audit_token_t req_atoken;
} __Request__vfs_resolve_file_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t req_id;
uint32_t op;
nspace_name_t file_name;
nspace_path_t path;
audit_token_t req_atoken;
} __Request__vfs_resolve_dir_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__vfs_nspace_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__send_vfs_nspace_subsystem__defined
#define __RequestUnion__send_vfs_nspace_subsystem__defined
union __RequestUnion__send_vfs_nspace_subsystem {
__Request__nspace_handle_t Request_send_nspace_handle;
__Request__nspace_resolve_cancel_t Request_send_nspace_resolve_cancel;
__Request__nspace_resolve_path_t Request_send_nspace_resolve_path;
__Request__vfs_resolve_file_t Request_send_vfs_resolve_file;
__Request__vfs_resolve_dir_t Request_send_vfs_resolve_dir;
__Request__vfs_resolve_file_with_audit_token_t Request_send_vfs_resolve_file_with_audit_token;
__Request__vfs_resolve_dir_with_audit_token_t Request_send_vfs_resolve_dir_with_audit_token;
};
#endif /* !__RequestUnion__send_vfs_nspace_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__vfs_nspace_subsystem__defined
#define __Reply__vfs_nspace_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int handler_error;
} __Reply__nspace_handle_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__nspace_resolve_cancel_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int xxx_rdar44371223;
} __Reply__nspace_resolve_path_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vfs_resolve_file_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vfs_resolve_dir_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vfs_resolve_file_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vfs_resolve_dir_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__vfs_nspace_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__send_vfs_nspace_subsystem__defined
#define __ReplyUnion__send_vfs_nspace_subsystem__defined
union __ReplyUnion__send_vfs_nspace_subsystem {
__Reply__nspace_handle_t Reply_send_nspace_handle;
__Reply__nspace_resolve_cancel_t Reply_send_nspace_resolve_cancel;
__Reply__nspace_resolve_path_t Reply_send_nspace_resolve_path;
__Reply__vfs_resolve_file_t Reply_send_vfs_resolve_file;
__Reply__vfs_resolve_dir_t Reply_send_vfs_resolve_dir;
__Reply__vfs_resolve_file_with_audit_token_t Reply_send_vfs_resolve_file_with_audit_token;
__Reply__vfs_resolve_dir_with_audit_token_t Reply_send_vfs_resolve_dir_with_audit_token;
};
#endif /* !__RequestUnion__send_vfs_nspace_subsystem__defined */
#ifndef subsystem_to_name_map_vfs_nspace
#define subsystem_to_name_map_vfs_nspace \
{ "nspace_handle", 867800 },\
{ "nspace_resolve_cancel", 867801 },\
{ "nspace_resolve_path", 867802 },\
{ "vfs_resolve_file", 867803 },\
{ "vfs_resolve_dir", 867804 },\
{ "vfs_resolve_file_with_audit_token", 867805 },\
{ "vfs_resolve_dir_with_audit_token", 867806 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _vfs_nspace_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/fairplayd_notification_server.h | #ifndef _fairplay_server_
#define _fairplay_server_
/* Module fairplay */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef fairplay_MSG_COUNT
#define fairplay_MSG_COUNT 1
#endif /* fairplay_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine fairplayd_arcade_request */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t fairplayd_arcade_request
(
mach_port_t fairplayd_port,
mach_port_t arcade_reg_port
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t fairplay_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t fairplay_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct fairplay_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} fairplay_subsystem;
/* typedefs for all requests */
#ifndef __Request__fairplay_subsystem__defined
#define __Request__fairplay_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t arcade_reg_port;
/* end of the kernel processed data */
} __Request__fairplayd_arcade_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__fairplay_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__fairplay_subsystem__defined
#define __RequestUnion__fairplay_subsystem__defined
union __RequestUnion__fairplay_subsystem {
__Request__fairplayd_arcade_request_t Request_fairplayd_arcade_request;
};
#endif /* __RequestUnion__fairplay_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__fairplay_subsystem__defined
#define __Reply__fairplay_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__fairplayd_arcade_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__fairplay_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__fairplay_subsystem__defined
#define __ReplyUnion__fairplay_subsystem__defined
union __ReplyUnion__fairplay_subsystem {
__Reply__fairplayd_arcade_request_t Reply_fairplayd_arcade_request;
};
#endif /* __ReplyUnion__fairplay_subsystem__defined */
#ifndef subsystem_to_name_map_fairplay
#define subsystem_to_name_map_fairplay \
{ "fairplayd_arcade_request", 41471 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _fairplay_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_entry.h | #ifndef _memory_entry_user_
#define _memory_entry_user_
/* Module memory_entry */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef memory_entry_MSG_COUNT
#define memory_entry_MSG_COUNT 3
#endif /* memory_entry_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine mach_memory_entry_purgable_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_entry_purgable_control
(
mem_entry_name_port_t mem_entry,
vm_purgable_t control,
int *state
);
/* Routine mach_memory_entry_access_tracking */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_entry_access_tracking
(
mem_entry_name_port_t mem_entry,
int *access_tracking,
uint32_t *access_tracking_reads,
uint32_t *access_tracking_writes
);
/* Routine mach_memory_entry_ownership */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_entry_ownership
(
mem_entry_name_port_t mem_entry,
task_t owner,
int ledger_tag,
int ledger_flags
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__memory_entry_subsystem__defined
#define __Request__memory_entry_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_purgable_t control;
int state;
} __Request__mach_memory_entry_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int access_tracking;
} __Request__mach_memory_entry_access_tracking_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t owner;
/* end of the kernel processed data */
NDR_record_t NDR;
int ledger_tag;
int ledger_flags;
} __Request__mach_memory_entry_ownership_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__memory_entry_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__memory_entry_subsystem__defined
#define __RequestUnion__memory_entry_subsystem__defined
union __RequestUnion__memory_entry_subsystem {
__Request__mach_memory_entry_purgable_control_t Request_mach_memory_entry_purgable_control;
__Request__mach_memory_entry_access_tracking_t Request_mach_memory_entry_access_tracking;
__Request__mach_memory_entry_ownership_t Request_mach_memory_entry_ownership;
};
#endif /* !__RequestUnion__memory_entry_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__memory_entry_subsystem__defined
#define __Reply__memory_entry_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int state;
} __Reply__mach_memory_entry_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int access_tracking;
uint32_t access_tracking_reads;
uint32_t access_tracking_writes;
} __Reply__mach_memory_entry_access_tracking_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_memory_entry_ownership_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__memory_entry_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__memory_entry_subsystem__defined
#define __ReplyUnion__memory_entry_subsystem__defined
union __ReplyUnion__memory_entry_subsystem {
__Reply__mach_memory_entry_purgable_control_t Reply_mach_memory_entry_purgable_control;
__Reply__mach_memory_entry_access_tracking_t Reply_mach_memory_entry_access_tracking;
__Reply__mach_memory_entry_ownership_t Reply_mach_memory_entry_ownership;
};
#endif /* !__RequestUnion__memory_entry_subsystem__defined */
#ifndef subsystem_to_name_map_memory_entry
#define subsystem_to_name_map_memory_entry \
{ "mach_memory_entry_purgable_control", 4900 },\
{ "mach_memory_entry_access_tracking", 4901 },\
{ "mach_memory_entry_ownership", 4902 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _memory_entry_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/notify.h | /*
* Copyright (c) 2000-2003 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/notify.h
*
* Kernel notification message definitions.
*/
#ifndef _MACH_NOTIFY_H_
#define _MACH_NOTIFY_H_
#include <mach/port.h>
#include <mach/message.h>
#include <mach/ndr.h>
/*
* An alternative specification of the notification interface
* may be found in mach/notify.defs.
*/
#define MACH_NOTIFY_FIRST 0100
#define MACH_NOTIFY_PORT_DELETED (MACH_NOTIFY_FIRST + 001)
/* A send or send-once right was deleted. */
#define MACH_NOTIFY_SEND_POSSIBLE (MACH_NOTIFY_FIRST + 002)
/* Now possible to send using specified right */
#define MACH_NOTIFY_PORT_DESTROYED (MACH_NOTIFY_FIRST + 005)
/* A receive right was (would have been) deallocated */
#define MACH_NOTIFY_NO_SENDERS (MACH_NOTIFY_FIRST + 006)
/* Receive right has no extant send rights */
#define MACH_NOTIFY_SEND_ONCE (MACH_NOTIFY_FIRST + 007)
/* An extant send-once right died */
#define MACH_NOTIFY_DEAD_NAME (MACH_NOTIFY_FIRST + 010)
/* Send or send-once right died, leaving a dead-name */
#define MACH_NOTIFY_LAST (MACH_NOTIFY_FIRST + 015)
typedef mach_port_t notify_port_t;
/*
* Hard-coded message structures for receiving Mach port notification
* messages. However, they are not actual large enough to receive
* the largest trailers current exported by Mach IPC (so they cannot
* be used for space allocations in situations using these new larger
* trailers). Instead, the MIG-generated server routines (and
* related prototypes should be used).
*/
typedef struct {
mach_msg_header_t not_header;
NDR_record_t NDR;
mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
mach_msg_format_0_trailer_t trailer;
} mach_port_deleted_notification_t;
typedef struct {
mach_msg_header_t not_header;
NDR_record_t NDR;
mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
mach_msg_format_0_trailer_t trailer;
} mach_send_possible_notification_t;
typedef struct {
mach_msg_header_t not_header;
mach_msg_body_t not_body;
mach_msg_port_descriptor_t not_port;/* MACH_MSG_TYPE_PORT_RECEIVE */
mach_msg_format_0_trailer_t trailer;
} mach_port_destroyed_notification_t;
typedef struct {
mach_msg_header_t not_header;
NDR_record_t NDR;
mach_msg_type_number_t not_count;
mach_msg_format_0_trailer_t trailer;
} mach_no_senders_notification_t;
typedef struct {
mach_msg_header_t not_header;
mach_msg_format_0_trailer_t trailer;
} mach_send_once_notification_t;
typedef struct {
mach_msg_header_t not_header;
NDR_record_t NDR;
mach_port_name_t not_port;/* MACH_MSG_TYPE_PORT_NAME */
mach_msg_format_0_trailer_t trailer;
} mach_dead_name_notification_t;
#endif /* _MACH_NOTIFY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_attributes.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/vm_attributes.h
* Author: Alessandro Forin
*
* Virtual memory attributes definitions.
*
* These definitions are in addition to the machine-independent
* ones (e.g. protection), and are only selectively supported
* on specific machine architectures.
*
*/
#ifndef _MACH_VM_ATTRIBUTES_H_
#define _MACH_VM_ATTRIBUTES_H_
/*
* Types of machine-dependent attributes
*/
typedef unsigned int vm_machine_attribute_t;
#define MATTR_CACHE 1 /* cachability */
#define MATTR_MIGRATE 2 /* migrability */
#define MATTR_REPLICATE 4 /* replicability */
/*
* Values for the above, e.g. operations on attribute
*/
typedef int vm_machine_attribute_val_t;
#define MATTR_VAL_OFF 0 /* (generic) turn attribute off */
#define MATTR_VAL_ON 1 /* (generic) turn attribute on */
#define MATTR_VAL_GET 2 /* (generic) return current value */
#define MATTR_VAL_CACHE_FLUSH 6 /* flush from all caches */
#define MATTR_VAL_DCACHE_FLUSH 7 /* flush from data caches */
#define MATTR_VAL_ICACHE_FLUSH 8 /* flush from instruction caches */
#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */
#define MATTR_VAL_CACHE_SYNC 9 /* sync I+D caches */
#define MATTR_VAL_GET_INFO 10 /* get page info (stats) */
#endif /* _MACH_VM_ATTRIBUTES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mig_strncpy_zerofill_support.h | /*
* Copyright (c) 2017 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
//This dummy header file is created for mig to check when to call mig_strncpy_zerofill.
//Mig checks if this file is available to include and knows that Libsyscall has the new mig_strncpy_zerofill symbols to link to.
//Do not delete this file, mig will stop calling mig_strncpy_zerofill.
#ifndef __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
#define __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
#endif // __MACH_MIG_STRNCPY_ZEROFILL_SUPPORT__
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/notify_server.h | #ifndef _notify_server_
#define _notify_server_
/* Module notify */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef notify_MSG_COUNT
#define notify_MSG_COUNT 9
#endif /* notify_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine mach_notify_port_deleted */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t do_mach_notify_port_deleted
(
mach_port_t notify,
mach_port_name_t name
);
/* SimpleRoutine mach_notify_port_destroyed */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t do_mach_notify_port_destroyed
(
mach_port_t notify,
mach_port_t rights
);
/* SimpleRoutine mach_notify_no_senders */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t do_mach_notify_no_senders
(
mach_port_t notify,
mach_port_mscount_t mscount
);
/* SimpleRoutine mach_notify_send_once */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t do_mach_notify_send_once
(
mach_port_t notify
);
/* SimpleRoutine mach_notify_dead_name */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t do_mach_notify_dead_name
(
mach_port_t notify,
mach_port_name_t name
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t notify_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t notify_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct do_notify_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[9];
} do_notify_subsystem;
/* typedefs for all requests */
#ifndef __Request__notify_subsystem__defined
#define __Request__notify_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_notify_port_deleted_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t rights;
/* end of the kernel processed data */
} __Request__mach_notify_port_destroyed_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_mscount_t mscount;
} __Request__mach_notify_no_senders_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_notify_send_once_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_notify_dead_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__notify_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__do_notify_subsystem__defined
#define __RequestUnion__do_notify_subsystem__defined
union __RequestUnion__do_notify_subsystem {
__Request__mach_notify_port_deleted_t Request_mach_notify_port_deleted;
__Request__mach_notify_port_destroyed_t Request_mach_notify_port_destroyed;
__Request__mach_notify_no_senders_t Request_mach_notify_no_senders;
__Request__mach_notify_send_once_t Request_mach_notify_send_once;
__Request__mach_notify_dead_name_t Request_mach_notify_dead_name;
};
#endif /* __RequestUnion__do_notify_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__notify_subsystem__defined
#define __Reply__notify_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_notify_port_deleted_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_notify_port_destroyed_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_notify_no_senders_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_notify_send_once_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_notify_dead_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__notify_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__do_notify_subsystem__defined
#define __ReplyUnion__do_notify_subsystem__defined
union __ReplyUnion__do_notify_subsystem {
__Reply__mach_notify_port_deleted_t Reply_mach_notify_port_deleted;
__Reply__mach_notify_port_destroyed_t Reply_mach_notify_port_destroyed;
__Reply__mach_notify_no_senders_t Reply_mach_notify_no_senders;
__Reply__mach_notify_send_once_t Reply_mach_notify_send_once;
__Reply__mach_notify_dead_name_t Reply_mach_notify_dead_name;
};
#endif /* __ReplyUnion__do_notify_subsystem__defined */
#ifndef subsystem_to_name_map_notify
#define subsystem_to_name_map_notify \
{ "mach_notify_port_deleted", 65 },\
{ "mach_notify_port_destroyed", 69 },\
{ "mach_notify_no_senders", 70 },\
{ "mach_notify_send_once", 71 },\
{ "mach_notify_dead_name", 72 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _notify_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mig_errors.h | /*
* Copyright (c) 2000-2007 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* Mach Interface Generator errors
*
*/
#ifndef _MACH_MIG_ERRORS_H_
#define _MACH_MIG_ERRORS_H_
#include <mach/mig.h>
#include <mach/ndr.h>
#include <mach/message.h>
#include <mach/kern_return.h>
#include <sys/cdefs.h>
/*
* These error codes should be specified as system 4, subsytem 2.
* But alas backwards compatibility makes that impossible.
* The problem is old clients of new servers (eg, the kernel)
* which get strange large error codes when there is a Mig problem
* in the server. Unfortunately, the IPC system doesn't have
* the knowledge to convert the codes in this situation.
*/
#define MIG_TYPE_ERROR -300 /* client type check failure */
#define MIG_REPLY_MISMATCH -301 /* wrong reply message ID */
#define MIG_REMOTE_ERROR -302 /* server detected error */
#define MIG_BAD_ID -303 /* bad request message ID */
#define MIG_BAD_ARGUMENTS -304 /* server type check failure */
#define MIG_NO_REPLY -305 /* no reply should be send */
#define MIG_EXCEPTION -306 /* server raised exception */
#define MIG_ARRAY_TOO_LARGE -307 /* array not large enough */
#define MIG_SERVER_DIED -308 /* server died */
#define MIG_TRAILER_ERROR -309 /* trailer has an unknown format */
/*
* Whenever MIG detects an error, it sends back a generic
* mig_reply_error_t format message. Clients must accept
* these in addition to the expected reply message format.
*/
#pragma pack(4)
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} mig_reply_error_t;
#pragma pack()
__BEGIN_DECLS
#if !defined(__NDR_convert__mig_reply_error_t__defined)
#define __NDR_convert__mig_reply_error_t__defined
static __inline__ void
__NDR_convert__mig_reply_error_t(__unused mig_reply_error_t *x)
{
#if defined(__NDR_convert__int_rep__kern_return_t__defined)
if (x->NDR.int_rep != NDR_record.int_rep) {
__NDR_convert__int_rep__kern_return_t(&x->RetCode, x->NDR.int_rep);
}
#endif /* __NDR_convert__int_rep__kern_return_t__defined */
}
#endif /* !defined(__NDR_convert__mig_reply_error_t__defined) */
__END_DECLS
#endif /* _MACH_MIG_ERRORS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/exception.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
#ifndef _MACH_EXCEPTION_H_
#define _MACH_EXCEPTION_H_
#include <mach/exception_types.h>
#endif /* _MACH_EXCEPTION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_info.h | /*
* Copyright (c) 2000-2015 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* File: mach/host_info.h
*
* Definitions for host_info call.
*/
#ifndef _MACH_HOST_INFO_H_
#define _MACH_HOST_INFO_H_
#include <mach/message.h>
#include <mach/vm_statistics.h>
#include <mach/machine.h>
#include <mach/machine/vm_types.h>
#include <mach/time_value.h>
#include <sys/cdefs.h>
/*
* Generic information structure to allow for expansion.
*/
typedef integer_t *host_info_t; /* varying array of int. */
typedef integer_t *host_info64_t; /* varying array of int. */
#define HOST_INFO_MAX (1024) /* max array size */
typedef integer_t host_info_data_t[HOST_INFO_MAX];
#define KERNEL_VERSION_MAX (512)
typedef char kernel_version_t[KERNEL_VERSION_MAX];
#define KERNEL_BOOT_INFO_MAX (4096)
typedef char kernel_boot_info_t[KERNEL_BOOT_INFO_MAX];
/*
* Currently defined information.
*/
/* host_info() */
typedef integer_t host_flavor_t;
#define HOST_BASIC_INFO 1 /* basic info */
#define HOST_SCHED_INFO 3 /* scheduling info */
#define HOST_RESOURCE_SIZES 4 /* kernel struct sizes */
#define HOST_PRIORITY_INFO 5 /* priority information */
#define HOST_SEMAPHORE_TRAPS 7 /* Has semaphore traps */
#define HOST_MACH_MSG_TRAP 8 /* Has mach_msg_trap */
#define HOST_VM_PURGABLE 9 /* purg'e'able memory info */
#define HOST_DEBUG_INFO_INTERNAL 10 /* Used for kernel internal development tests only */
#define HOST_CAN_HAS_DEBUGGER 11
#define HOST_PREFERRED_USER_ARCH 12 /* Get the preferred user-space architecture */
struct host_can_has_debugger_info {
boolean_t can_has_debugger;
};
typedef struct host_can_has_debugger_info host_can_has_debugger_info_data_t;
typedef struct host_can_has_debugger_info *host_can_has_debugger_info_t;
#define HOST_CAN_HAS_DEBUGGER_COUNT ((mach_msg_type_number_t) \
(sizeof(host_can_has_debugger_info_data_t)/sizeof(integer_t)))
#pragma pack(push, 4)
struct host_basic_info {
integer_t max_cpus; /* max number of CPUs possible */
integer_t avail_cpus; /* number of CPUs now available */
natural_t memory_size; /* size of memory in bytes, capped at 2 GB */
cpu_type_t cpu_type; /* cpu type */
cpu_subtype_t cpu_subtype; /* cpu subtype */
cpu_threadtype_t cpu_threadtype; /* cpu threadtype */
integer_t physical_cpu; /* number of physical CPUs now available */
integer_t physical_cpu_max; /* max number of physical CPUs possible */
integer_t logical_cpu; /* number of logical cpu now available */
integer_t logical_cpu_max; /* max number of physical CPUs possible */
uint64_t max_mem; /* actual size of physical memory */
};
#pragma pack(pop)
typedef struct host_basic_info host_basic_info_data_t;
typedef struct host_basic_info *host_basic_info_t;
#define HOST_BASIC_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(host_basic_info_data_t)/sizeof(integer_t)))
struct host_sched_info {
integer_t min_timeout; /* minimum timeout in milliseconds */
integer_t min_quantum; /* minimum quantum in milliseconds */
};
typedef struct host_sched_info host_sched_info_data_t;
typedef struct host_sched_info *host_sched_info_t;
#define HOST_SCHED_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(host_sched_info_data_t)/sizeof(integer_t)))
struct kernel_resource_sizes {
natural_t task;
natural_t thread;
natural_t port;
natural_t memory_region;
natural_t memory_object;
};
typedef struct kernel_resource_sizes kernel_resource_sizes_data_t;
typedef struct kernel_resource_sizes *kernel_resource_sizes_t;
#define HOST_RESOURCE_SIZES_COUNT ((mach_msg_type_number_t) \
(sizeof(kernel_resource_sizes_data_t)/sizeof(integer_t)))
struct host_priority_info {
integer_t kernel_priority;
integer_t system_priority;
integer_t server_priority;
integer_t user_priority;
integer_t depress_priority;
integer_t idle_priority;
integer_t minimum_priority;
integer_t maximum_priority;
};
typedef struct host_priority_info host_priority_info_data_t;
typedef struct host_priority_info *host_priority_info_t;
#define HOST_PRIORITY_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(host_priority_info_data_t)/sizeof(integer_t)))
/* host_statistics() */
#define HOST_LOAD_INFO 1 /* System loading stats */
#define HOST_VM_INFO 2 /* Virtual memory stats */
#define HOST_CPU_LOAD_INFO 3 /* CPU load stats */
/* host_statistics64() */
#define HOST_VM_INFO64 4 /* 64-bit virtual memory stats */
#define HOST_EXTMOD_INFO64 5 /* External modification stats */
#define HOST_EXPIRED_TASK_INFO 6 /* Statistics for expired tasks */
struct host_load_info {
integer_t avenrun[3]; /* scaled by LOAD_SCALE */
integer_t mach_factor[3]; /* scaled by LOAD_SCALE */
};
typedef struct host_load_info host_load_info_data_t;
typedef struct host_load_info *host_load_info_t;
#define HOST_LOAD_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(host_load_info_data_t)/sizeof(integer_t)))
typedef struct vm_purgeable_info host_purgable_info_data_t;
typedef struct vm_purgeable_info *host_purgable_info_t;
#define HOST_VM_PURGABLE_COUNT ((mach_msg_type_number_t) \
(sizeof(host_purgable_info_data_t)/sizeof(integer_t)))
/* in <mach/vm_statistics.h> */
/* vm_statistics64 */
#define HOST_VM_INFO64_COUNT ((mach_msg_type_number_t) \
(sizeof(vm_statistics64_data_t)/sizeof(integer_t)))
/* size of the latest version of the structure */
#define HOST_VM_INFO64_LATEST_COUNT HOST_VM_INFO64_COUNT
#define HOST_VM_INFO64_REV1_COUNT HOST_VM_INFO64_LATEST_COUNT
/* previous versions: adjust the size according to what was added each time */
#define HOST_VM_INFO64_REV0_COUNT /* added compression and swapper info (14 ints) */ \
((mach_msg_type_number_t) \
(HOST_VM_INFO64_REV1_COUNT - 14))
/* in <mach/vm_statistics.h> */
/* vm_extmod_statistics */
#define HOST_EXTMOD_INFO64_COUNT ((mach_msg_type_number_t) \
(sizeof(vm_extmod_statistics_data_t)/sizeof(integer_t)))
/* size of the latest version of the structure */
#define HOST_EXTMOD_INFO64_LATEST_COUNT HOST_EXTMOD_INFO64_COUNT
/* vm_statistics */
#define HOST_VM_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(vm_statistics_data_t)/sizeof(integer_t)))
/* size of the latest version of the structure */
#define HOST_VM_INFO_LATEST_COUNT HOST_VM_INFO_COUNT
#define HOST_VM_INFO_REV2_COUNT HOST_VM_INFO_LATEST_COUNT
/* previous versions: adjust the size according to what was added each time */
#define HOST_VM_INFO_REV1_COUNT /* added "speculative_count" (1 int) */ \
((mach_msg_type_number_t) \
(HOST_VM_INFO_REV2_COUNT - 1))
#define HOST_VM_INFO_REV0_COUNT /* added "purgable" info (2 ints) */ \
((mach_msg_type_number_t) \
(HOST_VM_INFO_REV1_COUNT - 2))
struct host_cpu_load_info { /* number of ticks while running... */
natural_t cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};
typedef struct host_cpu_load_info host_cpu_load_info_data_t;
typedef struct host_cpu_load_info *host_cpu_load_info_t;
#define HOST_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof (host_cpu_load_info_data_t) / sizeof (integer_t)))
struct host_preferred_user_arch {
cpu_type_t cpu_type; /* Preferred user-space cpu type */
cpu_subtype_t cpu_subtype; /* Preferred user-space cpu subtype */
};
typedef struct host_preferred_user_arch host_preferred_user_arch_data_t;
typedef struct host_preferred_user_arch *host_preferred_user_arch_t;
#define HOST_PREFERRED_USER_ARCH_COUNT ((mach_msg_type_number_t) \
(sizeof(host_preferred_user_arch_data_t)/sizeof(integer_t)))
#endif /* _MACH_HOST_INFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/policy.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
#ifndef _MACH_POLICY_H_
#define _MACH_POLICY_H_
/*
* mach/policy.h
*
* Definitions for scheduing policy.
*/
/*
* All interfaces defined here are obsolete.
*/
#include <mach/boolean.h>
#include <mach/message.h>
#include <mach/vm_types.h>
/*
* Old scheduling control interface
*/
typedef int policy_t;
typedef integer_t *policy_info_t;
typedef integer_t *policy_base_t;
typedef integer_t *policy_limit_t;
/*
* Policy definitions. Policies should be powers of 2,
* but cannot be or'd together other than to test for a
* policy 'class'.
*/
#define POLICY_NULL 0 /* none */
#define POLICY_TIMESHARE 1 /* timesharing */
#define POLICY_RR 2 /* fixed round robin */
#define POLICY_FIFO 4 /* fixed fifo */
#define __NEW_SCHEDULING_FRAMEWORK__
/*
* Check if policy is of 'class' fixed-priority.
*/
#define POLICYCLASS_FIXEDPRI (POLICY_RR | POLICY_FIFO)
/*
* Check if policy is valid.
*/
#define invalid_policy(policy) \
((policy) != POLICY_TIMESHARE && \
(policy) != POLICY_RR && \
(policy) != POLICY_FIFO)
/*
* Types for TIMESHARE policy
*/
struct policy_timeshare_base {
integer_t base_priority;
};
struct policy_timeshare_limit {
integer_t max_priority;
};
struct policy_timeshare_info {
integer_t max_priority;
integer_t base_priority;
integer_t cur_priority;
boolean_t depressed;
integer_t depress_priority;
};
typedef struct policy_timeshare_base *policy_timeshare_base_t;
typedef struct policy_timeshare_limit *policy_timeshare_limit_t;
typedef struct policy_timeshare_info *policy_timeshare_info_t;
typedef struct policy_timeshare_base policy_timeshare_base_data_t;
typedef struct policy_timeshare_limit policy_timeshare_limit_data_t;
typedef struct policy_timeshare_info policy_timeshare_info_data_t;
#define POLICY_TIMESHARE_BASE_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_timeshare_base)/sizeof(integer_t)))
#define POLICY_TIMESHARE_LIMIT_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_timeshare_limit)/sizeof(integer_t)))
#define POLICY_TIMESHARE_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_timeshare_info)/sizeof(integer_t)))
/*
* Types for the ROUND ROBIN (RR) policy
*/
struct policy_rr_base {
integer_t base_priority;
integer_t quantum;
};
struct policy_rr_limit {
integer_t max_priority;
};
struct policy_rr_info {
integer_t max_priority;
integer_t base_priority;
integer_t quantum;
boolean_t depressed;
integer_t depress_priority;
};
typedef struct policy_rr_base *policy_rr_base_t;
typedef struct policy_rr_limit *policy_rr_limit_t;
typedef struct policy_rr_info *policy_rr_info_t;
typedef struct policy_rr_base policy_rr_base_data_t;
typedef struct policy_rr_limit policy_rr_limit_data_t;
typedef struct policy_rr_info policy_rr_info_data_t;
#define POLICY_RR_BASE_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_rr_base)/sizeof(integer_t)))
#define POLICY_RR_LIMIT_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_rr_limit)/sizeof(integer_t)))
#define POLICY_RR_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_rr_info)/sizeof(integer_t)))
/*
* Types for the FIRST-IN-FIRST-OUT (FIFO) policy
*/
struct policy_fifo_base {
integer_t base_priority;
};
struct policy_fifo_limit {
integer_t max_priority;
};
struct policy_fifo_info {
integer_t max_priority;
integer_t base_priority;
boolean_t depressed;
integer_t depress_priority;
};
typedef struct policy_fifo_base *policy_fifo_base_t;
typedef struct policy_fifo_limit *policy_fifo_limit_t;
typedef struct policy_fifo_info *policy_fifo_info_t;
typedef struct policy_fifo_base policy_fifo_base_data_t;
typedef struct policy_fifo_limit policy_fifo_limit_data_t;
typedef struct policy_fifo_info policy_fifo_info_data_t;
#define POLICY_FIFO_BASE_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_fifo_base)/sizeof(integer_t)))
#define POLICY_FIFO_LIMIT_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_fifo_limit)/sizeof(integer_t)))
#define POLICY_FIFO_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(struct policy_fifo_info)/sizeof(integer_t)))
/*
* Aggregate policy types
*/
struct policy_bases {
policy_timeshare_base_data_t ts;
policy_rr_base_data_t rr;
policy_fifo_base_data_t fifo;
};
struct policy_limits {
policy_timeshare_limit_data_t ts;
policy_rr_limit_data_t rr;
policy_fifo_limit_data_t fifo;
};
struct policy_infos {
policy_timeshare_info_data_t ts;
policy_rr_info_data_t rr;
policy_fifo_info_data_t fifo;
};
typedef struct policy_bases policy_base_data_t;
typedef struct policy_limits policy_limit_data_t;
typedef struct policy_infos policy_info_data_t;
#endif /* _MACH_POLICY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_region.h | /*
* Copyright (c) 2000-2016 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* File: mach/vm_region.h
*
* Define the attributes of a task's memory region
*
*/
#ifndef _MACH_VM_REGION_H_
#define _MACH_VM_REGION_H_
#include <mach/boolean.h>
#include <mach/vm_prot.h>
#include <mach/vm_inherit.h>
#include <mach/vm_behavior.h>
#include <mach/vm_types.h>
#include <mach/message.h>
#include <mach/machine/vm_param.h>
#include <mach/machine/vm_types.h>
#include <mach/memory_object_types.h>
#include <sys/cdefs.h>
#pragma pack(push, 4)
// LP64todo: all the current tools are 32bit, obviously never worked for 64b
// so probably should be a real 32b ID vs. ptr.
// Current users just check for equality
typedef uint32_t vm32_object_id_t;
/*
* Types defined:
*
* vm_region_info_t memory region attributes
*/
#define VM_REGION_INFO_MAX (1024)
typedef int *vm_region_info_t;
typedef int *vm_region_info_64_t;
typedef int *vm_region_recurse_info_t;
typedef int *vm_region_recurse_info_64_t;
typedef int vm_region_flavor_t;
typedef int vm_region_info_data_t[VM_REGION_INFO_MAX];
#define VM_REGION_BASIC_INFO_64 9
struct vm_region_basic_info_64 {
vm_prot_t protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
boolean_t shared;
boolean_t reserved;
memory_object_offset_t offset;
vm_behavior_t behavior;
unsigned short user_wired_count;
};
typedef struct vm_region_basic_info_64 *vm_region_basic_info_64_t;
typedef struct vm_region_basic_info_64 vm_region_basic_info_data_64_t;
#define VM_REGION_BASIC_INFO_COUNT_64 ((mach_msg_type_number_t) \
(sizeof(vm_region_basic_info_data_64_t)/sizeof(int)))
/*
* Passing VM_REGION_BASIC_INFO to vm_region_64
* automatically converts it to a VM_REGION_BASIC_INFO_64.
* Please use that explicitly instead.
*/
#define VM_REGION_BASIC_INFO 10
/*
* This is the legacy basic info structure. It is
* deprecated because it passes only a 32-bit memory object
* offset back - too small for many larger objects (e.g. files).
*/
struct vm_region_basic_info {
vm_prot_t protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
boolean_t shared;
boolean_t reserved;
uint32_t offset; /* too small for a real offset */
vm_behavior_t behavior;
unsigned short user_wired_count;
};
typedef struct vm_region_basic_info *vm_region_basic_info_t;
typedef struct vm_region_basic_info vm_region_basic_info_data_t;
#define VM_REGION_BASIC_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(vm_region_basic_info_data_t)/sizeof(int)))
#define SM_COW 1
#define SM_PRIVATE 2
#define SM_EMPTY 3
#define SM_SHARED 4
#define SM_TRUESHARED 5
#define SM_PRIVATE_ALIASED 6
#define SM_SHARED_ALIASED 7
#define SM_LARGE_PAGE 8
/*
* For submap info, the SM flags above are overlayed when a submap
* is encountered. The field denotes whether or not machine level mapping
* information is being shared. PTE's etc. When such sharing is taking
* place the value returned is SM_TRUESHARED otherwise SM_PRIVATE is passed
* back.
*/
#define VM_REGION_EXTENDED_INFO 13
struct vm_region_extended_info {
vm_prot_t protection;
unsigned int user_tag;
unsigned int pages_resident;
unsigned int pages_shared_now_private;
unsigned int pages_swapped_out;
unsigned int pages_dirtied;
unsigned int ref_count;
unsigned short shadow_depth;
unsigned char external_pager;
unsigned char share_mode;
unsigned int pages_reusable;
};
typedef struct vm_region_extended_info *vm_region_extended_info_t;
typedef struct vm_region_extended_info vm_region_extended_info_data_t;
#define VM_REGION_EXTENDED_INFO_COUNT \
((mach_msg_type_number_t) \
(sizeof (vm_region_extended_info_data_t) / sizeof (natural_t)))
#define VM_REGION_TOP_INFO 12
struct vm_region_top_info {
unsigned int obj_id;
unsigned int ref_count;
unsigned int private_pages_resident;
unsigned int shared_pages_resident;
unsigned char share_mode;
};
typedef struct vm_region_top_info *vm_region_top_info_t;
typedef struct vm_region_top_info vm_region_top_info_data_t;
#define VM_REGION_TOP_INFO_COUNT \
((mach_msg_type_number_t) \
(sizeof(vm_region_top_info_data_t) / sizeof(natural_t)))
/*
* vm_region_submap_info will return information on a submap or object.
* The user supplies a nesting level on the call. When a walk of the
* user's map is done and a submap is encountered, the nesting count is
* checked. If the nesting count is greater than 1 the submap is entered and
* the offset relative to the address in the base map is examined. If the
* nesting count is zero, the information on the submap is returned.
* The caller may thus learn about a submap and its contents by judicious
* choice of the base map address and nesting count. The nesting count
* allows penetration of recursively mapped submaps. If a submap is
* encountered as a mapped entry of another submap, the caller may bump
* the nesting count and call vm_region_recurse again on the target address
* range. The "is_submap" field tells the caller whether or not a submap
* has been encountered.
*
* Object only fields are filled in through a walking of the object shadow
* chain (where one is present), and a walking of the resident page queue.
*
*/
struct vm_region_submap_info {
vm_prot_t protection; /* present access protection */
vm_prot_t max_protection; /* max avail through vm_prot */
vm_inherit_t inheritance;/* behavior of map/obj on fork */
uint32_t offset; /* offset into object/map */
unsigned int user_tag; /* user tag on map entry */
unsigned int pages_resident; /* only valid for objects */
unsigned int pages_shared_now_private; /* only for objects */
unsigned int pages_swapped_out; /* only for objects */
unsigned int pages_dirtied; /* only for objects */
unsigned int ref_count; /* obj/map mappers, etc */
unsigned short shadow_depth; /* only for obj */
unsigned char external_pager; /* only for obj */
unsigned char share_mode; /* see enumeration */
boolean_t is_submap; /* submap vs obj */
vm_behavior_t behavior; /* access behavior hint */
vm32_object_id_t object_id; /* obj/map name, not a handle */
unsigned short user_wired_count;
};
typedef struct vm_region_submap_info *vm_region_submap_info_t;
typedef struct vm_region_submap_info vm_region_submap_info_data_t;
#define VM_REGION_SUBMAP_INFO_COUNT \
((mach_msg_type_number_t) \
(sizeof(vm_region_submap_info_data_t) / sizeof(natural_t)))
struct vm_region_submap_info_64 {
vm_prot_t protection; /* present access protection */
vm_prot_t max_protection; /* max avail through vm_prot */
vm_inherit_t inheritance;/* behavior of map/obj on fork */
memory_object_offset_t offset; /* offset into object/map */
unsigned int user_tag; /* user tag on map entry */
unsigned int pages_resident; /* only valid for objects */
unsigned int pages_shared_now_private; /* only for objects */
unsigned int pages_swapped_out; /* only for objects */
unsigned int pages_dirtied; /* only for objects */
unsigned int ref_count; /* obj/map mappers, etc */
unsigned short shadow_depth; /* only for obj */
unsigned char external_pager; /* only for obj */
unsigned char share_mode; /* see enumeration */
boolean_t is_submap; /* submap vs obj */
vm_behavior_t behavior; /* access behavior hint */
vm32_object_id_t object_id; /* obj/map name, not a handle */
unsigned short user_wired_count;
unsigned int pages_reusable;
vm_object_id_t object_id_full;
};
typedef struct vm_region_submap_info_64 *vm_region_submap_info_64_t;
typedef struct vm_region_submap_info_64 vm_region_submap_info_data_64_t;
#define VM_REGION_SUBMAP_INFO_V2_SIZE \
(sizeof (vm_region_submap_info_data_64_t))
#define VM_REGION_SUBMAP_INFO_V1_SIZE \
(VM_REGION_SUBMAP_INFO_V2_SIZE - \
sizeof (vm_object_id_t) /* object_id_full */ )
#define VM_REGION_SUBMAP_INFO_V0_SIZE \
(VM_REGION_SUBMAP_INFO_V1_SIZE - \
sizeof (unsigned int) /* pages_reusable */ )
#define VM_REGION_SUBMAP_INFO_V2_COUNT_64 \
((mach_msg_type_number_t) \
(VM_REGION_SUBMAP_INFO_V2_SIZE / sizeof (natural_t)))
#define VM_REGION_SUBMAP_INFO_V1_COUNT_64 \
((mach_msg_type_number_t) \
(VM_REGION_SUBMAP_INFO_V1_SIZE / sizeof (natural_t)))
#define VM_REGION_SUBMAP_INFO_V0_COUNT_64 \
((mach_msg_type_number_t) \
(VM_REGION_SUBMAP_INFO_V0_SIZE / sizeof (natural_t)))
/* set this to the latest version */
#define VM_REGION_SUBMAP_INFO_COUNT_64 VM_REGION_SUBMAP_INFO_V2_COUNT_64
struct vm_region_submap_short_info_64 {
vm_prot_t protection; /* present access protection */
vm_prot_t max_protection; /* max avail through vm_prot */
vm_inherit_t inheritance;/* behavior of map/obj on fork */
memory_object_offset_t offset; /* offset into object/map */
unsigned int user_tag; /* user tag on map entry */
unsigned int ref_count; /* obj/map mappers, etc */
unsigned short shadow_depth; /* only for obj */
unsigned char external_pager; /* only for obj */
unsigned char share_mode; /* see enumeration */
boolean_t is_submap; /* submap vs obj */
vm_behavior_t behavior; /* access behavior hint */
vm32_object_id_t object_id; /* obj/map name, not a handle */
unsigned short user_wired_count;
};
typedef struct vm_region_submap_short_info_64 *vm_region_submap_short_info_64_t;
typedef struct vm_region_submap_short_info_64 vm_region_submap_short_info_data_64_t;
#define VM_REGION_SUBMAP_SHORT_INFO_COUNT_64 \
((mach_msg_type_number_t) \
(sizeof (vm_region_submap_short_info_data_64_t) / sizeof (natural_t)))
struct mach_vm_read_entry {
mach_vm_address_t address;
mach_vm_size_t size;
};
struct vm_read_entry {
vm_address_t address;
vm_size_t size;
};
#ifdef VM32_SUPPORT
struct vm32_read_entry {
vm32_address_t address;
vm32_size_t size;
};
#endif
#define VM_MAP_ENTRY_MAX (256)
typedef struct mach_vm_read_entry mach_vm_read_entry_t[VM_MAP_ENTRY_MAX];
typedef struct vm_read_entry vm_read_entry_t[VM_MAP_ENTRY_MAX];
#ifdef VM32_SUPPORT
typedef struct vm32_read_entry vm32_read_entry_t[VM_MAP_ENTRY_MAX];
#endif
#pragma pack(pop)
#define VM_PAGE_INFO_MAX
typedef int *vm_page_info_t;
typedef int vm_page_info_data_t[VM_PAGE_INFO_MAX];
typedef int vm_page_info_flavor_t;
#define VM_PAGE_INFO_BASIC 1
struct vm_page_info_basic {
int disposition;
int ref_count;
vm_object_id_t object_id;
memory_object_offset_t offset;
int depth;
int __pad; /* pad to 64-bit boundary */
};
typedef struct vm_page_info_basic *vm_page_info_basic_t;
typedef struct vm_page_info_basic vm_page_info_basic_data_t;
#define VM_PAGE_INFO_BASIC_COUNT ((mach_msg_type_number_t) \
(sizeof(vm_page_info_basic_data_t)/sizeof(int)))
#endif /*_MACH_VM_REGION_H_*/
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/arcade_upcall_server.h | #ifndef _arcade_upcall_server_
#define _arcade_upcall_server_
/* Module arcade_upcall */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef arcade_upcall_MSG_COUNT
#define arcade_upcall_MSG_COUNT 1
#endif /* arcade_upcall_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* Routine arcade_upcall */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t arcade_upcall
(
mach_port_t arcade_upcall,
vm_offset_t path,
mach_msg_type_number_t pathCnt,
uint64_t offset,
boolean_t *should_kill
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t arcade_upcall_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t arcade_upcall_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct arcade_upcall_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} arcade_upcall_subsystem;
/* typedefs for all requests */
#ifndef __Request__arcade_upcall_subsystem__defined
#define __Request__arcade_upcall_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t path;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t pathCnt;
uint64_t offset;
} __Request__arcade_upcall_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__arcade_upcall_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__arcade_upcall_subsystem__defined
#define __RequestUnion__arcade_upcall_subsystem__defined
union __RequestUnion__arcade_upcall_subsystem {
__Request__arcade_upcall_t Request_arcade_upcall;
};
#endif /* __RequestUnion__arcade_upcall_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__arcade_upcall_subsystem__defined
#define __Reply__arcade_upcall_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
boolean_t should_kill;
} __Reply__arcade_upcall_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__arcade_upcall_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__arcade_upcall_subsystem__defined
#define __ReplyUnion__arcade_upcall_subsystem__defined
union __ReplyUnion__arcade_upcall_subsystem {
__Reply__arcade_upcall_t Reply_arcade_upcall;
};
#endif /* __ReplyUnion__arcade_upcall_subsystem__defined */
#ifndef subsystem_to_name_map_arcade_upcall
#define subsystem_to_name_map_arcade_upcall \
{ "arcade_upcall", 61471 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _arcade_upcall_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/sysdiagnose_notification_server.h | #ifndef _sysdiagnose_notification_server_
#define _sysdiagnose_notification_server_
/* Module sysdiagnose_notification */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef sysdiagnose_notification_MSG_COUNT
#define sysdiagnose_notification_MSG_COUNT 2
#endif /* sysdiagnose_notification_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <atm/atm_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine sysdiagnose_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t receive_sysdiagnose_notification
(
mach_port_t sysdiagnose_port,
uint32_t flags
);
/* SimpleRoutine sysdiagnose_notification_with_audit_token */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t receive_sysdiagnose_notification_with_audit_token
(
mach_port_t sysdiagnose_port,
uint32_t flags,
audit_token_t atoken
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t sysdiagnose_notification_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t sysdiagnose_notification_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct receive_sysdiagnose_notification_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[2];
} receive_sysdiagnose_notification_subsystem;
/* typedefs for all requests */
#ifndef __Request__sysdiagnose_notification_subsystem__defined
#define __Request__sysdiagnose_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t flags;
} __Request__sysdiagnose_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t flags;
} __Request__sysdiagnose_notification_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__sysdiagnose_notification_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__receive_sysdiagnose_notification_subsystem__defined
#define __RequestUnion__receive_sysdiagnose_notification_subsystem__defined
union __RequestUnion__receive_sysdiagnose_notification_subsystem {
__Request__sysdiagnose_notification_t Request_sysdiagnose_notification;
__Request__sysdiagnose_notification_with_audit_token_t Request_sysdiagnose_notification_with_audit_token;
};
#endif /* __RequestUnion__receive_sysdiagnose_notification_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__sysdiagnose_notification_subsystem__defined
#define __Reply__sysdiagnose_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__sysdiagnose_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__sysdiagnose_notification_with_audit_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__sysdiagnose_notification_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__receive_sysdiagnose_notification_subsystem__defined
#define __ReplyUnion__receive_sysdiagnose_notification_subsystem__defined
union __ReplyUnion__receive_sysdiagnose_notification_subsystem {
__Reply__sysdiagnose_notification_t Reply_sysdiagnose_notification;
__Reply__sysdiagnose_notification_with_audit_token_t Reply_sysdiagnose_notification_with_audit_token;
};
#endif /* __ReplyUnion__receive_sysdiagnose_notification_subsystem__defined */
#ifndef subsystem_to_name_map_sysdiagnose_notification
#define subsystem_to_name_map_sysdiagnose_notification \
{ "sysdiagnose_notification", 31337 },\
{ "sysdiagnose_notification_with_audit_token", 31338 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _sysdiagnose_notification_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/shared_memory_server.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
*
* File: mach/shared_memory_server.h
*
* protos and struct definitions for shared library
* server and interface
*/
/*
* XXX
*
* NOTE: this file is deprecated and will be removed in the near future.
* Any project that includes this file should be changed to:
* 1. use <mach/shared_region.h> instead of this file,
* 2. handle the new shared regions, now available on more platforms
*/
#ifndef _MACH_SHARED_MEMORY_SERVER_H_
#define _MACH_SHARED_MEMORY_SERVER_H_
#warning "<mach/shared_memory_server.h> is deprecated. Please use <mach/shared_region.h> instead."
#include <sys/cdefs.h>
#include <mach/vm_prot.h>
#include <mach/vm_types.h>
#include <mach/mach_types.h>
#define VM_PROT_COW 0x8 /* must not interfere with normal prot assignments */
#define VM_PROT_ZF 0x10 /* must not interfere with normal prot assignments */
#ifdef __arm__
#define GLOBAL_SHARED_TEXT_SEGMENT 0x30000000U
#define GLOBAL_SHARED_DATA_SEGMENT 0x38000000U
#define GLOBAL_SHARED_SEGMENT_MASK 0xF8000000U
#define SHARED_TEXT_REGION_SIZE 0x08000000
#define SHARED_DATA_REGION_SIZE 0x08000000
#else
#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U
#define GLOBAL_SHARED_DATA_SEGMENT 0xA0000000U
#define GLOBAL_SHARED_SEGMENT_MASK 0xF0000000U
#define SHARED_TEXT_REGION_SIZE 0x10000000
#define SHARED_DATA_REGION_SIZE 0x10000000
#endif
#if !defined(__LP64__)
#define SHARED_LIBRARY_SERVER_SUPPORTED
#define SHARED_ALTERNATE_LOAD_BASE 0x09000000
/*
* Note: the two masks below are useful because the assumption is
* made that these shared regions will always be mapped on natural boundaries
* i.e. if the size is 0x10000000 the object can be mapped at
* 0x20000000, or 0x30000000, but not 0x1000000
*/
#ifdef __arm__
#define SHARED_TEXT_REGION_MASK 0x07FFFFFF
#define SHARED_DATA_REGION_MASK 0x07FFFFFF
#else
#define SHARED_TEXT_REGION_MASK 0x0FFFFFFF
#define SHARED_DATA_REGION_MASK 0x0FFFFFFF
#endif
/* flags field aliases for copyin_shared_file and load_shared_file */
/* IN */
#define ALTERNATE_LOAD_SITE 0x1
#define NEW_LOCAL_SHARED_REGIONS 0x2
#define QUERY_IS_SYSTEM_REGION 0x4
/* OUT */
#define SF_PREV_LOADED 0x1
#define SYSTEM_REGION_BACKED 0x2
struct sf_mapping {
vm_offset_t mapping_offset;
vm_size_t size;
vm_offset_t file_offset;
vm_prot_t protection; /* read/write/execute/COW/ZF */
vm_offset_t cksum;
};
typedef struct sf_mapping sf_mapping_t;
#endif /* !defined(__LP64__) */
/*
* All shared_region_* declarations are a private interface
* between dyld and the kernel.
*
*/
struct shared_region_range_np {
mach_vm_address_t srr_address;
mach_vm_size_t srr_size;
};
#endif /* _MACH_SHARED_MEMORY_SERVER_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/kern_return.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: h/kern_return.h
* Author: Avadis Tevanian, Jr.
* Date: 1985
*
* Kernel return codes.
*
*/
#ifndef _MACH_KERN_RETURN_H_
#define _MACH_KERN_RETURN_H_
#include <mach/machine/kern_return.h>
#define KERN_SUCCESS 0
#define KERN_INVALID_ADDRESS 1
/* Specified address is not currently valid.
*/
#define KERN_PROTECTION_FAILURE 2
/* Specified memory is valid, but does not permit the
* required forms of access.
*/
#define KERN_NO_SPACE 3
/* The address range specified is already in use, or
* no address range of the size specified could be
* found.
*/
#define KERN_INVALID_ARGUMENT 4
/* The function requested was not applicable to this
* type of argument, or an argument is invalid
*/
#define KERN_FAILURE 5
/* The function could not be performed. A catch-all.
*/
#define KERN_RESOURCE_SHORTAGE 6
/* A system resource could not be allocated to fulfill
* this request. This failure may not be permanent.
*/
#define KERN_NOT_RECEIVER 7
/* The task in question does not hold receive rights
* for the port argument.
*/
#define KERN_NO_ACCESS 8
/* Bogus access restriction.
*/
#define KERN_MEMORY_FAILURE 9
/* During a page fault, the target address refers to a
* memory object that has been destroyed. This
* failure is permanent.
*/
#define KERN_MEMORY_ERROR 10
/* During a page fault, the memory object indicated
* that the data could not be returned. This failure
* may be temporary; future attempts to access this
* same data may succeed, as defined by the memory
* object.
*/
#define KERN_ALREADY_IN_SET 11
/* The receive right is already a member of the portset.
*/
#define KERN_NOT_IN_SET 12
/* The receive right is not a member of a port set.
*/
#define KERN_NAME_EXISTS 13
/* The name already denotes a right in the task.
*/
#define KERN_ABORTED 14
/* The operation was aborted. Ipc code will
* catch this and reflect it as a message error.
*/
#define KERN_INVALID_NAME 15
/* The name doesn't denote a right in the task.
*/
#define KERN_INVALID_TASK 16
/* Target task isn't an active task.
*/
#define KERN_INVALID_RIGHT 17
/* The name denotes a right, but not an appropriate right.
*/
#define KERN_INVALID_VALUE 18
/* A blatant range error.
*/
#define KERN_UREFS_OVERFLOW 19
/* Operation would overflow limit on user-references.
*/
#define KERN_INVALID_CAPABILITY 20
/* The supplied (port) capability is improper.
*/
#define KERN_RIGHT_EXISTS 21
/* The task already has send or receive rights
* for the port under another name.
*/
#define KERN_INVALID_HOST 22
/* Target host isn't actually a host.
*/
#define KERN_MEMORY_PRESENT 23
/* An attempt was made to supply "precious" data
* for memory that is already present in a
* memory object.
*/
#define KERN_MEMORY_DATA_MOVED 24
/* A page was requested of a memory manager via
* memory_object_data_request for an object using
* a MEMORY_OBJECT_COPY_CALL strategy, with the
* VM_PROT_WANTS_COPY flag being used to specify
* that the page desired is for a copy of the
* object, and the memory manager has detected
* the page was pushed into a copy of the object
* while the kernel was walking the shadow chain
* from the copy to the object. This error code
* is delivered via memory_object_data_error
* and is handled by the kernel (it forces the
* kernel to restart the fault). It will not be
* seen by users.
*/
#define KERN_MEMORY_RESTART_COPY 25
/* A strategic copy was attempted of an object
* upon which a quicker copy is now possible.
* The caller should retry the copy using
* vm_object_copy_quickly. This error code
* is seen only by the kernel.
*/
#define KERN_INVALID_PROCESSOR_SET 26
/* An argument applied to assert processor set privilege
* was not a processor set control port.
*/
#define KERN_POLICY_LIMIT 27
/* The specified scheduling attributes exceed the thread's
* limits.
*/
#define KERN_INVALID_POLICY 28
/* The specified scheduling policy is not currently
* enabled for the processor set.
*/
#define KERN_INVALID_OBJECT 29
/* The external memory manager failed to initialize the
* memory object.
*/
#define KERN_ALREADY_WAITING 30
/* A thread is attempting to wait for an event for which
* there is already a waiting thread.
*/
#define KERN_DEFAULT_SET 31
/* An attempt was made to destroy the default processor
* set.
*/
#define KERN_EXCEPTION_PROTECTED 32
/* An attempt was made to fetch an exception port that is
* protected, or to abort a thread while processing a
* protected exception.
*/
#define KERN_INVALID_LEDGER 33
/* A ledger was required but not supplied.
*/
#define KERN_INVALID_MEMORY_CONTROL 34
/* The port was not a memory cache control port.
*/
#define KERN_INVALID_SECURITY 35
/* An argument supplied to assert security privilege
* was not a host security port.
*/
#define KERN_NOT_DEPRESSED 36
/* thread_depress_abort was called on a thread which
* was not currently depressed.
*/
#define KERN_TERMINATED 37
/* Object has been terminated and is no longer available
*/
#define KERN_LOCK_SET_DESTROYED 38
/* Lock set has been destroyed and is no longer available.
*/
#define KERN_LOCK_UNSTABLE 39
/* The thread holding the lock terminated before releasing
* the lock
*/
#define KERN_LOCK_OWNED 40
/* The lock is already owned by another thread
*/
#define KERN_LOCK_OWNED_SELF 41
/* The lock is already owned by the calling thread
*/
#define KERN_SEMAPHORE_DESTROYED 42
/* Semaphore has been destroyed and is no longer available.
*/
#define KERN_RPC_SERVER_TERMINATED 43
/* Return from RPC indicating the target server was
* terminated before it successfully replied
*/
#define KERN_RPC_TERMINATE_ORPHAN 44
/* Terminate an orphaned activation.
*/
#define KERN_RPC_CONTINUE_ORPHAN 45
/* Allow an orphaned activation to continue executing.
*/
#define KERN_NOT_SUPPORTED 46
/* Empty thread activation (No thread linked to it)
*/
#define KERN_NODE_DOWN 47
/* Remote node down or inaccessible.
*/
#define KERN_NOT_WAITING 48
/* A signalled thread was not actually waiting. */
#define KERN_OPERATION_TIMED_OUT 49
/* Some thread-oriented operation (semaphore_wait) timed out
*/
#define KERN_CODESIGN_ERROR 50
/* During a page fault, indicates that the page was rejected
* as a result of a signature check.
*/
#define KERN_POLICY_STATIC 51
/* The requested property cannot be changed at this time.
*/
#define KERN_INSUFFICIENT_BUFFER_SIZE 52
/* The provided buffer is of insufficient size for the requested data.
*/
#define KERN_DENIED 53
/* Denied by security policy
*/
#define KERN_MISSING_KC 54
/* The KC on which the function is operating is missing
*/
#define KERN_INVALID_KC 55
/* The KC on which the function is operating is invalid
*/
#define KERN_NOT_FOUND 56
/* A search or query operation did not return a result
*/
#define KERN_RETURN_MAX 0x100
/* Maximum return value allowable
*/
#endif /* _MACH_KERN_RETURN_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/processor.h | #ifndef _processor_user_
#define _processor_user_
/* Module processor */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef processor_MSG_COUNT
#define processor_MSG_COUNT 6
#endif /* processor_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine processor_start */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_start
(
processor_t processor
);
/* Routine processor_exit */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_exit
(
processor_t processor
);
/* Routine processor_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_info
(
processor_t processor,
processor_flavor_t flavor,
host_t *host,
processor_info_t processor_info_out,
mach_msg_type_number_t *processor_info_outCnt
);
/* Routine processor_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_control
(
processor_t processor,
processor_info_t processor_cmd,
mach_msg_type_number_t processor_cmdCnt
);
/* Routine processor_assign */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_assign
(
processor_t processor,
processor_set_t new_set,
boolean_t wait
);
/* Routine processor_get_assignment */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_get_assignment
(
processor_t processor,
processor_set_name_t *assigned_set
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__processor_subsystem__defined
#define __Request__processor_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__processor_start_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__processor_exit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
processor_flavor_t flavor;
mach_msg_type_number_t processor_info_outCnt;
} __Request__processor_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t processor_cmdCnt;
integer_t processor_cmd[20];
} __Request__processor_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_set;
/* end of the kernel processed data */
NDR_record_t NDR;
boolean_t wait;
} __Request__processor_assign_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__processor_get_assignment_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__processor_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__processor_subsystem__defined
#define __RequestUnion__processor_subsystem__defined
union __RequestUnion__processor_subsystem {
__Request__processor_start_t Request_processor_start;
__Request__processor_exit_t Request_processor_exit;
__Request__processor_info_t Request_processor_info;
__Request__processor_control_t Request_processor_control;
__Request__processor_assign_t Request_processor_assign;
__Request__processor_get_assignment_t Request_processor_get_assignment;
};
#endif /* !__RequestUnion__processor_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__processor_subsystem__defined
#define __Reply__processor_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__processor_start_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__processor_exit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t host;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t processor_info_outCnt;
integer_t processor_info_out[20];
} __Reply__processor_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__processor_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__processor_assign_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t assigned_set;
/* end of the kernel processed data */
} __Reply__processor_get_assignment_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__processor_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__processor_subsystem__defined
#define __ReplyUnion__processor_subsystem__defined
union __ReplyUnion__processor_subsystem {
__Reply__processor_start_t Reply_processor_start;
__Reply__processor_exit_t Reply_processor_exit;
__Reply__processor_info_t Reply_processor_info;
__Reply__processor_control_t Reply_processor_control;
__Reply__processor_assign_t Reply_processor_assign;
__Reply__processor_get_assignment_t Reply_processor_get_assignment;
};
#endif /* !__RequestUnion__processor_subsystem__defined */
#ifndef subsystem_to_name_map_processor
#define subsystem_to_name_map_processor \
{ "processor_start", 3000 },\
{ "processor_exit", 3001 },\
{ "processor_info", 3002 },\
{ "processor_control", 3003 },\
{ "processor_assign", 3004 },\
{ "processor_get_assignment", 3005 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _processor_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_special_ports.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/thread_special_ports.h
*
* Defines codes for special_purpose thread ports. These are NOT
* port identifiers - they are only used for the thread_get_special_port
* and thread_set_special_port routines.
*
*/
#ifndef _MACH_THREAD_SPECIAL_PORTS_H_
#define _MACH_THREAD_SPECIAL_PORTS_H_
#define THREAD_KERNEL_PORT 1 /* The full thread port for thread. */
#define THREAD_INSPECT_PORT 2 /* The inspect port for thread. */
#define THREAD_READ_PORT 3 /* The read port for thread. */
#define THREAD_MAX_SPECIAL_PORT THREAD_READ_PORT
/*
* Definitions for ease of use
*/
#define thread_get_kernel_port(thread, port) \
(thread_get_special_port((thread), THREAD_KERNEL_PORT, (port)))
#define thread_set_kernel_port(thread, port) \
(thread_set_special_port((thread), THREAD_KERNEL_PORT, (port)))
#endif /* _MACH_THREAD_SPECIAL_PORTS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_exc_server.h | #ifndef _mach_exc_server_
#define _mach_exc_server_
/* Module mach_exc */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_exc_MSG_COUNT
#define mach_exc_MSG_COUNT 4
#endif /* mach_exc_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* Routine mach_exception_raise */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_mach_exception_raise
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
mach_exception_data_t code,
mach_msg_type_number_t codeCnt
);
/* Routine mach_exception_raise_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_mach_exception_raise_state
(
mach_port_t exception_port,
exception_type_t exception,
const mach_exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
const thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
);
/* Routine mach_exception_raise_state_identity */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t catch_mach_exception_raise_state_identity
(
mach_port_t exception_port,
mach_port_t thread,
mach_port_t task,
exception_type_t exception,
mach_exception_data_t code,
mach_msg_type_number_t codeCnt,
int *flavor,
thread_state_t old_state,
mach_msg_type_number_t old_stateCnt,
thread_state_t new_state,
mach_msg_type_number_t *new_stateCnt
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t mach_exc_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t mach_exc_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct catch_mach_exc_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[4];
} catch_mach_exc_subsystem;
/* typedefs for all requests */
#ifndef __Request__mach_exc_subsystem__defined
#define __Request__mach_exc_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
int64_t code[2];
} __Request__mach_exception_raise_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
int64_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Request__mach_exception_raise_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_type_t exception;
mach_msg_type_number_t codeCnt;
int64_t code[2];
int flavor;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Request__mach_exception_raise_state_identity_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_exc_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__catch_mach_exc_subsystem__defined
#define __RequestUnion__catch_mach_exc_subsystem__defined
union __RequestUnion__catch_mach_exc_subsystem {
__Request__mach_exception_raise_t Request_mach_exception_raise;
__Request__mach_exception_raise_state_t Request_mach_exception_raise_state;
__Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity;
};
#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_exc_subsystem__defined
#define __Reply__mach_exc_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_exception_raise_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Reply__mach_exception_raise_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Reply__mach_exception_raise_state_identity_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_exc_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined
#define __ReplyUnion__catch_mach_exc_subsystem__defined
union __ReplyUnion__catch_mach_exc_subsystem {
__Reply__mach_exception_raise_t Reply_mach_exception_raise;
__Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state;
__Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity;
};
#endif /* __ReplyUnion__catch_mach_exc_subsystem__defined */
#ifndef subsystem_to_name_map_mach_exc
#define subsystem_to_name_map_mach_exc \
{ "mach_exception_raise", 2405 },\
{ "mach_exception_raise_state", 2406 },\
{ "mach_exception_raise_state_identity", 2407 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _mach_exc_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/task_special_ports.h | /*
* Copyright (c) 2000-2010 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/task_special_ports.h
*
* Defines codes for special_purpose task ports. These are NOT
* port identifiers - they are only used for the task_get_special_port
* and task_set_special_port routines.
*
*/
#ifndef _MACH_TASK_SPECIAL_PORTS_H_
#define _MACH_TASK_SPECIAL_PORTS_H_
typedef int task_special_port_t;
#define TASK_KERNEL_PORT 1 /* The full task port for task. */
#define TASK_HOST_PORT 2 /* The host (priv) port for task. */
#define TASK_NAME_PORT 3 /* The name port for task. */
#define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */
#define TASK_INSPECT_PORT 5 /* The inspect port for task. */
#define TASK_READ_PORT 6 /* The read port for task. */
/*
* Evolving and likely to change.
*/
/* Was TASK_SEATBELT_PORT 7 Seatbelt compiler/DEM port for task. */
/* Was TASK_GSSD_PORT 8 which transformed to a host port */
#define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */
#define TASK_DEBUG_CONTROL_PORT 10 /* debug control port */
#define TASK_RESOURCE_NOTIFY_PORT 11 /* overrides host special RN port */
#define TASK_MAX_SPECIAL_PORT TASK_RESOURCE_NOTIFY_PORT
/*
* Definitions for ease of use
*/
#define task_get_kernel_port(task, port) \
(task_get_special_port((task), TASK_KERNEL_PORT, (port)))
#define task_set_kernel_port(task, port) \
(task_set_special_port((task), TASK_KERNEL_PORT, (port)))
#define task_get_host_port(task, port) \
(task_get_special_port((task), TASK_HOST_PORT, (port)))
#define task_set_host_port(task, port) \
(task_set_special_port((task), TASK_HOST_PORT, (port)))
#define task_get_bootstrap_port(task, port) \
(task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
#define task_get_debug_control_port(task, port) \
(task_get_special_port((task), TASK_DEBUG_CONTROL_PORT, (port)))
#define task_set_bootstrap_port(task, port) \
(task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port)))
#define task_get_task_access_port(task, port) \
(task_get_special_port((task), TASK_ACCESS_PORT, (port)))
#define task_set_task_access_port(task, port) \
(task_set_special_port((task), TASK_ACCESS_PORT, (port)))
#define task_set_task_debug_control_port(task, port) \
(task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port)))
#endif /* _MACH_TASK_SPECIAL_PORTS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/lock_set.h | #ifndef _lock_set_user_
#define _lock_set_user_
/* Module lock_set */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef lock_set_MSG_COUNT
#define lock_set_MSG_COUNT 6
#endif /* lock_set_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine lock_acquire */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_acquire
(
lock_set_t lock_set,
int lock_id
);
/* Routine lock_release */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_release
(
lock_set_t lock_set,
int lock_id
);
/* Routine lock_try */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_try
(
lock_set_t lock_set,
int lock_id
);
/* Routine lock_make_stable */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_make_stable
(
lock_set_t lock_set,
int lock_id
);
/* Routine lock_handoff */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_handoff
(
lock_set_t lock_set,
int lock_id
);
/* Routine lock_handoff_accept */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t lock_handoff_accept
(
lock_set_t lock_set,
int lock_id
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__lock_set_subsystem__defined
#define __Request__lock_set_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_acquire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_release_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_try_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_make_stable_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_handoff_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int lock_id;
} __Request__lock_handoff_accept_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__lock_set_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__lock_set_subsystem__defined
#define __RequestUnion__lock_set_subsystem__defined
union __RequestUnion__lock_set_subsystem {
__Request__lock_acquire_t Request_lock_acquire;
__Request__lock_release_t Request_lock_release;
__Request__lock_try_t Request_lock_try;
__Request__lock_make_stable_t Request_lock_make_stable;
__Request__lock_handoff_t Request_lock_handoff;
__Request__lock_handoff_accept_t Request_lock_handoff_accept;
};
#endif /* !__RequestUnion__lock_set_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__lock_set_subsystem__defined
#define __Reply__lock_set_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_acquire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_release_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_try_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_make_stable_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_handoff_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__lock_handoff_accept_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__lock_set_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__lock_set_subsystem__defined
#define __ReplyUnion__lock_set_subsystem__defined
union __ReplyUnion__lock_set_subsystem {
__Reply__lock_acquire_t Reply_lock_acquire;
__Reply__lock_release_t Reply_lock_release;
__Reply__lock_try_t Reply_lock_try;
__Reply__lock_make_stable_t Reply_lock_make_stable;
__Reply__lock_handoff_t Reply_lock_handoff;
__Reply__lock_handoff_accept_t Reply_lock_handoff_accept;
};
#endif /* !__RequestUnion__lock_set_subsystem__defined */
#ifndef subsystem_to_name_map_lock_set
#define subsystem_to_name_map_lock_set \
{ "lock_acquire", 617000 },\
{ "lock_release", 617001 },\
{ "lock_try", 617002 },\
{ "lock_make_stable", 617003 },\
{ "lock_handoff", 617004 },\
{ "lock_handoff_accept", 617005 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _lock_set_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/semaphore.h | /*
* Copyright (c) 2000-2008 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_SEMAPHORE_H_
#define _MACH_SEMAPHORE_H_
#include <mach/port.h>
#include <mach/mach_types.h>
#include <mach/kern_return.h>
#include <mach/sync_policy.h>
/*
* Forward Declarations
*
* The semaphore creation and deallocation routines are
* defined with the Mach task APIs in <mach/task.h>.
*
* kern_return_t semaphore_create(task_t task,
* semaphore_t *new_semaphore,
* sync_policy_t policy,
* int value);
*
* kern_return_t semaphore_destroy(task_t task,
* semaphore_t semaphore);
*/
#include <sys/cdefs.h>
__BEGIN_DECLS
extern kern_return_t semaphore_signal(semaphore_t semaphore);
extern kern_return_t semaphore_signal_all(semaphore_t semaphore);
extern kern_return_t semaphore_wait(semaphore_t semaphore);
#ifdef __LP64__
#else /* __LP64__ */
extern kern_return_t semaphore_timedwait(semaphore_t semaphore,
mach_timespec_t wait_time);
#endif /* __LP64__ */
extern kern_return_t semaphore_wait_deadline(semaphore_t semaphore,
uint64_t deadline);
extern kern_return_t semaphore_wait_noblock(semaphore_t semaphore);
__END_DECLS
#endif /* _MACH_SEMAPHORE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/task_access_server.h | #ifndef _task_access_server_
#define _task_access_server_
/* Module task_access */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef task_access_MSG_COUNT
#define task_access_MSG_COUNT 3
#endif /* task_access_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* Routine check_task_access */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t check_task_access
(
mach_port_t task_access_port,
int32_t calling_pid,
uint32_t calling_gid,
int32_t target_pid,
audit_token_t caller_cred
);
/* Routine find_code_signature */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t find_code_signature
(
mach_port_t task_access_port,
int32_t new_pid
);
/* Routine check_task_access_with_flavor */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t check_task_access_with_flavor
(
mach_port_t task_access_port,
int32_t calling_pid,
uint32_t calling_gid,
int32_t target_pid,
mach_task_flavor_t flavor,
audit_token_t caller_cred
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t task_access_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t task_access_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct task_access_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[3];
} task_access_subsystem;
/* typedefs for all requests */
#ifndef __Request__task_access_subsystem__defined
#define __Request__task_access_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t calling_pid;
uint32_t calling_gid;
int32_t target_pid;
} __Request__check_task_access_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t new_pid;
} __Request__find_code_signature_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t calling_pid;
uint32_t calling_gid;
int32_t target_pid;
mach_task_flavor_t flavor;
} __Request__check_task_access_with_flavor_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__task_access_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__task_access_subsystem__defined
#define __RequestUnion__task_access_subsystem__defined
union __RequestUnion__task_access_subsystem {
__Request__check_task_access_t Request_check_task_access;
__Request__find_code_signature_t Request_find_code_signature;
__Request__check_task_access_with_flavor_t Request_check_task_access_with_flavor;
};
#endif /* __RequestUnion__task_access_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__task_access_subsystem__defined
#define __Reply__task_access_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__check_task_access_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__find_code_signature_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__check_task_access_with_flavor_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__task_access_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__task_access_subsystem__defined
#define __ReplyUnion__task_access_subsystem__defined
union __ReplyUnion__task_access_subsystem {
__Reply__check_task_access_t Reply_check_task_access;
__Reply__find_code_signature_t Reply_find_code_signature;
__Reply__check_task_access_with_flavor_t Reply_check_task_access_with_flavor;
};
#endif /* __ReplyUnion__task_access_subsystem__defined */
#ifndef subsystem_to_name_map_task_access
#define subsystem_to_name_map_task_access \
{ "check_task_access", 27000 },\
{ "find_code_signature", 27001 },\
{ "check_task_access_with_flavor", 27002 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _task_access_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/shared_region.h | /*
* Copyright (c) 2007 Apple Inc. All rights reserved.
*
* @APPLE_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.
*
* 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,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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_LICENSE_HEADER_END@
*/
/*
*
* File: mach/shared_region.h
*
* protos and struct definitions for shared region
*/
#ifndef _MACH_SHARED_REGION_H_
#define _MACH_SHARED_REGION_H_
#include <sys/cdefs.h>
#include <mach/vm_prot.h>
#include <mach/vm_types.h>
#include <mach/mach_types.h>
#define SHARED_REGION_BASE_I386 0x90000000ULL
#define SHARED_REGION_SIZE_I386 0x20000000ULL
#define SHARED_REGION_NESTING_BASE_I386 0x90000000ULL
#define SHARED_REGION_NESTING_SIZE_I386 0x20000000ULL
#define SHARED_REGION_NESTING_MIN_I386 0x00200000ULL
#define SHARED_REGION_NESTING_MAX_I386 0xFFE00000ULL
/*
* Note the shared region size here seems odd for x86.
* The size is chosen to end the address space at a boundary
* that the arm64 pmap uses for pmap->max. We use this
* limit to prevent problems with Rosetta. Given how large
* the region is now, the few fewer megabytes shouldn't matter.
*/
#define SHARED_REGION_BASE_X86_64 0x00007FF800000000ULL
#define SHARED_REGION_SIZE_X86_64 0x00000007FE000000ULL
#define SHARED_REGION_NESTING_BASE_X86_64 0x00007FF800000000ULL
#define SHARED_REGION_NESTING_SIZE_X86_64 0x00000007FE000000ULL
#define SHARED_REGION_NESTING_MIN_X86_64 0x0000000000200000ULL
#define SHARED_REGION_NESTING_MAX_X86_64 0xFFFFFFFFFFE00000ULL
#define SHARED_REGION_BASE_PPC 0x90000000ULL
#define SHARED_REGION_SIZE_PPC 0x20000000ULL
#define SHARED_REGION_NESTING_BASE_PPC 0x90000000ULL
#define SHARED_REGION_NESTING_SIZE_PPC 0x10000000ULL
#define SHARED_REGION_NESTING_MIN_PPC 0x10000000ULL
#define SHARED_REGION_NESTING_MAX_PPC 0x10000000ULL
#define SHARED_REGION_BASE_PPC64 0x00007FFF60000000ULL
#define SHARED_REGION_SIZE_PPC64 0x00000000A0000000ULL
#define SHARED_REGION_NESTING_BASE_PPC64 0x00007FFF60000000ULL
#define SHARED_REGION_NESTING_SIZE_PPC64 0x00000000A0000000ULL
#define SHARED_REGION_NESTING_MIN_PPC64 0x0000000010000000ULL
#define SHARED_REGION_NESTING_MAX_PPC64 0x0000000010000000ULL
#define SHARED_REGION_BASE_ARM 0x40000000ULL
#define SHARED_REGION_SIZE_ARM 0x40000000ULL
#define SHARED_REGION_NESTING_BASE_ARM 0x40000000ULL
#define SHARED_REGION_NESTING_SIZE_ARM 0x40000000ULL
#define SHARED_REGION_NESTING_MIN_ARM ?
#define SHARED_REGION_NESTING_MAX_ARM ?
#define SHARED_REGION_BASE_ARM64_32 0x1A000000ULL
#define SHARED_REGION_SIZE_ARM64_32 0x40000000ULL
#define SHARED_REGION_NESTING_BASE_ARM64_32 0x1A000000ULL
#define SHARED_REGION_NESTING_SIZE_ARM64_32 0x40000000ULL
#define SHARED_REGION_NESTING_MIN_ARM64_32 ?
#define SHARED_REGION_NESTING_MAX_ARM64_32 ?
#define SHARED_REGION_BASE_ARM64 0x180000000ULL
#define SHARED_REGION_SIZE_ARM64 0x100000000ULL
#define SHARED_REGION_NESTING_BASE_ARM64 SHARED_REGION_BASE_ARM64
#define SHARED_REGION_NESTING_SIZE_ARM64 SHARED_REGION_SIZE_ARM64
#define SHARED_REGION_NESTING_MIN_ARM64 ?
#define SHARED_REGION_NESTING_MAX_ARM64 ?
#if defined(__i386__)
#define SHARED_REGION_BASE SHARED_REGION_BASE_I386
#define SHARED_REGION_SIZE SHARED_REGION_SIZE_I386
#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_I386
#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_I386
#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_I386
#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_I386
#elif defined(__x86_64__)
#define SHARED_REGION_BASE SHARED_REGION_BASE_X86_64
#define SHARED_REGION_SIZE SHARED_REGION_SIZE_X86_64
#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_X86_64
#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_X86_64
#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_X86_64
#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_X86_64
#elif defined(__arm__)
#define SHARED_REGION_BASE SHARED_REGION_BASE_ARM
#define SHARED_REGION_SIZE SHARED_REGION_SIZE_ARM
#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_ARM
#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_ARM
#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_ARM
#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_ARM
#elif defined(__arm64__) && !defined(__LP64__)
#define SHARED_REGION_BASE SHARED_REGION_BASE_ARM64_32
#define SHARED_REGION_SIZE SHARED_REGION_SIZE_ARM64_32
#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_ARM64_32
#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_ARM64_32
#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_ARM64_32
#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_ARM64_32
#elif defined(__arm64__) && defined(__LP64__)
#define SHARED_REGION_BASE SHARED_REGION_BASE_ARM64
#define SHARED_REGION_SIZE SHARED_REGION_SIZE_ARM64
#define SHARED_REGION_NESTING_BASE SHARED_REGION_NESTING_BASE_ARM64
#define SHARED_REGION_NESTING_SIZE SHARED_REGION_NESTING_SIZE_ARM64
#define SHARED_REGION_NESTING_MIN SHARED_REGION_NESTING_MIN_ARM64
#define SHARED_REGION_NESTING_MAX SHARED_REGION_NESTING_MAX_ARM64
#endif
/*
* The shared_region_* declarations are a private interface between dyld and the kernel.
*/
/*
* This is used by legacy shared_region_map_and_slide_np() interface.
* We build a shared_file_mapping_slide_np from this.
*/
struct shared_file_mapping_np {
mach_vm_address_t sfm_address;
mach_vm_size_t sfm_size;
mach_vm_offset_t sfm_file_offset;
vm_prot_t sfm_max_prot;
vm_prot_t sfm_init_prot;
};
struct shared_file_mapping_slide_np {
mach_vm_address_t sms_address; /* address at which to create mapping */
mach_vm_size_t sms_size; /* size of region to map */
mach_vm_offset_t sms_file_offset; /* offset into file to be mapped */
user_addr_t sms_slide_size; /* size of data at sms_slide_start */
user_addr_t sms_slide_start; /* address from which to get relocation data */
vm_prot_t sms_max_prot; /* protections, plus flags, see below */
vm_prot_t sms_init_prot;
};
struct shared_file_np {
int sf_fd; /* file to be mapped into shared region */
uint32_t sf_mappings_count; /* number of mappings */
uint32_t sf_slide; /* distance in bytes of the slide */
};
/*
* Extensions to sfm_max_prot that identify how to handle each mapping.
* These must not interfere with normal prot assignments.
*
* VM_PROT_COW - copy on write pages
*
* VM_PROT_ZF - zero fill pages
*
* VM_PROT_SLIDE - file pages which require relocation and, on arm64e, signing
* these will be unique per shared region.
*
* VM_PROT_NOAUTH - file pages which don't require signing. When combined
* with VM_PROT_SLIDE, pages are shareable across different
* shared regions which map the same file with the same relocation info.
*/
#define VM_PROT_COW 0x08
#define VM_PROT_ZF 0x10
#define VM_PROT_SLIDE 0x20
#define VM_PROT_NOAUTH 0x40
#define VM_PROT_TRANSLATED_ALLOW_EXECUTE 0x80
#endif /* _MACH_SHARED_REGION_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/clock.h | #ifndef _clock_user_
#define _clock_user_
/* Module clock */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef clock_MSG_COUNT
#define clock_MSG_COUNT 3
#endif /* clock_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine clock_get_time */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t clock_get_time
(
clock_serv_t clock_serv,
mach_timespec_t *cur_time
);
/* Routine clock_get_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t clock_get_attributes
(
clock_serv_t clock_serv,
clock_flavor_t flavor,
clock_attr_t clock_attr,
mach_msg_type_number_t *clock_attrCnt
);
/* Routine clock_alarm */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t clock_alarm
(
clock_serv_t clock_serv,
alarm_type_t alarm_type,
mach_timespec_t alarm_time,
clock_reply_t alarm_port
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__clock_subsystem__defined
#define __Request__clock_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__clock_get_time_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
clock_flavor_t flavor;
mach_msg_type_number_t clock_attrCnt;
} __Request__clock_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t alarm_port;
/* end of the kernel processed data */
NDR_record_t NDR;
alarm_type_t alarm_type;
mach_timespec_t alarm_time;
} __Request__clock_alarm_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__clock_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__clock_subsystem__defined
#define __RequestUnion__clock_subsystem__defined
union __RequestUnion__clock_subsystem {
__Request__clock_get_time_t Request_clock_get_time;
__Request__clock_get_attributes_t Request_clock_get_attributes;
__Request__clock_alarm_t Request_clock_alarm;
};
#endif /* !__RequestUnion__clock_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__clock_subsystem__defined
#define __Reply__clock_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_timespec_t cur_time;
} __Reply__clock_get_time_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t clock_attrCnt;
int clock_attr[1];
} __Reply__clock_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__clock_alarm_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__clock_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__clock_subsystem__defined
#define __ReplyUnion__clock_subsystem__defined
union __ReplyUnion__clock_subsystem {
__Reply__clock_get_time_t Reply_clock_get_time;
__Reply__clock_get_attributes_t Reply_clock_get_attributes;
__Reply__clock_alarm_t Reply_clock_alarm;
};
#endif /* !__RequestUnion__clock_subsystem__defined */
#ifndef subsystem_to_name_map_clock
#define subsystem_to_name_map_clock \
{ "clock_get_time", 1000 },\
{ "clock_get_attributes", 1001 },\
{ "clock_alarm", 1002 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _clock_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_types.h | /*
* Copyright (c) 2000-2018 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*
*/
#ifndef _MACH_VM_TYPES_H_
#define _MACH_VM_TYPES_H_
#include <mach/port.h>
#include <mach/machine/vm_types.h>
#include <stdint.h>
#include <sys/cdefs.h>
typedef vm_offset_t pointer_t __kernel_ptr_semantics;
typedef vm_offset_t vm_address_t __kernel_ptr_semantics;
/*
* We use addr64_t for 64-bit addresses that are used on both
* 32 and 64-bit machines. On PPC, they are passed and returned as
* two adjacent 32-bit GPRs. We use addr64_t in places where
* common code must be useable both on 32 and 64-bit machines.
*/
typedef uint64_t addr64_t; /* Basic effective address */
/*
* We use reg64_t for addresses that are 32 bits on a 32-bit
* machine, and 64 bits on a 64-bit machine, but are always
* passed and returned in a single GPR on PPC. This type
* cannot be used in generic 32-bit c, since on a 64-bit
* machine the upper half of the register will be ignored
* by the c compiler in 32-bit mode. In c, we can only use the
* type in prototypes of functions that are written in and called
* from assembly language. This type is basically a comment.
*/
typedef uint32_t reg64_t;
/*
* To minimize the use of 64-bit fields, we keep some physical
* addresses (that are page aligned) as 32-bit page numbers.
* This limits the physical address space to 16TB of RAM.
*/
typedef uint32_t ppnum_t; /* Physical page number */
#define PPNUM_MAX UINT32_MAX
typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t;
#define VM_MAP_NULL ((vm_map_t) NULL)
#define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) NULL)
#define VM_MAP_READ_NULL ((vm_map_read_t) NULL)
/*
* Evolving definitions, likely to change.
*/
typedef uint64_t vm_object_offset_t;
typedef uint64_t vm_object_size_t;
typedef mach_port_t upl_t;
typedef mach_port_t vm_named_entry_t;
#define UPL_NULL ((upl_t) NULL)
#define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) NULL)
#endif /* _MACH_VM_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/task_info.h | /*
* Copyright (c) 2000-2007, 2015 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* Machine-independent task information structures and definitions.
*
* The definitions in this file are exported to the user. The kernel
* will translate its internal data structures to these structures
* as appropriate.
*
*/
#ifndef _MACH_TASK_INFO_H_
#define _MACH_TASK_INFO_H_
#include <mach/message.h>
#include <mach/machine/vm_types.h>
#include <mach/time_value.h>
#include <mach/policy.h>
#include <mach/vm_statistics.h> /* for vm_extmod_statistics_data_t */
#include <Availability.h>
#include <sys/cdefs.h>
/*
* Generic information structure to allow for expansion.
*/
typedef natural_t task_flavor_t;
typedef integer_t *task_info_t; /* varying array of int */
/* Deprecated, use per structure _data_t's instead */
#define TASK_INFO_MAX (1024) /* maximum array size */
typedef integer_t task_info_data_t[TASK_INFO_MAX];
/*
* Currently defined information structures.
*/
#pragma pack(push, 4)
/* Don't use this, use MACH_TASK_BASIC_INFO instead */
#define TASK_BASIC_INFO_32 4 /* basic information */
#define TASK_BASIC2_INFO_32 6
struct task_basic_info_32 {
integer_t suspend_count; /* suspend count for task */
natural_t virtual_size; /* virtual memory size (bytes) */
natural_t resident_size; /* resident memory size (bytes) */
time_value_t user_time; /* total user run time for
* terminated threads */
time_value_t system_time; /* total system run time for
* terminated threads */
policy_t policy; /* default policy for new threads */
};
typedef struct task_basic_info_32 task_basic_info_32_data_t;
typedef struct task_basic_info_32 *task_basic_info_32_t;
#define TASK_BASIC_INFO_32_COUNT \
(sizeof(task_basic_info_32_data_t) / sizeof(natural_t))
/* Don't use this, use MACH_TASK_BASIC_INFO instead */
struct task_basic_info_64 {
integer_t suspend_count; /* suspend count for task */
#if defined(__arm__) || defined(__arm64__)
/* Compatibility with old 32-bit mach_vm_size_t */
natural_t virtual_size; /* virtual memory size (bytes) */
natural_t resident_size; /* resident memory size (bytes) */
#else /* defined(__arm__) || defined(__arm64__) */
mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
mach_vm_size_t resident_size; /* resident memory size (bytes) */
#endif /* defined(__arm__) || defined(__arm64__) */
time_value_t user_time; /* total user run time for
* terminated threads */
time_value_t system_time; /* total system run time for
* terminated threads */
policy_t policy; /* default policy for new threads */
};
typedef struct task_basic_info_64 task_basic_info_64_data_t;
typedef struct task_basic_info_64 *task_basic_info_64_t;
#if defined(__arm__) || defined(__arm64__)
/*
* Backwards-compatibility for old mach_vm*_t types.
* The kernel knows about old and new, and if you are compiled
* to run on an earlier iOS version, you interact with the old
* (narrow) version. If you are compiled for a newer OS
* version, however, you are mapped to the wide version.
*/
#define TASK_BASIC_INFO_64 5
#define TASK_BASIC_INFO_64_COUNT \
(sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
#else /* defined(__arm__) || defined(__arm64__) */
#define TASK_BASIC_INFO_64 5 /* 64-bit capable basic info */
#define TASK_BASIC_INFO_64_COUNT \
(sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
#endif
/* localized structure - cannot be safely passed between tasks of differing sizes */
/* Don't use this, use MACH_TASK_BASIC_INFO instead */
struct task_basic_info {
integer_t suspend_count; /* suspend count for task */
vm_size_t virtual_size; /* virtual memory size (bytes) */
vm_size_t resident_size; /* resident memory size (bytes) */
time_value_t user_time; /* total user run time for
* terminated threads */
time_value_t system_time; /* total system run time for
* terminated threads */
policy_t policy; /* default policy for new threads */
};
typedef struct task_basic_info task_basic_info_data_t;
typedef struct task_basic_info *task_basic_info_t;
#define TASK_BASIC_INFO_COUNT \
(sizeof(task_basic_info_data_t) / sizeof(natural_t))
#if !defined(__LP64__)
#define TASK_BASIC_INFO TASK_BASIC_INFO_32
#else
#define TASK_BASIC_INFO TASK_BASIC_INFO_64
#endif
#define TASK_EVENTS_INFO 2 /* various event counts */
struct task_events_info {
integer_t faults; /* number of page faults */
integer_t pageins; /* number of actual pageins */
integer_t cow_faults; /* number of copy-on-write faults */
integer_t messages_sent; /* number of messages sent */
integer_t messages_received; /* number of messages received */
integer_t syscalls_mach; /* number of mach system calls */
integer_t syscalls_unix; /* number of unix system calls */
integer_t csw; /* number of context switches */
};
typedef struct task_events_info task_events_info_data_t;
typedef struct task_events_info *task_events_info_t;
#define TASK_EVENTS_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(task_events_info_data_t) / sizeof(natural_t)))
#define TASK_THREAD_TIMES_INFO 3 /* total times for live threads -
* only accurate if suspended */
struct task_thread_times_info {
time_value_t user_time; /* total user run time for
* live threads */
time_value_t system_time; /* total system run time for
* live threads */
};
typedef struct task_thread_times_info task_thread_times_info_data_t;
typedef struct task_thread_times_info *task_thread_times_info_t;
#define TASK_THREAD_TIMES_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(task_thread_times_info_data_t) / sizeof(natural_t)))
#define TASK_ABSOLUTETIME_INFO 1
struct task_absolutetime_info {
uint64_t total_user;
uint64_t total_system;
uint64_t threads_user; /* existing threads only */
uint64_t threads_system;
};
typedef struct task_absolutetime_info task_absolutetime_info_data_t;
typedef struct task_absolutetime_info *task_absolutetime_info_t;
#define TASK_ABSOLUTETIME_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof (task_absolutetime_info_data_t) / sizeof (natural_t)))
#define TASK_KERNELMEMORY_INFO 7
struct task_kernelmemory_info {
uint64_t total_palloc; /* private kernel mem alloc'ed */
uint64_t total_pfree; /* private kernel mem freed */
uint64_t total_salloc; /* shared kernel mem alloc'ed */
uint64_t total_sfree; /* shared kernel mem freed */
};
typedef struct task_kernelmemory_info task_kernelmemory_info_data_t;
typedef struct task_kernelmemory_info *task_kernelmemory_info_t;
#define TASK_KERNELMEMORY_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof (task_kernelmemory_info_data_t) / sizeof (natural_t)))
#define TASK_SECURITY_TOKEN 13
#define TASK_SECURITY_TOKEN_COUNT ((mach_msg_type_number_t) \
(sizeof(security_token_t) / sizeof(natural_t)))
#define TASK_AUDIT_TOKEN 15
#define TASK_AUDIT_TOKEN_COUNT \
(sizeof(audit_token_t) / sizeof(natural_t))
#define TASK_AFFINITY_TAG_INFO 16 /* This is experimental. */
struct task_affinity_tag_info {
integer_t set_count;
integer_t min;
integer_t max;
integer_t task_count;
};
typedef struct task_affinity_tag_info task_affinity_tag_info_data_t;
typedef struct task_affinity_tag_info *task_affinity_tag_info_t;
#define TASK_AFFINITY_TAG_INFO_COUNT \
(sizeof(task_affinity_tag_info_data_t) / sizeof(natural_t))
#define TASK_DYLD_INFO 17
struct task_dyld_info {
mach_vm_address_t all_image_info_addr;
mach_vm_size_t all_image_info_size;
integer_t all_image_info_format;
};
typedef struct task_dyld_info task_dyld_info_data_t;
typedef struct task_dyld_info *task_dyld_info_t;
#define TASK_DYLD_INFO_COUNT \
(sizeof(task_dyld_info_data_t) / sizeof(natural_t))
#define TASK_DYLD_ALL_IMAGE_INFO_32 0 /* format value */
#define TASK_DYLD_ALL_IMAGE_INFO_64 1 /* format value */
#if defined(__arm__) || defined(__arm64__)
/* Don't use this, use MACH_TASK_BASIC_INFO instead */
/* Compatibility for old 32-bit mach_vm_*_t */
#define TASK_BASIC_INFO_64_2 18 /* 64-bit capable basic info */
struct task_basic_info_64_2 {
integer_t suspend_count; /* suspend count for task */
mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
mach_vm_size_t resident_size; /* resident memory size (bytes) */
time_value_t user_time; /* total user run time for
* terminated threads */
time_value_t system_time; /* total system run time for
* terminated threads */
policy_t policy; /* default policy for new threads */
};
typedef struct task_basic_info_64_2 task_basic_info_64_2_data_t;
typedef struct task_basic_info_64_2 *task_basic_info_64_2_t;
#define TASK_BASIC_INFO_64_2_COUNT \
(sizeof(task_basic_info_64_2_data_t) / sizeof(natural_t))
#endif
#define TASK_EXTMOD_INFO 19
struct task_extmod_info {
unsigned char task_uuid[16];
vm_extmod_statistics_data_t extmod_statistics;
};
typedef struct task_extmod_info task_extmod_info_data_t;
typedef struct task_extmod_info *task_extmod_info_t;
#define TASK_EXTMOD_INFO_COUNT \
(sizeof(task_extmod_info_data_t) / sizeof(natural_t))
#define MACH_TASK_BASIC_INFO 20 /* always 64-bit basic info */
struct mach_task_basic_info {
mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
mach_vm_size_t resident_size; /* resident memory size (bytes) */
mach_vm_size_t resident_size_max; /* maximum resident memory size (bytes) */
time_value_t user_time; /* total user run time for
* terminated threads */
time_value_t system_time; /* total system run time for
* terminated threads */
policy_t policy; /* default policy for new threads */
integer_t suspend_count; /* suspend count for task */
};
typedef struct mach_task_basic_info mach_task_basic_info_data_t;
typedef struct mach_task_basic_info *mach_task_basic_info_t;
#define MACH_TASK_BASIC_INFO_COUNT \
(sizeof(mach_task_basic_info_data_t) / sizeof(natural_t))
#define TASK_POWER_INFO 21
struct task_power_info {
uint64_t total_user;
uint64_t total_system;
uint64_t task_interrupt_wakeups;
uint64_t task_platform_idle_wakeups;
uint64_t task_timer_wakeups_bin_1;
uint64_t task_timer_wakeups_bin_2;
};
typedef struct task_power_info task_power_info_data_t;
typedef struct task_power_info *task_power_info_t;
#define TASK_POWER_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof (task_power_info_data_t) / sizeof (natural_t)))
#define TASK_VM_INFO 22
#define TASK_VM_INFO_PURGEABLE 23
struct task_vm_info {
mach_vm_size_t virtual_size; /* virtual memory size (bytes) */
integer_t region_count; /* number of memory regions */
integer_t page_size;
mach_vm_size_t resident_size; /* resident memory size (bytes) */
mach_vm_size_t resident_size_peak; /* peak resident size (bytes) */
mach_vm_size_t device;
mach_vm_size_t device_peak;
mach_vm_size_t internal;
mach_vm_size_t internal_peak;
mach_vm_size_t external;
mach_vm_size_t external_peak;
mach_vm_size_t reusable;
mach_vm_size_t reusable_peak;
mach_vm_size_t purgeable_volatile_pmap;
mach_vm_size_t purgeable_volatile_resident;
mach_vm_size_t purgeable_volatile_virtual;
mach_vm_size_t compressed;
mach_vm_size_t compressed_peak;
mach_vm_size_t compressed_lifetime;
/* added for rev1 */
mach_vm_size_t phys_footprint;
/* added for rev2 */
mach_vm_address_t min_address;
mach_vm_address_t max_address;
/* added for rev3 */
int64_t ledger_phys_footprint_peak;
int64_t ledger_purgeable_nonvolatile;
int64_t ledger_purgeable_novolatile_compressed;
int64_t ledger_purgeable_volatile;
int64_t ledger_purgeable_volatile_compressed;
int64_t ledger_tag_network_nonvolatile;
int64_t ledger_tag_network_nonvolatile_compressed;
int64_t ledger_tag_network_volatile;
int64_t ledger_tag_network_volatile_compressed;
int64_t ledger_tag_media_footprint;
int64_t ledger_tag_media_footprint_compressed;
int64_t ledger_tag_media_nofootprint;
int64_t ledger_tag_media_nofootprint_compressed;
int64_t ledger_tag_graphics_footprint;
int64_t ledger_tag_graphics_footprint_compressed;
int64_t ledger_tag_graphics_nofootprint;
int64_t ledger_tag_graphics_nofootprint_compressed;
int64_t ledger_tag_neural_footprint;
int64_t ledger_tag_neural_footprint_compressed;
int64_t ledger_tag_neural_nofootprint;
int64_t ledger_tag_neural_nofootprint_compressed;
/* added for rev4 */
uint64_t limit_bytes_remaining;
/* added for rev5 */
integer_t decompressions;
};
typedef struct task_vm_info task_vm_info_data_t;
typedef struct task_vm_info *task_vm_info_t;
#define TASK_VM_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof (task_vm_info_data_t) / sizeof (natural_t)))
#define TASK_VM_INFO_REV5_COUNT TASK_VM_INFO_COUNT
#define TASK_VM_INFO_REV4_COUNT /* doesn't include decompressions */ \
((mach_msg_type_number_t) (TASK_VM_INFO_REV5_COUNT - 1))
#define TASK_VM_INFO_REV3_COUNT /* doesn't include limit bytes */ \
((mach_msg_type_number_t) (TASK_VM_INFO_REV4_COUNT - 2))
#define TASK_VM_INFO_REV2_COUNT /* doesn't include extra ledgers info */ \
((mach_msg_type_number_t) (TASK_VM_INFO_REV3_COUNT - 42))
#define TASK_VM_INFO_REV1_COUNT /* doesn't include min and max address */ \
((mach_msg_type_number_t) (TASK_VM_INFO_REV2_COUNT - 4))
#define TASK_VM_INFO_REV0_COUNT /* doesn't include phys_footprint */ \
((mach_msg_type_number_t) (TASK_VM_INFO_REV1_COUNT - 2))
typedef struct vm_purgeable_info task_purgable_info_t;
#define TASK_TRACE_MEMORY_INFO 24 /* no longer supported */
struct task_trace_memory_info {
uint64_t user_memory_address; /* address of start of trace memory buffer */
uint64_t buffer_size; /* size of buffer in bytes */
uint64_t mailbox_array_size; /* size of mailbox area in bytes */
};
typedef struct task_trace_memory_info task_trace_memory_info_data_t;
typedef struct task_trace_memory_info * task_trace_memory_info_t;
#define TASK_TRACE_MEMORY_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(task_trace_memory_info_data_t) / sizeof(natural_t)))
#define TASK_WAIT_STATE_INFO 25 /* deprecated. */
struct task_wait_state_info {
uint64_t total_wait_state_time; /* Time that all threads past and present have been in a wait state */
uint64_t total_wait_sfi_state_time; /* Time that threads have been in SFI wait (should be a subset of total wait state time */
uint32_t _reserved[4];
};
typedef struct task_wait_state_info task_wait_state_info_data_t;
typedef struct task_wait_state_info * task_wait_state_info_t;
#define TASK_WAIT_STATE_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(task_wait_state_info_data_t) / sizeof(natural_t)))
#define TASK_POWER_INFO_V2 26
typedef struct {
uint64_t task_gpu_utilisation;
uint64_t task_gpu_stat_reserved0;
uint64_t task_gpu_stat_reserved1;
uint64_t task_gpu_stat_reserved2;
} gpu_energy_data;
typedef gpu_energy_data *gpu_energy_data_t;
struct task_power_info_v2 {
task_power_info_data_t cpu_energy;
gpu_energy_data gpu_energy;
#if defined(__arm__) || defined(__arm64__)
uint64_t task_energy;
#endif /* defined(__arm__) || defined(__arm64__) */
uint64_t task_ptime;
uint64_t task_pset_switches;
};
typedef struct task_power_info_v2 task_power_info_v2_data_t;
typedef struct task_power_info_v2 *task_power_info_v2_t;
#define TASK_POWER_INFO_V2_COUNT_OLD \
((mach_msg_type_number_t) (sizeof (task_power_info_v2_data_t) - sizeof(uint64_t)*2) / sizeof (natural_t))
#define TASK_POWER_INFO_V2_COUNT \
((mach_msg_type_number_t) (sizeof (task_power_info_v2_data_t) / sizeof (natural_t)))
#define TASK_VM_INFO_PURGEABLE_ACCOUNT 27 /* Used for xnu purgeable vm unit tests */
#define TASK_FLAGS_INFO 28 /* return t_flags field */
struct task_flags_info {
uint32_t flags; /* task flags */
};
typedef struct task_flags_info task_flags_info_data_t;
typedef struct task_flags_info * task_flags_info_t;
#define TASK_FLAGS_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(task_flags_info_data_t) / sizeof (natural_t)))
#define TF_LP64 0x00000001 /* task has 64-bit addressing */
#define TF_64B_DATA 0x00000002 /* task has 64-bit data registers */
#define TASK_DEBUG_INFO_INTERNAL 29 /* Used for kernel internal development tests. */
/*
* Type to control EXC_GUARD delivery options for a task
* via task_get/set_exc_guard_behavior interface(s).
*/
typedef uint32_t task_exc_guard_behavior_t;
/* EXC_GUARD optional delivery settings on a per-task basis */
#define TASK_EXC_GUARD_NONE 0x00
#define TASK_EXC_GUARD_VM_DELIVER 0x01 /* Deliver virtual memory EXC_GUARD exceptions */
#define TASK_EXC_GUARD_VM_ONCE 0x02 /* Deliver them only once */
#define TASK_EXC_GUARD_VM_CORPSE 0x04 /* Deliver them via a forked corpse */
#define TASK_EXC_GUARD_VM_FATAL 0x08 /* Virtual Memory EXC_GUARD delivery is fatal */
#define TASK_EXC_GUARD_VM_ALL 0x0f
#define TASK_EXC_GUARD_MP_DELIVER 0x10 /* Deliver mach port EXC_GUARD exceptions */
#define TASK_EXC_GUARD_MP_ONCE 0x20 /* Deliver them only once */
#define TASK_EXC_GUARD_MP_CORPSE 0x40 /* Deliver them via a forked corpse */
#define TASK_EXC_GUARD_MP_FATAL 0x80 /* mach port EXC_GUARD delivery is fatal */
#define TASK_EXC_GUARD_MP_ALL 0xf0
#define TASK_EXC_GUARD_ALL 0xff /* All optional deliver settings */
/*
* Type to control corpse forking options for a task
* via task_get/set_corpse_forking_behavior interface(s).
*/
typedef uint32_t task_corpse_forking_behavior_t;
#define TASK_CORPSE_FORKING_DISABLED_MEM_DIAG 0x01 /* Disable corpse forking because the task is running under a diagnostic tool */
/*
* Obsolete interfaces.
*/
#define TASK_SCHED_TIMESHARE_INFO 10
#define TASK_SCHED_RR_INFO 11
#define TASK_SCHED_FIFO_INFO 12
#define TASK_SCHED_INFO 14
#pragma pack(pop)
#endif /* _MACH_TASK_INFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/iocompressionstats_notification_server.h | #ifndef _iocompressionstats_notification_server_
#define _iocompressionstats_notification_server_
/* Module iocompressionstats_notification */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef iocompressionstats_notification_MSG_COUNT
#define iocompressionstats_notification_MSG_COUNT 1
#endif /* iocompressionstats_notification_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine iocompressionstats_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t iocompressionstats_notification
(
mach_port_t iocompressionstats_port,
uint32_t flags
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t iocompressionstats_notification_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t iocompressionstats_notification_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct iocompressionstats_notification_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} iocompressionstats_notification_subsystem;
/* typedefs for all requests */
#ifndef __Request__iocompressionstats_notification_subsystem__defined
#define __Request__iocompressionstats_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t flags;
} __Request__iocompressionstats_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__iocompressionstats_notification_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__iocompressionstats_notification_subsystem__defined
#define __RequestUnion__iocompressionstats_notification_subsystem__defined
union __RequestUnion__iocompressionstats_notification_subsystem {
__Request__iocompressionstats_notification_t Request_iocompressionstats_notification;
};
#endif /* __RequestUnion__iocompressionstats_notification_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__iocompressionstats_notification_subsystem__defined
#define __Reply__iocompressionstats_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__iocompressionstats_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__iocompressionstats_notification_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__iocompressionstats_notification_subsystem__defined
#define __ReplyUnion__iocompressionstats_notification_subsystem__defined
union __ReplyUnion__iocompressionstats_notification_subsystem {
__Reply__iocompressionstats_notification_t Reply_iocompressionstats_notification;
};
#endif /* __ReplyUnion__iocompressionstats_notification_subsystem__defined */
#ifndef subsystem_to_name_map_iocompressionstats_notification
#define subsystem_to_name_map_iocompressionstats_notification \
{ "iocompressionstats_notification", 5600 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _iocompressionstats_notification_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_types.h | /*
* Copyright (c) 2000-2018 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce
* support for mandatory and extensible security protections. This notice
* is included in support of clause 2.2 (b) of the Apple Public License,
* Version 2.0.
*/
/*
* File: mach/mach_types.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young
* Date: 1986
*
* Mach external interface definitions.
*
*/
#ifndef _MACH_MACH_TYPES_H_
#define _MACH_MACH_TYPES_H_
#include <stdint.h>
#include <sys/cdefs.h>
#include <mach/host_info.h>
#include <mach/host_notify.h>
#include <mach/host_special_ports.h>
#include <mach/machine.h>
#include <mach/machine/vm_types.h>
#include <mach/memory_object_types.h>
#include <mach/message.h>
#include <mach/exception_types.h>
#include <mach/port.h>
#include <mach/mach_voucher_types.h>
#include <mach/processor_info.h>
#include <mach/task_info.h>
#include <mach/task_inspect.h>
#include <mach/task_policy.h>
#include <mach/task_special_ports.h>
#include <mach/thread_info.h>
#include <mach/thread_policy.h>
#include <mach/thread_special_ports.h>
#include <mach/thread_status.h>
#include <mach/time_value.h>
#include <mach/clock_types.h>
#include <mach/vm_attributes.h>
#include <mach/vm_inherit.h>
#include <mach/vm_purgable.h>
#include <mach/vm_behavior.h>
#include <mach/vm_prot.h>
#include <mach/vm_statistics.h>
#include <mach/vm_sync.h>
#include <mach/vm_types.h>
#include <mach/vm_region.h>
#include <mach/kmod.h>
#include <mach/dyld_kernel.h>
#include <mach/vm_param.h>
/*
* If we are in the kernel, then pick up the kernel definitions for
* the basic mach types.
*/
typedef struct task *task_t, *task_name_t, *task_inspect_t, *task_read_t, *task_suspension_token_t, *task_policy_set_t, *task_policy_get_t;
typedef struct thread *thread_t, *thread_act_t, *thread_inspect_t, *thread_read_t;
typedef struct ipc_space *ipc_space_t, *ipc_space_read_t, *ipc_space_inspect_t;
typedef struct coalition *coalition_t;
typedef struct host *host_t;
typedef struct host *host_priv_t;
typedef struct host *host_security_t;
typedef struct processor *processor_t;
typedef struct processor_set *processor_set_t;
typedef struct processor_set *processor_set_control_t;
typedef struct semaphore *semaphore_t;
typedef struct ledger *ledger_t;
typedef struct alarm *alarm_t;
typedef struct clock *clock_serv_t;
typedef struct clock *clock_ctrl_t;
typedef struct arcade_register *arcade_register_t;
typedef struct ipc_eventlink *ipc_eventlink_t;
typedef struct ipc_port *eventlink_port_pair_t[2];
typedef struct suid_cred *suid_cred_t;
typedef struct task_id_token *task_id_token_t;
/*
* OBSOLETE: lock_set interfaces are obsolete.
*/
typedef struct lock_set *lock_set_t;
struct lock_set;
__BEGIN_DECLS
struct task;
struct thread;
struct host;
struct processor;
struct processor_set;
struct semaphore;
struct ledger;
struct alarm;
struct clock;
struct arcade_register;
struct ipc_eventlink;
struct ipc_port;
struct suid_cred;
__END_DECLS
/*
* These aren't really unique types. They are just called
* out as unique types at one point in history. So we list
* them here for compatibility.
*/
typedef processor_set_t processor_set_name_t;
/*
* These types are just hard-coded as ports
*/
typedef mach_port_t clock_reply_t;
typedef mach_port_t bootstrap_t;
typedef mach_port_t mem_entry_name_port_t;
typedef mach_port_t exception_handler_t;
typedef exception_handler_t *exception_handler_array_t;
typedef mach_port_t vm_task_entry_t;
typedef mach_port_t io_master_t;
typedef mach_port_t UNDServerRef;
typedef mach_port_t mach_eventlink_t;
typedef ipc_info_port_t exception_handler_info_t;
/*
* Mig doesn't translate the components of an array.
* For example, Mig won't use the thread_t translations
* to translate a thread_array_t argument. So, these definitions
* are not completely accurate at the moment for other kernel
* components.
*/
typedef task_t *task_array_t;
typedef thread_t *thread_array_t;
typedef processor_set_t *processor_set_array_t;
typedef processor_set_t *processor_set_name_array_t;
typedef processor_t *processor_array_t;
typedef thread_act_t *thread_act_array_t;
typedef ledger_t *ledger_array_t;
/*
* However the real mach_types got declared, we also have to declare
* types with "port" in the name for compatability with the way OSF
* had declared the user interfaces at one point. Someday these should
* go away.
*/
typedef task_t task_port_t;
typedef task_array_t task_port_array_t;
typedef thread_t thread_port_t;
typedef thread_array_t thread_port_array_t;
typedef ipc_space_t ipc_space_port_t;
typedef host_t host_name_t;
typedef host_t host_name_port_t;
typedef processor_set_t processor_set_port_t;
typedef processor_set_t processor_set_name_port_t;
typedef processor_set_array_t processor_set_name_port_array_t;
typedef processor_set_t processor_set_control_port_t;
typedef processor_t processor_port_t;
typedef processor_array_t processor_port_array_t;
typedef thread_act_t thread_act_port_t;
typedef thread_act_array_t thread_act_port_array_t;
typedef semaphore_t semaphore_port_t;
typedef lock_set_t lock_set_port_t;
typedef ledger_t ledger_port_t;
typedef ledger_array_t ledger_port_array_t;
typedef alarm_t alarm_port_t;
typedef clock_serv_t clock_serv_port_t;
typedef clock_ctrl_t clock_ctrl_port_t;
typedef exception_handler_t exception_port_t;
typedef exception_handler_array_t exception_port_arrary_t;
typedef char vfs_path_t[4096];
typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */
typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */
typedef char suid_cred_path_t[1024];
typedef uint32_t suid_cred_uid_t;
#define TASK_NULL ((task_t) NULL)
#define TASK_NAME_NULL ((task_name_t) NULL)
#define TASK_INSPECT_NULL ((task_inspect_t) NULL)
#define TASK_READ_NULL ((task_read_t) NULL)
#define THREAD_NULL ((thread_t) NULL)
#define THREAD_INSPECT_NULL ((thread_inspect_t)NULL)
#define THREAD_READ_NULL ((thread_read_t)NULL)
#define TID_NULL ((uint64_t) NULL)
#define THR_ACT_NULL ((thread_act_t) NULL)
#define IPC_SPACE_NULL ((ipc_space_t) NULL)
#define IPC_SPACE_READ_NULL ((ipc_space_read_t) NULL)
#define IPC_SPACE_INSPECT_NULL ((ipc_space_inspect_t) NULL)
#define COALITION_NULL ((coalition_t) NULL)
#define HOST_NULL ((host_t) NULL)
#define HOST_PRIV_NULL ((host_priv_t)NULL)
#define HOST_SECURITY_NULL ((host_security_t)NULL)
#define PROCESSOR_SET_NULL ((processor_set_t) NULL)
#define PROCESSOR_NULL ((processor_t) NULL)
#define SEMAPHORE_NULL ((semaphore_t) NULL)
#define LOCK_SET_NULL ((lock_set_t) NULL)
#define LEDGER_NULL ((ledger_t) NULL)
#define ALARM_NULL ((alarm_t) NULL)
#define CLOCK_NULL ((clock_t) NULL)
#define UND_SERVER_NULL ((UNDServerRef) NULL)
#define ARCADE_REG_NULL ((arcade_register_t) NULL)
#define MACH_EVENTLINK_NULL ((mach_eventlink_t) 0)
#define IPC_EVENTLINK_NULL ((ipc_eventlink_t) NULL)
#define SUID_CRED_NULL ((suid_cred_t) NULL)
#define TASK_ID_TOKEN_NULL ((task_id_token_t) NULL)
/* capability strictly _DECREASING_.
* not ordered the other way around because we want TASK_FLAVOR_CONTROL
* to be closest to the itk_lock. see task.h.
*/
typedef unsigned int mach_task_flavor_t;
#define TASK_FLAVOR_CONTROL 0 /* a task_t */
#define TASK_FLAVOR_READ 1 /* a task_read_t */
#define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */
#define TASK_FLAVOR_NAME 3 /* a task_name_t */
#define TASK_FLAVOR_MAX TASK_FLAVOR_NAME
/* capability strictly _DECREASING_ */
typedef unsigned int mach_thread_flavor_t;
#define THREAD_FLAVOR_CONTROL 0 /* a thread_t */
#define THREAD_FLAVOR_READ 1 /* a thread_read_t */
#define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */
#define THREAD_FLAVOR_MAX THREAD_FLAVOR_INSPECT
/* DEPRECATED */
typedef natural_t ledger_item_t;
#define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0))
typedef int64_t ledger_amount_t;
#define LEDGER_LIMIT_INFINITY ((ledger_amount_t)((1ULL << 63) - 1))
typedef mach_vm_offset_t *emulation_vector_t;
typedef char *user_subsystem_t;
typedef char *labelstr_t;
/*
* Backwards compatibility, for those programs written
* before mach/{std,mach}_types.{defs,h} were set up.
*/
#include <mach/std_types.h>
#endif /* _MACH_MACH_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/boolean.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/boolean.h
*
* Boolean data type.
*
*/
#ifndef _MACH_BOOLEAN_H_
#define _MACH_BOOLEAN_H_
/*
* Pick up "boolean_t" type definition
*/
#ifndef ASSEMBLER
#include <mach/machine/boolean.h>
#endif /* ASSEMBLER */
/*
* Define TRUE and FALSE if not defined.
*/
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#endif /* _MACH_BOOLEAN_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/ktrace_background.h | #ifndef _ktrace_background_user_
#define _ktrace_background_user_
/* Module ktrace_background */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef ktrace_background_MSG_COUNT
#define ktrace_background_MSG_COUNT 1
#endif /* ktrace_background_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* SimpleRoutine ktrace_background_available */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t send_ktrace_background_available
(
mach_port_t ktrace_background_port
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__ktrace_background_subsystem__defined
#define __Request__ktrace_background_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__ktrace_background_available_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__ktrace_background_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__send_ktrace_background_subsystem__defined
#define __RequestUnion__send_ktrace_background_subsystem__defined
union __RequestUnion__send_ktrace_background_subsystem {
__Request__ktrace_background_available_t Request_send_ktrace_background_available;
};
#endif /* !__RequestUnion__send_ktrace_background_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__ktrace_background_subsystem__defined
#define __Reply__ktrace_background_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__ktrace_background_available_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__ktrace_background_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__send_ktrace_background_subsystem__defined
#define __ReplyUnion__send_ktrace_background_subsystem__defined
union __ReplyUnion__send_ktrace_background_subsystem {
__Reply__ktrace_background_available_t Reply_send_ktrace_background_available;
};
#endif /* !__RequestUnion__send_ktrace_background_subsystem__defined */
#ifndef subsystem_to_name_map_ktrace_background
#define subsystem_to_name_map_ktrace_background \
{ "ktrace_background_available", 670 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _ktrace_background_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/telemetry_notification_server.h | #ifndef _telemetry_notification_server_
#define _telemetry_notification_server_
/* Module telemetry_notification */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef telemetry_notification_MSG_COUNT
#define telemetry_notification_MSG_COUNT 1
#endif /* telemetry_notification_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* SimpleRoutine telemetry_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t telemetry_notification
(
mach_port_t telemetry_port,
uint32_t flags
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t telemetry_notification_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t telemetry_notification_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct telemetry_notification_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} telemetry_notification_subsystem;
/* typedefs for all requests */
#ifndef __Request__telemetry_notification_subsystem__defined
#define __Request__telemetry_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t flags;
} __Request__telemetry_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__telemetry_notification_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__telemetry_notification_subsystem__defined
#define __RequestUnion__telemetry_notification_subsystem__defined
union __RequestUnion__telemetry_notification_subsystem {
__Request__telemetry_notification_t Request_telemetry_notification;
};
#endif /* __RequestUnion__telemetry_notification_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__telemetry_notification_subsystem__defined
#define __Reply__telemetry_notification_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__telemetry_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__telemetry_notification_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__telemetry_notification_subsystem__defined
#define __ReplyUnion__telemetry_notification_subsystem__defined
union __ReplyUnion__telemetry_notification_subsystem {
__Reply__telemetry_notification_t Reply_telemetry_notification;
};
#endif /* __ReplyUnion__telemetry_notification_subsystem__defined */
#ifndef subsystem_to_name_map_telemetry_notification
#define subsystem_to_name_map_telemetry_notification \
{ "telemetry_notification", 5100 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _telemetry_notification_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/std_types.h | /*
* Copyright (c) 2002,2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* Mach standard external interface type definitions.
*
*/
#ifndef _MACH_STD_TYPES_H_
#define _MACH_STD_TYPES_H_
#include <stdint.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/port.h>
#include <mach/vm_types.h>
#include <sys/_types.h>
#include <sys/_types/_uuid_t.h>
#endif /* _MACH_STD_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/time_value.h | /*
* Copyright (c) 2000 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
#ifndef _MACH_TIME_VALUE_H_
#define _MACH_TIME_VALUE_H_
#include <mach/machine/vm_types.h>
/*
* Time value returned by kernel.
*/
struct time_value {
integer_t seconds;
integer_t microseconds;
};
typedef struct time_value time_value_t;
/*
* Macros to manipulate time values. Assume that time values
* are normalized (microseconds <= 999999).
*/
#define TIME_MICROS_MAX (1000000)
#define time_value_add_usec(val, micros) { \
if (((val)->microseconds += (micros)) \
>= TIME_MICROS_MAX) { \
(val)->microseconds -= TIME_MICROS_MAX; \
(val)->seconds++; \
} \
}
#define time_value_add(result, addend) { \
(result)->microseconds += (addend)->microseconds; \
(result)->seconds += (addend)->seconds; \
if ((result)->microseconds >= TIME_MICROS_MAX) { \
(result)->microseconds -= TIME_MICROS_MAX; \
(result)->seconds++; \
} \
}
#endif /* _MACH_TIME_VALUE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_inherit.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/vm_inherit.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young
*
* Virtual memory map inheritance definitions.
*
*/
#ifndef _MACH_VM_INHERIT_H_
#define _MACH_VM_INHERIT_H_
/*
* Types defined:
*
* vm_inherit_t inheritance codes.
*/
typedef unsigned int vm_inherit_t; /* might want to change this */
/*
* Enumeration of valid values for vm_inherit_t.
*/
#define VM_INHERIT_SHARE ((vm_inherit_t) 0) /* share with child */
#define VM_INHERIT_COPY ((vm_inherit_t) 1) /* copy into child */
#define VM_INHERIT_NONE ((vm_inherit_t) 2) /* absent from child */
#define VM_INHERIT_DONATE_COPY ((vm_inherit_t) 3) /* copy and delete */
#define VM_INHERIT_DEFAULT VM_INHERIT_COPY
#define VM_INHERIT_LAST_VALID VM_INHERIT_NONE
#endif /* _MACH_VM_INHERIT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/sync_policy.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
#ifndef _MACH_SYNC_POLICY_H_
#define _MACH_SYNC_POLICY_H_
typedef int sync_policy_t;
/*
* These options define the wait ordering of the synchronizers
*/
#define SYNC_POLICY_FIFO 0x0
#define SYNC_POLICY_FIXED_PRIORITY 0x1
#define SYNC_POLICY_REVERSED 0x2
#define SYNC_POLICY_ORDER_MASK 0x3
#define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED)
#endif /* _MACH_SYNC_POLICY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_priv.h | #ifndef _host_priv_user_
#define _host_priv_user_
/* Module host_priv */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef host_priv_MSG_COUNT
#define host_priv_MSG_COUNT 26
#endif /* host_priv_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine host_get_boot_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_boot_info
(
host_priv_t host_priv,
kernel_boot_info_t boot_info
);
/* Routine host_reboot */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_reboot
(
host_priv_t host_priv,
int options
);
/* Routine host_priv_statistics */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_priv_statistics
(
host_priv_t host_priv,
host_flavor_t flavor,
host_info_t host_info_out,
mach_msg_type_number_t *host_info_outCnt
);
/* Routine host_default_memory_manager */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_default_memory_manager
(
host_priv_t host_priv,
memory_object_default_t *default_manager,
memory_object_cluster_size_t cluster_size
);
/* Routine vm_wire */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_wire
(
host_priv_t host_priv,
vm_map_t task,
vm_address_t address,
vm_size_t size,
vm_prot_t desired_access
);
/* Routine thread_wire */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_wire
(
host_priv_t host_priv,
thread_act_t thread,
boolean_t wired
);
/* Routine vm_allocate_cpm */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_allocate_cpm
(
host_priv_t host_priv,
vm_map_t task,
vm_address_t *address,
vm_size_t size,
int flags
);
/* Routine host_processors */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_processors
(
host_priv_t host_priv,
processor_array_t *out_processor_list,
mach_msg_type_number_t *out_processor_listCnt
);
/* Routine host_get_clock_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_clock_control
(
host_priv_t host_priv,
clock_id_t clock_id,
clock_ctrl_t *clock_ctrl
);
/* Routine kmod_create */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t kmod_create
(
host_priv_t host_priv,
vm_address_t info,
kmod_t *module
);
/* Routine kmod_destroy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t kmod_destroy
(
host_priv_t host_priv,
kmod_t module
);
/* Routine kmod_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t kmod_control
(
host_priv_t host_priv,
kmod_t module,
kmod_control_flavor_t flavor,
kmod_args_t *data,
mach_msg_type_number_t *dataCnt
);
/* Routine host_get_special_port */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_special_port
(
host_priv_t host_priv,
int node,
int which,
mach_port_t *port
);
/* Routine host_set_special_port */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_set_special_port
(
host_priv_t host_priv,
int which,
mach_port_t port
);
/* Routine host_set_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_set_exception_ports
(
host_priv_t host_priv,
exception_mask_t exception_mask,
mach_port_t new_port,
exception_behavior_t behavior,
thread_state_flavor_t new_flavor
);
/* Routine host_get_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_exception_ports
(
host_priv_t host_priv,
exception_mask_t exception_mask,
exception_mask_array_t masks,
mach_msg_type_number_t *masksCnt,
exception_handler_array_t old_handlers,
exception_behavior_array_t old_behaviors,
exception_flavor_array_t old_flavors
);
/* Routine host_swap_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_swap_exception_ports
(
host_priv_t host_priv,
exception_mask_t exception_mask,
mach_port_t new_port,
exception_behavior_t behavior,
thread_state_flavor_t new_flavor,
exception_mask_array_t masks,
mach_msg_type_number_t *masksCnt,
exception_handler_array_t old_handlerss,
exception_behavior_array_t old_behaviors,
exception_flavor_array_t old_flavors
);
/* Routine mach_vm_wire */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_wire
(
host_priv_t host_priv,
vm_map_t task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_prot_t desired_access
);
/* Routine host_processor_sets */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_processor_sets
(
host_priv_t host_priv,
processor_set_name_array_t *processor_sets,
mach_msg_type_number_t *processor_setsCnt
);
/* Routine host_processor_set_priv */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_processor_set_priv
(
host_priv_t host_priv,
processor_set_name_t set_name,
processor_set_t *set
);
/* Routine host_set_UNDServer */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_set_UNDServer
(
host_priv_t host,
UNDServerRef server
);
/* Routine host_get_UNDServer */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_UNDServer
(
host_priv_t host,
UNDServerRef *server
);
/* Routine kext_request */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t kext_request
(
host_priv_t host_priv,
uint32_t user_log_flags,
vm_offset_t request_data,
mach_msg_type_number_t request_dataCnt,
vm_offset_t *response_data,
mach_msg_type_number_t *response_dataCnt,
vm_offset_t *log_data,
mach_msg_type_number_t *log_dataCnt,
kern_return_t *op_result
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__host_priv_subsystem__defined
#define __Request__host_priv_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_get_boot_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int options;
} __Request__host_reboot_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
host_flavor_t flavor;
mach_msg_type_number_t host_info_outCnt;
} __Request__host_priv_statistics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t default_manager;
/* end of the kernel processed data */
NDR_record_t NDR;
memory_object_cluster_size_t cluster_size;
} __Request__host_default_memory_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_prot_t desired_access;
} __Request__vm_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t thread;
/* end of the kernel processed data */
NDR_record_t NDR;
boolean_t wired;
} __Request__thread_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
int flags;
} __Request__vm_allocate_cpm_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_processors_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
clock_id_t clock_id;
} __Request__host_get_clock_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t info;
} __Request__kmod_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kmod_t module;
} __Request__kmod_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
kmod_t module;
kmod_control_flavor_t flavor;
mach_msg_type_number_t dataCnt;
} __Request__kmod_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int node;
int which;
} __Request__host_get_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t port;
/* end of the kernel processed data */
NDR_record_t NDR;
int which;
} __Request__host_set_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_port;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_mask_t exception_mask;
exception_behavior_t behavior;
thread_state_flavor_t new_flavor;
} __Request__host_set_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_mask_t exception_mask;
} __Request__host_get_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_port;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_mask_t exception_mask;
exception_behavior_t behavior;
thread_state_flavor_t new_flavor;
} __Request__host_swap_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t task;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
vm_prot_t desired_access;
} __Request__mach_vm_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_processor_sets_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t set_name;
/* end of the kernel processed data */
} __Request__host_processor_set_priv_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t server;
/* end of the kernel processed data */
} __Request__host_set_UNDServer_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_get_UNDServer_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t request_data;
/* end of the kernel processed data */
NDR_record_t NDR;
uint32_t user_log_flags;
mach_msg_type_number_t request_dataCnt;
} __Request__kext_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__host_priv_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__host_priv_subsystem__defined
#define __RequestUnion__host_priv_subsystem__defined
union __RequestUnion__host_priv_subsystem {
__Request__host_get_boot_info_t Request_host_get_boot_info;
__Request__host_reboot_t Request_host_reboot;
__Request__host_priv_statistics_t Request_host_priv_statistics;
__Request__host_default_memory_manager_t Request_host_default_memory_manager;
__Request__vm_wire_t Request_vm_wire;
__Request__thread_wire_t Request_thread_wire;
__Request__vm_allocate_cpm_t Request_vm_allocate_cpm;
__Request__host_processors_t Request_host_processors;
__Request__host_get_clock_control_t Request_host_get_clock_control;
__Request__kmod_create_t Request_kmod_create;
__Request__kmod_destroy_t Request_kmod_destroy;
__Request__kmod_control_t Request_kmod_control;
__Request__host_get_special_port_t Request_host_get_special_port;
__Request__host_set_special_port_t Request_host_set_special_port;
__Request__host_set_exception_ports_t Request_host_set_exception_ports;
__Request__host_get_exception_ports_t Request_host_get_exception_ports;
__Request__host_swap_exception_ports_t Request_host_swap_exception_ports;
__Request__mach_vm_wire_t Request_mach_vm_wire;
__Request__host_processor_sets_t Request_host_processor_sets;
__Request__host_processor_set_priv_t Request_host_processor_set_priv;
__Request__host_set_UNDServer_t Request_host_set_UNDServer;
__Request__host_get_UNDServer_t Request_host_get_UNDServer;
__Request__kext_request_t Request_kext_request;
};
#endif /* !__RequestUnion__host_priv_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__host_priv_subsystem__defined
#define __Reply__host_priv_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */
mach_msg_type_number_t boot_infoCnt;
char boot_info[4096];
} __Reply__host_get_boot_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_reboot_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t host_info_outCnt;
integer_t host_info_out[68];
} __Reply__host_priv_statistics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t default_manager;
/* end of the kernel processed data */
} __Reply__host_default_memory_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
} __Reply__vm_allocate_cpm_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_ports_descriptor_t out_processor_list;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t out_processor_listCnt;
} __Reply__host_processors_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t clock_ctrl;
/* end of the kernel processed data */
} __Reply__host_get_clock_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
kmod_t module;
} __Reply__kmod_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__kmod_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t dataCnt;
} __Reply__kmod_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t port;
/* end of the kernel processed data */
} __Reply__host_get_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_set_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_set_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t old_handlers[32];
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t masksCnt;
exception_mask_t masks[32];
exception_behavior_t old_behaviors[32];
thread_state_flavor_t old_flavors[32];
} __Reply__host_get_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t old_handlerss[32];
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t masksCnt;
exception_mask_t masks[32];
exception_behavior_t old_behaviors[32];
thread_state_flavor_t old_flavors[32];
} __Reply__host_swap_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_ports_descriptor_t processor_sets;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t processor_setsCnt;
} __Reply__host_processor_sets_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t set;
/* end of the kernel processed data */
} __Reply__host_processor_set_priv_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_set_UNDServer_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t server;
/* end of the kernel processed data */
} __Reply__host_get_UNDServer_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t response_data;
mach_msg_ool_descriptor_t log_data;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t response_dataCnt;
mach_msg_type_number_t log_dataCnt;
kern_return_t op_result;
} __Reply__kext_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__host_priv_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__host_priv_subsystem__defined
#define __ReplyUnion__host_priv_subsystem__defined
union __ReplyUnion__host_priv_subsystem {
__Reply__host_get_boot_info_t Reply_host_get_boot_info;
__Reply__host_reboot_t Reply_host_reboot;
__Reply__host_priv_statistics_t Reply_host_priv_statistics;
__Reply__host_default_memory_manager_t Reply_host_default_memory_manager;
__Reply__vm_wire_t Reply_vm_wire;
__Reply__thread_wire_t Reply_thread_wire;
__Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm;
__Reply__host_processors_t Reply_host_processors;
__Reply__host_get_clock_control_t Reply_host_get_clock_control;
__Reply__kmod_create_t Reply_kmod_create;
__Reply__kmod_destroy_t Reply_kmod_destroy;
__Reply__kmod_control_t Reply_kmod_control;
__Reply__host_get_special_port_t Reply_host_get_special_port;
__Reply__host_set_special_port_t Reply_host_set_special_port;
__Reply__host_set_exception_ports_t Reply_host_set_exception_ports;
__Reply__host_get_exception_ports_t Reply_host_get_exception_ports;
__Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports;
__Reply__mach_vm_wire_t Reply_mach_vm_wire;
__Reply__host_processor_sets_t Reply_host_processor_sets;
__Reply__host_processor_set_priv_t Reply_host_processor_set_priv;
__Reply__host_set_UNDServer_t Reply_host_set_UNDServer;
__Reply__host_get_UNDServer_t Reply_host_get_UNDServer;
__Reply__kext_request_t Reply_kext_request;
};
#endif /* !__RequestUnion__host_priv_subsystem__defined */
#ifndef subsystem_to_name_map_host_priv
#define subsystem_to_name_map_host_priv \
{ "host_get_boot_info", 400 },\
{ "host_reboot", 401 },\
{ "host_priv_statistics", 402 },\
{ "host_default_memory_manager", 403 },\
{ "vm_wire", 404 },\
{ "thread_wire", 405 },\
{ "vm_allocate_cpm", 406 },\
{ "host_processors", 407 },\
{ "host_get_clock_control", 408 },\
{ "kmod_create", 409 },\
{ "kmod_destroy", 410 },\
{ "kmod_control", 411 },\
{ "host_get_special_port", 412 },\
{ "host_set_special_port", 413 },\
{ "host_set_exception_ports", 414 },\
{ "host_get_exception_ports", 415 },\
{ "host_swap_exception_ports", 416 },\
{ "mach_vm_wire", 418 },\
{ "host_processor_sets", 419 },\
{ "host_processor_set_priv", 420 },\
{ "host_set_UNDServer", 423 },\
{ "host_get_UNDServer", 424 },\
{ "kext_request", 425 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _host_priv_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_interface.h | /*
* Copyright (c) 2000-2010 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_INTERFACE_H_
#define _MACH_INTERFACE_H_
#include <mach/clock.h>
#include <mach/clock_priv.h>
#include <mach/clock_reply_server.h>
#include <mach/exc_server.h>
#include <mach/host_priv.h>
#include <mach/host_security.h>
#include <mach/lock_set.h>
#include <mach/mach_exc_server.h>
#include <mach/mach_host.h>
#include <mach/mach_port.h>
#include <mach/notify_server.h>
#include <mach/processor.h>
#include <mach/processor_set.h>
#include <mach/semaphore.h>
#include <mach/task.h>
#include <mach/thread_act.h>
#include <mach/vm_map.h>
#endif /* _MACH_INTERFACE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_policy.h | /*
* Copyright (c) 2000-2007 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_THREAD_POLICY_H_
#define _MACH_THREAD_POLICY_H_
#include <mach/mach_types.h>
/*
* These are the calls for accessing the policy parameters
* of a particular thread.
*
* The extra 'get_default' parameter to the second call is
* IN/OUT as follows:
* 1) if asserted on the way in it indicates that the default
* values should be returned, not the ones currently set, in
* this case 'get_default' will always be asserted on return;
* 2) if unasserted on the way in, the current settings are
* desired and if still unasserted on return, then the info
* returned reflects the current settings, otherwise if
* 'get_default' returns asserted, it means that there are no
* current settings due to other parameters taking precedence,
* and the default ones are being returned instead.
*/
typedef natural_t thread_policy_flavor_t;
typedef integer_t *thread_policy_t;
/*
* kern_return_t thread_policy_set(
* thread_t thread,
* thread_policy_flavor_t flavor,
* thread_policy_t policy_info,
* mach_msg_type_number_t count);
*
* kern_return_t thread_policy_get(
* thread_t thread,
* thread_policy_flavor_t flavor,
* thread_policy_t policy_info,
* mach_msg_type_number_t *count,
* boolean_t *get_default);
*/
/*
* Defined flavors.
*/
/*
* THREAD_STANDARD_POLICY:
*
* This is the standard (fair) scheduling mode, assigned to new
* threads. The thread will be given processor time in a manner
* which apportions approximately equal share to long running
* computations.
*
* Parameters:
* [none]
*/
#define THREAD_STANDARD_POLICY 1
struct thread_standard_policy {
natural_t no_data;
};
typedef struct thread_standard_policy thread_standard_policy_data_t;
typedef struct thread_standard_policy *thread_standard_policy_t;
#define THREAD_STANDARD_POLICY_COUNT 0
/*
* THREAD_EXTENDED_POLICY:
*
* Extended form of THREAD_STANDARD_POLICY, which supplies a
* hint indicating whether this is a long running computation.
*
* Parameters:
*
* timeshare: TRUE (the default) results in identical scheduling
* behavior as THREAD_STANDARD_POLICY.
*/
#define THREAD_EXTENDED_POLICY 1
struct thread_extended_policy {
boolean_t timeshare;
};
typedef struct thread_extended_policy thread_extended_policy_data_t;
typedef struct thread_extended_policy *thread_extended_policy_t;
#define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_extended_policy_data_t) / sizeof (integer_t)))
/*
* THREAD_TIME_CONSTRAINT_POLICY:
*
* This scheduling mode is for threads which have real time
* constraints on their execution.
*
* Parameters:
*
* period: This is the nominal amount of time between separate
* processing arrivals, specified in absolute time units. A
* value of 0 indicates that there is no inherent periodicity in
* the computation.
*
* computation: This is the nominal amount of computation
* time needed during a separate processing arrival, specified
* in absolute time units. The thread may be preempted after
* the computation time has elapsed.
* If (computation < constraint/2) it will be forced to
* constraint/2 to avoid unintended preemption and associated
* timer interrupts.
*
* constraint: This is the maximum amount of real time that
* may elapse from the start of a separate processing arrival
* to the end of computation for logically correct functioning,
* specified in absolute time units. Must be (>= computation).
* Note that latency = (constraint - computation).
*
* preemptible: IGNORED (This indicates that the computation may be
* interrupted, subject to the constraint specified above.)
*/
#define THREAD_TIME_CONSTRAINT_POLICY 2
struct thread_time_constraint_policy {
uint32_t period;
uint32_t computation;
uint32_t constraint;
boolean_t preemptible;
};
typedef struct thread_time_constraint_policy \
thread_time_constraint_policy_data_t;
typedef struct thread_time_constraint_policy \
*thread_time_constraint_policy_t;
#define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t)))
/*
* THREAD_PRECEDENCE_POLICY:
*
* This may be used to indicate the relative value of the
* computation compared to the other threads in the task.
*
* Parameters:
*
* importance: The importance is specified as a signed value.
*/
#define THREAD_PRECEDENCE_POLICY 3
struct thread_precedence_policy {
integer_t importance;
};
typedef struct thread_precedence_policy thread_precedence_policy_data_t;
typedef struct thread_precedence_policy *thread_precedence_policy_t;
#define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_precedence_policy_data_t) / sizeof (integer_t)))
/*
* THREAD_AFFINITY_POLICY:
*
* This policy is experimental.
* This may be used to express affinity relationships
* between threads in the task. Threads with the same affinity tag will
* be scheduled to share an L2 cache if possible. That is, affinity tags
* are a hint to the scheduler for thread placement.
*
* The namespace of affinity tags is generally local to one task. However,
* a child task created after the assignment of affinity tags by its parent
* will share that namespace. In particular, a family of forked processes
* may be created with a shared affinity namespace.
*
* Parameters:
* tag: The affinity set identifier.
*/
#define THREAD_AFFINITY_POLICY 4
struct thread_affinity_policy {
integer_t affinity_tag;
};
#define THREAD_AFFINITY_TAG_NULL 0
typedef struct thread_affinity_policy thread_affinity_policy_data_t;
typedef struct thread_affinity_policy *thread_affinity_policy_t;
#define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_affinity_policy_data_t) / sizeof (integer_t)))
/*
* THREAD_BACKGROUND_POLICY:
*/
#define THREAD_BACKGROUND_POLICY 5
struct thread_background_policy {
integer_t priority;
};
#define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000
typedef struct thread_background_policy thread_background_policy_data_t;
typedef struct thread_background_policy *thread_background_policy_t;
#define THREAD_BACKGROUND_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_background_policy_data_t) / sizeof (integer_t)))
#define THREAD_LATENCY_QOS_POLICY 7
typedef integer_t thread_latency_qos_t;
struct thread_latency_qos_policy {
thread_latency_qos_t thread_latency_qos_tier;
};
typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t;
typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t;
#define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t)))
#define THREAD_THROUGHPUT_QOS_POLICY 8
typedef integer_t thread_throughput_qos_t;
struct thread_throughput_qos_policy {
thread_throughput_qos_t thread_throughput_qos_tier;
};
typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t;
typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t;
#define THREAD_THROUGHPUT_QOS_POLICY_COUNT ((mach_msg_type_number_t) \
(sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t)))
#endif /* _MACH_THREAD_POLICY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_prot.h | /*
* Copyright (c) 2000-2021 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/vm_prot.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young
*
* Virtual memory protection definitions.
*
*/
#ifndef _MACH_VM_PROT_H_
#define _MACH_VM_PROT_H_
/*
* Types defined:
*
* vm_prot_t VM protection values.
*/
typedef int vm_prot_t;
/*
* Protection values, defined as bits within the vm_prot_t type
*/
#define VM_PROT_NONE ((vm_prot_t) 0x00)
#define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */
#define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */
#define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */
/*
* The default protection for newly-created virtual memory
*/
#define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE)
/*
* The maximum privileges possible, for parameter checking.
*/
#define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE)
/*
* An invalid protection value.
* Used only by memory_object_lock_request to indicate no change
* to page locks. Using -1 here is a bad idea because it
* looks like VM_PROT_ALL and then some.
*/
#define VM_PROT_NO_CHANGE_LEGACY ((vm_prot_t) 0x08)
#define VM_PROT_NO_CHANGE ((vm_prot_t) 0x01000000)
/*
* When a caller finds that he cannot obtain write permission on a
* mapped entry, the following flag can be used. The entry will
* be made "needs copy" effectively copying the object (using COW),
* and write permission will be added to the maximum protections
* for the associated entry.
*/
#define VM_PROT_COPY ((vm_prot_t) 0x10)
/*
* Another invalid protection value.
* Used only by memory_object_data_request upon an object
* which has specified a copy_call copy strategy. It is used
* when the kernel wants a page belonging to a copy of the
* object, and is only asking the object as a result of
* following a shadow chain. This solves the race between pages
* being pushed up by the memory manager and the kernel
* walking down the shadow chain.
*/
#define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10)
/*
* Another invalid protection value.
* Indicates that the other protection bits are to be applied as a mask
* against the actual protection bits of the map entry.
*/
#define VM_PROT_IS_MASK ((vm_prot_t) 0x40)
/*
* Another invalid protection value to support execute-only protection.
* VM_PROT_STRIP_READ is a special marker that tells mprotect to not
* set VM_PROT_READ. We have to do it this way because existing code
* expects the system to set VM_PROT_READ if VM_PROT_EXECUTE is set.
* VM_PROT_EXECUTE_ONLY is just a convenience value to indicate that
* the memory should be executable and explicitly not readable. It will
* be ignored on platforms that do not support this type of protection.
*/
#define VM_PROT_STRIP_READ ((vm_prot_t) 0x80)
#define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ)
#if defined(__x86_64__)
/*
* Another invalid protection value to support specifying different
* execute permissions for user- and supervisor- modes. When
* MBE is enabled in a VM, VM_PROT_EXECUTE is used to indicate
* supervisor-mode execute permission, and VM_PROT_UEXEC specifies
* user-mode execute permission. Currently only used by the
* x86 Hypervisor kext.
*/
#define VM_PROT_UEXEC ((vm_prot_t) 0x8) /* User-mode Execute Permission */
#define VM_PROT_ALLEXEC (VM_PROT_EXECUTE | VM_PROT_UEXEC)
#else
#define VM_PROT_ALLEXEC (VM_PROT_EXECUTE)
#endif /* defined(__x86_64__) */
#endif /* _MACH_VM_PROT_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/dyld_kernel.h | /*
* Copyright (c) 2016 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_DYLIB_INFO_H_
#define _MACH_DYLIB_INFO_H_
#include <mach/boolean.h>
#include <stdint.h>
#include <sys/_types/_fsid_t.h>
#include <sys/_types/_u_int32_t.h>
#include <sys/_types/_fsobj_id_t.h>
#include <sys/_types/_uuid_t.h>
/* These definitions must be kept in sync with the ones in
* osfmk/mach/mach_types.defs.
*/
struct dyld_kernel_image_info {
uuid_t uuid;
fsobj_id_t fsobjid;
fsid_t fsid;
uint64_t load_addr;
};
struct dyld_kernel_process_info {
struct dyld_kernel_image_info cache_image_info;
uint64_t timestamp; // mach_absolute_time of last time dyld change to image list
uint32_t imageCount; // number of images currently loaded into process
uint32_t initialImageCount; // number of images statically loaded into process (before any dlopen() calls)
uint8_t dyldState; // one of dyld_process_state_* values
boolean_t no_cache; // process is running without a dyld cache
boolean_t private_cache; // process is using a private copy of its dyld cache
};
/* typedefs so our MIG is sane */
typedef struct dyld_kernel_image_info dyld_kernel_image_info_t;
typedef struct dyld_kernel_process_info dyld_kernel_process_info_t;
typedef dyld_kernel_image_info_t *dyld_kernel_image_info_array_t;
#endif /* _MACH_DYLIB_INFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/processor_info.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/processor_info.h
* Author: David L. Black
* Date: 1988
*
* Data structure definitions for processor_info, processor_set_info
*/
#ifndef _MACH_PROCESSOR_INFO_H_
#define _MACH_PROCESSOR_INFO_H_
#include <mach/message.h>
#include <mach/machine.h>
#include <mach/machine/processor_info.h>
/*
* Generic information structure to allow for expansion.
*/
typedef integer_t *processor_info_t; /* varying array of int. */
typedef integer_t *processor_info_array_t; /* varying array of int */
#define PROCESSOR_INFO_MAX (1024) /* max array size */
typedef integer_t processor_info_data_t[PROCESSOR_INFO_MAX];
typedef integer_t *processor_set_info_t; /* varying array of int. */
#define PROCESSOR_SET_INFO_MAX (1024) /* max array size */
typedef integer_t processor_set_info_data_t[PROCESSOR_SET_INFO_MAX];
/*
* Currently defined information.
*/
typedef int processor_flavor_t;
#define PROCESSOR_BASIC_INFO 1 /* basic information */
#define PROCESSOR_CPU_LOAD_INFO 2 /* cpu load information */
#define PROCESSOR_PM_REGS_INFO 0x10000001 /* performance monitor register info */
#define PROCESSOR_TEMPERATURE 0x10000002 /* Processor core temperature */
struct processor_basic_info {
cpu_type_t cpu_type; /* type of cpu */
cpu_subtype_t cpu_subtype; /* subtype of cpu */
boolean_t running; /* is processor running */
int slot_num; /* slot number */
boolean_t is_master; /* is this the master processor */
};
typedef struct processor_basic_info processor_basic_info_data_t;
typedef struct processor_basic_info *processor_basic_info_t;
#define PROCESSOR_BASIC_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(processor_basic_info_data_t)/sizeof(natural_t)))
struct processor_cpu_load_info { /* number of ticks while running... */
unsigned int cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};
typedef struct processor_cpu_load_info processor_cpu_load_info_data_t;
typedef struct processor_cpu_load_info *processor_cpu_load_info_t;
#define PROCESSOR_CPU_LOAD_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(processor_cpu_load_info_data_t)/sizeof(natural_t)))
/*
* Scaling factor for load_average, mach_factor.
*/
#define LOAD_SCALE 1000
typedef int processor_set_flavor_t;
#define PROCESSOR_SET_BASIC_INFO 5 /* basic information */
struct processor_set_basic_info {
int processor_count; /* How many processors */
int default_policy; /* When others not enabled */
};
typedef struct processor_set_basic_info processor_set_basic_info_data_t;
typedef struct processor_set_basic_info *processor_set_basic_info_t;
#define PROCESSOR_SET_BASIC_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(processor_set_basic_info_data_t)/sizeof(natural_t)))
#define PROCESSOR_SET_LOAD_INFO 4 /* scheduling statistics */
struct processor_set_load_info {
int task_count; /* How many tasks */
int thread_count; /* How many threads */
integer_t load_average; /* Scaled */
integer_t mach_factor; /* Scaled */
};
typedef struct processor_set_load_info processor_set_load_info_data_t;
typedef struct processor_set_load_info *processor_set_load_info_t;
#define PROCESSOR_SET_LOAD_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(processor_set_load_info_data_t)/sizeof(natural_t)))
#endif /* _MACH_PROCESSOR_INFO_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_time.h | /*
* Copyright (c) 2001-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_MACH_TIME_H_
#define _MACH_MACH_TIME_H_
#include <mach/mach_types.h>
#include <sys/cdefs.h>
#include <Availability.h>
struct mach_timebase_info {
uint32_t numer;
uint32_t denom;
};
typedef struct mach_timebase_info *mach_timebase_info_t;
typedef struct mach_timebase_info mach_timebase_info_data_t;
__BEGIN_DECLS
uint64_t mach_absolute_time(void);
__OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0)
uint64_t mach_approximate_time(void);
/*
* like mach_absolute_time, but advances during sleep
*/
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
uint64_t mach_continuous_time(void);
/*
* like mach_approximate_time, but advances during sleep
*/
__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0)
uint64_t mach_continuous_approximate_time(void);
__END_DECLS
#endif /* _MACH_MACH_TIME_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_notify.h | /*
* Copyright (c) 2003 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_HOST_NOTIFY_H_
#define _MACH_HOST_NOTIFY_H_
#define HOST_NOTIFY_CALENDAR_CHANGE 0
#define HOST_NOTIFY_CALENDAR_SET 1
#define HOST_NOTIFY_TYPE_MAX 1
#define HOST_CALENDAR_CHANGED_REPLYID 950
#define HOST_CALENDAR_SET_REPLYID 951
#endif /* _MACH_HOST_NOTIFY_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_sync.h | /*
* Copyright (c) 2000-2002 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* File: mach/vm_sync.h
*
* Virtual memory synchronisation definitions.
*
*/
#ifndef _MACH_VM_SYNC_H_
#define _MACH_VM_SYNC_H_
typedef unsigned vm_sync_t;
/*
* Synchronization flags, defined as bits within the vm_sync_t type
*/
#define VM_SYNC_ASYNCHRONOUS ((vm_sync_t) 0x01)
#define VM_SYNC_SYNCHRONOUS ((vm_sync_t) 0x02)
#define VM_SYNC_INVALIDATE ((vm_sync_t) 0x04)
#define VM_SYNC_KILLPAGES ((vm_sync_t) 0x08)
#define VM_SYNC_DEACTIVATE ((vm_sync_t) 0x10)
#define VM_SYNC_CONTIGUOUS ((vm_sync_t) 0x20)
#define VM_SYNC_REUSABLEPAGES ((vm_sync_t) 0x40)
#endif /* _MACH_VM_SYNC_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/host_security.h | #ifndef _host_security_user_
#define _host_security_user_
/* Module host_security */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef host_security_MSG_COUNT
#define host_security_MSG_COUNT 2
#endif /* host_security_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine host_security_create_task_token */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_security_create_task_token
(
host_security_t host_security,
task_t parent_task,
security_token_t sec_token,
audit_token_t audit_token,
host_t host,
ledger_array_t ledgers,
mach_msg_type_number_t ledgersCnt,
boolean_t inherit_memory,
task_t *child_task
);
/* Routine host_security_set_task_token */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_security_set_task_token
(
host_security_t host_security,
task_t target_task,
security_token_t sec_token,
audit_token_t audit_token,
host_t host
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__host_security_subsystem__defined
#define __Request__host_security_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t parent_task;
mach_msg_port_descriptor_t host;
mach_msg_ool_ports_descriptor_t ledgers;
/* end of the kernel processed data */
NDR_record_t NDR;
security_token_t sec_token;
audit_token_t audit_token;
mach_msg_type_number_t ledgersCnt;
boolean_t inherit_memory;
} __Request__host_security_create_task_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t target_task;
mach_msg_port_descriptor_t host;
/* end of the kernel processed data */
NDR_record_t NDR;
security_token_t sec_token;
audit_token_t audit_token;
} __Request__host_security_set_task_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__host_security_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__host_security_subsystem__defined
#define __RequestUnion__host_security_subsystem__defined
union __RequestUnion__host_security_subsystem {
__Request__host_security_create_task_token_t Request_host_security_create_task_token;
__Request__host_security_set_task_token_t Request_host_security_set_task_token;
};
#endif /* !__RequestUnion__host_security_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__host_security_subsystem__defined
#define __Reply__host_security_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t child_task;
/* end of the kernel processed data */
} __Reply__host_security_create_task_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_security_set_task_token_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__host_security_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__host_security_subsystem__defined
#define __ReplyUnion__host_security_subsystem__defined
union __ReplyUnion__host_security_subsystem {
__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
};
#endif /* !__RequestUnion__host_security_subsystem__defined */
#ifndef subsystem_to_name_map_host_security
#define subsystem_to_name_map_host_security \
{ "host_security_create_task_token", 600 },\
{ "host_security_set_task_token", 601 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _host_security_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_default_server.h | #ifndef _memory_object_default_server_
#define _memory_object_default_server_
/* Module memory_object_default */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef memory_object_default_MSG_COUNT
#define memory_object_default_MSG_COUNT 1
#endif /* memory_object_default_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigServerHeader
__BeforeMigServerHeader
#endif /* __BeforeMigServerHeader */
#ifndef MIG_SERVER_ROUTINE
#define MIG_SERVER_ROUTINE
#endif
/* Routine memory_object_create */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
MIG_SERVER_ROUTINE
kern_return_t memory_object_create
(
memory_object_default_t default_memory_manager,
vm_size_t new_memory_object_size,
memory_object_t *new_memory_object
);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
boolean_t memory_object_default_server(
mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
mig_routine_t memory_object_default_server_routine(
mach_msg_header_t *InHeadP);
/* Description of this subsystem, for use in direct RPC */
extern const struct memory_object_default_subsystem {
mig_server_routine_t server; /* Server routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
unsigned int maxsize; /* Max msg size */
vm_address_t reserved; /* Reserved */
struct routine_descriptor /*Array of routine descriptors */
routine[1];
} memory_object_default_subsystem;
/* typedefs for all requests */
#ifndef __Request__memory_object_default_subsystem__defined
#define __Request__memory_object_default_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_size_t new_memory_object_size;
} __Request__memory_object_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__memory_object_default_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__memory_object_default_subsystem__defined
#define __RequestUnion__memory_object_default_subsystem__defined
union __RequestUnion__memory_object_default_subsystem {
__Request__memory_object_create_t Request_memory_object_create;
};
#endif /* __RequestUnion__memory_object_default_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__memory_object_default_subsystem__defined
#define __Reply__memory_object_default_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_memory_object;
/* end of the kernel processed data */
} __Reply__memory_object_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__memory_object_default_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__memory_object_default_subsystem__defined
#define __ReplyUnion__memory_object_default_subsystem__defined
union __ReplyUnion__memory_object_default_subsystem {
__Reply__memory_object_create_t Reply_memory_object_create;
};
#endif /* __ReplyUnion__memory_object_default_subsystem__defined */
#ifndef subsystem_to_name_map_memory_object_default
#define subsystem_to_name_map_memory_object_default \
{ "memory_object_create", 2250 }
#endif
#ifdef __AfterMigServerHeader
__AfterMigServerHeader
#endif /* __AfterMigServerHeader */
#endif /* _memory_object_default_server_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mig.h | /*
* Copyright (c) 2000-2007 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach MIG Subsystem Interfaces
*/
#ifndef _MACH_MIG_H_
#define _MACH_MIG_H_
#include <stdint.h>
#include <mach/port.h>
#include <mach/message.h>
#include <mach/vm_types.h>
#include <sys/cdefs.h>
#if defined(MACH_KERNEL)
#if !defined(__MigTypeCheck)
/* Turn MIG type checking on by default for kernel */
#define __MigTypeCheck 1
#endif
#define __MigKernelSpecificCode 1
#define _MIG_KERNEL_SPECIFIC_CODE_ 1
#elif !defined(__MigTypeCheck)
#if defined(TypeCheck)
/* use legacy setting (temporary) */
#define __MigTypeCheck TypeCheck
#else
/* default MIG type checking on */
#define __MigTypeCheck 1
#endif
#endif /* !defined(MACH_KERNEL) && !defined(__MigTypeCheck) */
/*
* Pack MIG message structs.
* This is an indicator of the need to view shared structs in a
* binary-compatible format - and MIG message structs are no different.
*/
#define __MigPackStructs 1
/*
* Definition for MIG-generated server stub routines. These routines
* unpack the request message, call the server procedure, and pack the
* reply message.
*/
typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP,
mach_msg_header_t *OutHeadP);
typedef mig_stub_routine_t mig_routine_t;
/*
* Definition for MIG-generated server routine. This routine takes a
* message, and returns the appropriate stub function for handling that
* message.
*/
typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP);
/*
* Generic definition for implementation routines. These routines do
* the real work associated with this request. This generic type is
* used for keeping the pointers in the subsystem array.
*/
typedef kern_return_t (*mig_impl_routine_t)(void);
typedef mach_msg_type_descriptor_t routine_arg_descriptor;
typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t;
typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t;
#define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0)
struct routine_descriptor {
mig_impl_routine_t impl_routine; /* Server work func pointer */
mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */
unsigned int argc; /* Number of argument words */
unsigned int descr_count; /* Number complex descriptors */
routine_arg_descriptor_t
arg_descr; /* pointer to descriptor array*/
unsigned int max_reply_msg; /* Max size for reply msg */
};
typedef struct routine_descriptor *routine_descriptor_t;
typedef struct routine_descriptor mig_routine_descriptor;
typedef mig_routine_descriptor *mig_routine_descriptor_t;
#define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0)
typedef struct mig_subsystem {
mig_server_routine_t server; /* pointer to demux routine */
mach_msg_id_t start; /* Min routine number */
mach_msg_id_t end; /* Max routine number + 1 */
mach_msg_size_t maxsize; /* Max reply message size */
vm_address_t reserved; /* reserved for MIG use */
mig_routine_descriptor
routine[1]; /* Routine descriptor array */
} *mig_subsystem_t;
#define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0)
typedef struct mig_symtab {
char *ms_routine_name;
int ms_routine_number;
void (*ms_routine)(void); /* Since the functions in the
* symbol table have unknown
* signatures, this is the best
* we can do...
*/
} mig_symtab_t;
/*
* A compiler attribute for annotating all MIG server routines and other
* functions that should behave similarly. Allows the compiler to perform
* additional static bug-finding over them.
*/
#if __has_attribute(mig_server_routine)
#define MIG_SERVER_ROUTINE __attribute__((mig_server_routine))
#else
#define MIG_SERVER_ROUTINE
#endif
__BEGIN_DECLS
/* Client side reply port allocate */
extern mach_port_t mig_get_reply_port(void);
/* Client side reply port deallocate */
extern void mig_dealloc_reply_port(mach_port_t reply_port);
/* Client side reply port "deallocation" */
extern void mig_put_reply_port(mach_port_t reply_port);
/* Bounded string copy */
extern int mig_strncpy(char *dest, const char *src, int len);
extern int mig_strncpy_zerofill(char *dest, const char *src, int len);
/* Allocate memory for out-of-line mig structures */
extern void mig_allocate(vm_address_t *, vm_size_t);
/* Deallocate memory used for out-of-line mig structures */
extern void mig_deallocate(vm_address_t, vm_size_t);
__END_DECLS
#endif /* _MACH_MIG_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_port.h | #ifndef _mach_port_user_
#define _mach_port_user_
/* Module mach_port */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_port_MSG_COUNT
#define mach_port_MSG_COUNT 43
#endif /* mach_port_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine mach_port_names */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_names
(
ipc_space_t task,
mach_port_name_array_t *names,
mach_msg_type_number_t *namesCnt,
mach_port_type_array_t *types,
mach_msg_type_number_t *typesCnt
);
/* Routine mach_port_type */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_type
(
ipc_space_t task,
mach_port_name_t name,
mach_port_type_t *ptype
);
/* Routine mach_port_rename */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_rename
(
ipc_space_t task,
mach_port_name_t old_name,
mach_port_name_t new_name
);
/* Routine mach_port_allocate_name */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_allocate_name
(
ipc_space_t task,
mach_port_right_t right,
mach_port_name_t name
);
/* Routine mach_port_allocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_allocate
(
ipc_space_t task,
mach_port_right_t right,
mach_port_name_t *name
);
/* Routine mach_port_destroy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_destroy
(
ipc_space_t task,
mach_port_name_t name
);
/* Routine mach_port_deallocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_deallocate
(
ipc_space_t task,
mach_port_name_t name
);
/* Routine mach_port_get_refs */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_refs
(
ipc_space_t task,
mach_port_name_t name,
mach_port_right_t right,
mach_port_urefs_t *refs
);
/* Routine mach_port_mod_refs */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_mod_refs
(
ipc_space_t task,
mach_port_name_t name,
mach_port_right_t right,
mach_port_delta_t delta
);
/* Routine mach_port_peek */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_peek
(
ipc_space_t task,
mach_port_name_t name,
mach_msg_trailer_type_t trailer_type,
mach_port_seqno_t *request_seqnop,
mach_msg_size_t *msg_sizep,
mach_msg_id_t *msg_idp,
mach_msg_trailer_info_t trailer_infop,
mach_msg_type_number_t *trailer_infopCnt
);
/* Routine mach_port_set_mscount */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_set_mscount
(
ipc_space_t task,
mach_port_name_t name,
mach_port_mscount_t mscount
);
/* Routine mach_port_get_set_status */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_set_status
(
ipc_space_read_t task,
mach_port_name_t name,
mach_port_name_array_t *members,
mach_msg_type_number_t *membersCnt
);
/* Routine mach_port_move_member */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_move_member
(
ipc_space_t task,
mach_port_name_t member,
mach_port_name_t after
);
/* Routine mach_port_request_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_request_notification
(
ipc_space_t task,
mach_port_name_t name,
mach_msg_id_t msgid,
mach_port_mscount_t sync,
mach_port_t notify,
mach_msg_type_name_t notifyPoly,
mach_port_t *previous
);
/* Routine mach_port_insert_right */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_insert_right
(
ipc_space_t task,
mach_port_name_t name,
mach_port_t poly,
mach_msg_type_name_t polyPoly
);
/* Routine mach_port_extract_right */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_extract_right
(
ipc_space_t task,
mach_port_name_t name,
mach_msg_type_name_t msgt_name,
mach_port_t *poly,
mach_msg_type_name_t *polyPoly
);
/* Routine mach_port_set_seqno */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_set_seqno
(
ipc_space_t task,
mach_port_name_t name,
mach_port_seqno_t seqno
);
/* Routine mach_port_get_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_attributes
(
ipc_space_read_t task,
mach_port_name_t name,
mach_port_flavor_t flavor,
mach_port_info_t port_info_out,
mach_msg_type_number_t *port_info_outCnt
);
/* Routine mach_port_set_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_set_attributes
(
ipc_space_t task,
mach_port_name_t name,
mach_port_flavor_t flavor,
mach_port_info_t port_info,
mach_msg_type_number_t port_infoCnt
);
/* Routine mach_port_allocate_qos */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_allocate_qos
(
ipc_space_t task,
mach_port_right_t right,
mach_port_qos_t *qos,
mach_port_name_t *name
);
/* Routine mach_port_allocate_full */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_allocate_full
(
ipc_space_t task,
mach_port_right_t right,
mach_port_t proto,
mach_port_qos_t *qos,
mach_port_name_t *name
);
/* Routine task_set_port_space */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t task_set_port_space
(
ipc_space_t task,
int table_entries
);
/* Routine mach_port_get_srights */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_srights
(
ipc_space_t task,
mach_port_name_t name,
mach_port_rights_t *srights
);
/* Routine mach_port_space_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_space_info
(
ipc_space_read_t space,
ipc_info_space_t *space_info,
ipc_info_name_array_t *table_info,
mach_msg_type_number_t *table_infoCnt,
ipc_info_tree_name_array_t *tree_info,
mach_msg_type_number_t *tree_infoCnt
);
/* Routine mach_port_dnrequest_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_dnrequest_info
(
ipc_space_t task,
mach_port_name_t name,
unsigned *dnr_total,
unsigned *dnr_used
);
/* Routine mach_port_kernel_object */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_kernel_object
(
ipc_space_read_t task,
mach_port_name_t name,
unsigned *object_type,
unsigned *object_addr
);
/* Routine mach_port_insert_member */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_insert_member
(
ipc_space_t task,
mach_port_name_t name,
mach_port_name_t pset
);
/* Routine mach_port_extract_member */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_extract_member
(
ipc_space_t task,
mach_port_name_t name,
mach_port_name_t pset
);
/* Routine mach_port_get_context */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_context
(
ipc_space_read_t task,
mach_port_name_t name,
mach_vm_address_t *context
);
/* Routine mach_port_set_context */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_set_context
(
ipc_space_t task,
mach_port_name_t name,
mach_vm_address_t context
);
/* Routine mach_port_kobject */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_kobject
(
ipc_space_read_t task,
mach_port_name_t name,
natural_t *object_type,
mach_vm_address_t *object_addr
);
/* Routine mach_port_construct */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_construct
(
ipc_space_t task,
mach_port_options_ptr_t options,
uint64_t context,
mach_port_name_t *name
);
/* Routine mach_port_destruct */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_destruct
(
ipc_space_t task,
mach_port_name_t name,
mach_port_delta_t srdelta,
uint64_t guard
);
/* Routine mach_port_guard */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_guard
(
ipc_space_t task,
mach_port_name_t name,
uint64_t guard,
boolean_t strict
);
/* Routine mach_port_unguard */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_unguard
(
ipc_space_t task,
mach_port_name_t name,
uint64_t guard
);
/* Routine mach_port_space_basic_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_space_basic_info
(
ipc_space_inspect_t task,
ipc_info_space_basic_t *basic_info
);
/* Routine mach_port_special_reply_port_reset_link */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_special_reply_port_reset_link
(
ipc_space_t task,
mach_port_name_t name,
boolean_t *srp_lost_link
);
/* Routine mach_port_guard_with_flags */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_guard_with_flags
(
ipc_space_t task,
mach_port_name_t name,
uint64_t guard,
uint64_t flags
);
/* Routine mach_port_swap_guard */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_swap_guard
(
ipc_space_t task,
mach_port_name_t name,
uint64_t old_guard,
uint64_t new_guard
);
/* Routine mach_port_kobject_description */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_kobject_description
(
ipc_space_read_t task,
mach_port_name_t name,
natural_t *object_type,
mach_vm_address_t *object_addr,
kobject_description_t description
);
/* Routine mach_port_is_connection_for_service */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_is_connection_for_service
(
ipc_space_t task,
mach_port_name_t connection_port,
mach_port_name_t service_port,
uint64_t *filter_policy_id
);
/* Routine mach_port_get_service_port_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_get_service_port_info
(
ipc_space_read_t task,
mach_port_name_t name,
mach_service_port_info_data_t *sp_info_out
);
/* Routine mach_port_assert_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_port_assert_attributes
(
ipc_space_t task,
mach_port_name_t name,
mach_port_flavor_t flavor,
mach_port_info_t info,
mach_msg_type_number_t infoCnt
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__mach_port_subsystem__defined
#define __Request__mach_port_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_port_names_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_type_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t old_name;
mach_port_name_t new_name;
} __Request__mach_port_rename_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_right_t right;
mach_port_name_t name;
} __Request__mach_port_allocate_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_right_t right;
} __Request__mach_port_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_right_t right;
} __Request__mach_port_get_refs_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_right_t right;
mach_port_delta_t delta;
} __Request__mach_port_mod_refs_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_msg_trailer_type_t trailer_type;
mach_port_seqno_t request_seqnop;
mach_msg_type_number_t trailer_infopCnt;
} __Request__mach_port_peek_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_mscount_t mscount;
} __Request__mach_port_set_mscount_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_get_set_status_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t member;
mach_port_name_t after;
} __Request__mach_port_move_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t notify;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_port_name_t name;
mach_msg_id_t msgid;
mach_port_mscount_t sync;
} __Request__mach_port_request_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t poly;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_insert_right_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_msg_type_name_t msgt_name;
} __Request__mach_port_extract_right_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_seqno_t seqno;
} __Request__mach_port_set_seqno_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_flavor_t flavor;
mach_msg_type_number_t port_info_outCnt;
} __Request__mach_port_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_flavor_t flavor;
mach_msg_type_number_t port_infoCnt;
integer_t port_info[17];
} __Request__mach_port_set_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_right_t right;
mach_port_qos_t qos;
} __Request__mach_port_allocate_qos_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t proto;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_port_right_t right;
mach_port_qos_t qos;
mach_port_name_t name;
} __Request__mach_port_allocate_full_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int table_entries;
} __Request__task_set_port_space_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_get_srights_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_port_space_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_dnrequest_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_kernel_object_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_name_t pset;
} __Request__mach_port_insert_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_name_t pset;
} __Request__mach_port_extract_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_get_context_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_vm_address_t context;
} __Request__mach_port_set_context_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_kobject_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t options;
/* end of the kernel processed data */
NDR_record_t NDR;
uint64_t context;
} __Request__mach_port_construct_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_delta_t srdelta;
uint64_t guard;
} __Request__mach_port_destruct_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
uint64_t guard;
boolean_t strict;
} __Request__mach_port_guard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
uint64_t guard;
} __Request__mach_port_unguard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_port_space_basic_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_special_reply_port_reset_link_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
uint64_t guard;
uint64_t flags;
} __Request__mach_port_guard_with_flags_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
uint64_t old_guard;
uint64_t new_guard;
} __Request__mach_port_swap_guard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_kobject_description_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t connection_port;
mach_port_name_t service_port;
} __Request__mach_port_is_connection_for_service_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
} __Request__mach_port_get_service_port_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_port_name_t name;
mach_port_flavor_t flavor;
mach_msg_type_number_t infoCnt;
integer_t info[17];
} __Request__mach_port_assert_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_port_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__mach_port_subsystem__defined
#define __RequestUnion__mach_port_subsystem__defined
union __RequestUnion__mach_port_subsystem {
__Request__mach_port_names_t Request_mach_port_names;
__Request__mach_port_type_t Request_mach_port_type;
__Request__mach_port_rename_t Request_mach_port_rename;
__Request__mach_port_allocate_name_t Request_mach_port_allocate_name;
__Request__mach_port_allocate_t Request_mach_port_allocate;
__Request__mach_port_destroy_t Request_mach_port_destroy;
__Request__mach_port_deallocate_t Request_mach_port_deallocate;
__Request__mach_port_get_refs_t Request_mach_port_get_refs;
__Request__mach_port_mod_refs_t Request_mach_port_mod_refs;
__Request__mach_port_peek_t Request_mach_port_peek;
__Request__mach_port_set_mscount_t Request_mach_port_set_mscount;
__Request__mach_port_get_set_status_t Request_mach_port_get_set_status;
__Request__mach_port_move_member_t Request_mach_port_move_member;
__Request__mach_port_request_notification_t Request_mach_port_request_notification;
__Request__mach_port_insert_right_t Request_mach_port_insert_right;
__Request__mach_port_extract_right_t Request_mach_port_extract_right;
__Request__mach_port_set_seqno_t Request_mach_port_set_seqno;
__Request__mach_port_get_attributes_t Request_mach_port_get_attributes;
__Request__mach_port_set_attributes_t Request_mach_port_set_attributes;
__Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos;
__Request__mach_port_allocate_full_t Request_mach_port_allocate_full;
__Request__task_set_port_space_t Request_task_set_port_space;
__Request__mach_port_get_srights_t Request_mach_port_get_srights;
__Request__mach_port_space_info_t Request_mach_port_space_info;
__Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info;
__Request__mach_port_kernel_object_t Request_mach_port_kernel_object;
__Request__mach_port_insert_member_t Request_mach_port_insert_member;
__Request__mach_port_extract_member_t Request_mach_port_extract_member;
__Request__mach_port_get_context_t Request_mach_port_get_context;
__Request__mach_port_set_context_t Request_mach_port_set_context;
__Request__mach_port_kobject_t Request_mach_port_kobject;
__Request__mach_port_construct_t Request_mach_port_construct;
__Request__mach_port_destruct_t Request_mach_port_destruct;
__Request__mach_port_guard_t Request_mach_port_guard;
__Request__mach_port_unguard_t Request_mach_port_unguard;
__Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info;
__Request__mach_port_special_reply_port_reset_link_t Request_mach_port_special_reply_port_reset_link;
__Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags;
__Request__mach_port_swap_guard_t Request_mach_port_swap_guard;
__Request__mach_port_kobject_description_t Request_mach_port_kobject_description;
__Request__mach_port_is_connection_for_service_t Request_mach_port_is_connection_for_service;
__Request__mach_port_get_service_port_info_t Request_mach_port_get_service_port_info;
__Request__mach_port_assert_attributes_t Request_mach_port_assert_attributes;
};
#endif /* !__RequestUnion__mach_port_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_port_subsystem__defined
#define __Reply__mach_port_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t names;
mach_msg_ool_descriptor_t types;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t namesCnt;
mach_msg_type_number_t typesCnt;
} __Reply__mach_port_names_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_type_t ptype;
} __Reply__mach_port_type_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_rename_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_allocate_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_name_t name;
} __Reply__mach_port_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_urefs_t refs;
} __Reply__mach_port_get_refs_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_mod_refs_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_seqno_t request_seqnop;
mach_msg_size_t msg_sizep;
mach_msg_id_t msg_idp;
mach_msg_type_number_t trailer_infopCnt;
char trailer_infop[68];
} __Reply__mach_port_peek_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_set_mscount_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t members;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t membersCnt;
} __Reply__mach_port_get_set_status_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_move_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t previous;
/* end of the kernel processed data */
} __Reply__mach_port_request_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_insert_right_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t poly;
/* end of the kernel processed data */
} __Reply__mach_port_extract_right_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_set_seqno_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t port_info_outCnt;
integer_t port_info_out[17];
} __Reply__mach_port_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_set_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_qos_t qos;
mach_port_name_t name;
} __Reply__mach_port_allocate_qos_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_qos_t qos;
mach_port_name_t name;
} __Reply__mach_port_allocate_full_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__task_set_port_space_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_rights_t srights;
} __Reply__mach_port_get_srights_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t table_info;
mach_msg_ool_descriptor_t tree_info;
/* end of the kernel processed data */
NDR_record_t NDR;
ipc_info_space_t space_info;
mach_msg_type_number_t table_infoCnt;
mach_msg_type_number_t tree_infoCnt;
} __Reply__mach_port_space_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
unsigned dnr_total;
unsigned dnr_used;
} __Reply__mach_port_dnrequest_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
unsigned object_type;
unsigned object_addr;
} __Reply__mach_port_kernel_object_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_insert_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_extract_member_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t context;
} __Reply__mach_port_get_context_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_set_context_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
natural_t object_type;
mach_vm_address_t object_addr;
} __Reply__mach_port_kobject_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_port_name_t name;
} __Reply__mach_port_construct_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_destruct_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_guard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_unguard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
ipc_info_space_basic_t basic_info;
} __Reply__mach_port_space_basic_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
boolean_t srp_lost_link;
} __Reply__mach_port_special_reply_port_reset_link_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_guard_with_flags_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_swap_guard_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
natural_t object_type;
mach_vm_address_t object_addr;
mach_msg_type_number_t descriptionOffset; /* MiG doesn't use it */
mach_msg_type_number_t descriptionCnt;
char description[512];
} __Reply__mach_port_kobject_description_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
uint64_t filter_policy_id;
} __Reply__mach_port_is_connection_for_service_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_service_port_info_data_t sp_info_out;
} __Reply__mach_port_get_service_port_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_port_assert_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_port_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__mach_port_subsystem__defined
#define __ReplyUnion__mach_port_subsystem__defined
union __ReplyUnion__mach_port_subsystem {
__Reply__mach_port_names_t Reply_mach_port_names;
__Reply__mach_port_type_t Reply_mach_port_type;
__Reply__mach_port_rename_t Reply_mach_port_rename;
__Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name;
__Reply__mach_port_allocate_t Reply_mach_port_allocate;
__Reply__mach_port_destroy_t Reply_mach_port_destroy;
__Reply__mach_port_deallocate_t Reply_mach_port_deallocate;
__Reply__mach_port_get_refs_t Reply_mach_port_get_refs;
__Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs;
__Reply__mach_port_peek_t Reply_mach_port_peek;
__Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount;
__Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status;
__Reply__mach_port_move_member_t Reply_mach_port_move_member;
__Reply__mach_port_request_notification_t Reply_mach_port_request_notification;
__Reply__mach_port_insert_right_t Reply_mach_port_insert_right;
__Reply__mach_port_extract_right_t Reply_mach_port_extract_right;
__Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno;
__Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes;
__Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes;
__Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos;
__Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full;
__Reply__task_set_port_space_t Reply_task_set_port_space;
__Reply__mach_port_get_srights_t Reply_mach_port_get_srights;
__Reply__mach_port_space_info_t Reply_mach_port_space_info;
__Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info;
__Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object;
__Reply__mach_port_insert_member_t Reply_mach_port_insert_member;
__Reply__mach_port_extract_member_t Reply_mach_port_extract_member;
__Reply__mach_port_get_context_t Reply_mach_port_get_context;
__Reply__mach_port_set_context_t Reply_mach_port_set_context;
__Reply__mach_port_kobject_t Reply_mach_port_kobject;
__Reply__mach_port_construct_t Reply_mach_port_construct;
__Reply__mach_port_destruct_t Reply_mach_port_destruct;
__Reply__mach_port_guard_t Reply_mach_port_guard;
__Reply__mach_port_unguard_t Reply_mach_port_unguard;
__Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info;
__Reply__mach_port_special_reply_port_reset_link_t Reply_mach_port_special_reply_port_reset_link;
__Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags;
__Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard;
__Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description;
__Reply__mach_port_is_connection_for_service_t Reply_mach_port_is_connection_for_service;
__Reply__mach_port_get_service_port_info_t Reply_mach_port_get_service_port_info;
__Reply__mach_port_assert_attributes_t Reply_mach_port_assert_attributes;
};
#endif /* !__RequestUnion__mach_port_subsystem__defined */
#ifndef subsystem_to_name_map_mach_port
#define subsystem_to_name_map_mach_port \
{ "mach_port_names", 3200 },\
{ "mach_port_type", 3201 },\
{ "mach_port_rename", 3202 },\
{ "mach_port_allocate_name", 3203 },\
{ "mach_port_allocate", 3204 },\
{ "mach_port_destroy", 3205 },\
{ "mach_port_deallocate", 3206 },\
{ "mach_port_get_refs", 3207 },\
{ "mach_port_mod_refs", 3208 },\
{ "mach_port_peek", 3209 },\
{ "mach_port_set_mscount", 3210 },\
{ "mach_port_get_set_status", 3211 },\
{ "mach_port_move_member", 3212 },\
{ "mach_port_request_notification", 3213 },\
{ "mach_port_insert_right", 3214 },\
{ "mach_port_extract_right", 3215 },\
{ "mach_port_set_seqno", 3216 },\
{ "mach_port_get_attributes", 3217 },\
{ "mach_port_set_attributes", 3218 },\
{ "mach_port_allocate_qos", 3219 },\
{ "mach_port_allocate_full", 3220 },\
{ "task_set_port_space", 3221 },\
{ "mach_port_get_srights", 3222 },\
{ "mach_port_space_info", 3223 },\
{ "mach_port_dnrequest_info", 3224 },\
{ "mach_port_kernel_object", 3225 },\
{ "mach_port_insert_member", 3226 },\
{ "mach_port_extract_member", 3227 },\
{ "mach_port_get_context", 3228 },\
{ "mach_port_set_context", 3229 },\
{ "mach_port_kobject", 3230 },\
{ "mach_port_construct", 3231 },\
{ "mach_port_destruct", 3232 },\
{ "mach_port_guard", 3233 },\
{ "mach_port_unguard", 3234 },\
{ "mach_port_space_basic_info", 3235 },\
{ "mach_port_special_reply_port_reset_link", 3236 },\
{ "mach_port_guard_with_flags", 3237 },\
{ "mach_port_swap_guard", 3238 },\
{ "mach_port_kobject_description", 3239 },\
{ "mach_port_is_connection_for_service", 3240 },\
{ "mach_port_get_service_port_info", 3241 },\
{ "mach_port_assert_attributes", 3242 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _mach_port_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_control.h | #ifndef _memory_object_control_user_
#define _memory_object_control_user_
/* Module memory_object_control */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef memory_object_control_MSG_COUNT
#define memory_object_control_MSG_COUNT 12
#endif /* memory_object_control_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine memory_object_get_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_get_attributes
(
memory_object_control_t memory_control,
memory_object_flavor_t flavor,
memory_object_info_t attributes,
mach_msg_type_number_t *attributesCnt
);
/* Routine memory_object_change_attributes */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_change_attributes
(
memory_object_control_t memory_control,
memory_object_flavor_t flavor,
memory_object_info_t attributes,
mach_msg_type_number_t attributesCnt
);
/* Routine memory_object_synchronize_completed */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_synchronize_completed
(
memory_object_control_t memory_control,
memory_object_offset_t offset,
memory_object_size_t length
);
/* Routine memory_object_lock_request */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_lock_request
(
memory_object_control_t memory_control,
memory_object_offset_t offset,
memory_object_size_t size,
memory_object_offset_t *resid_offset,
integer_t *io_errno,
memory_object_return_t should_return,
integer_t flags,
vm_prot_t lock_value
);
/* Routine memory_object_destroy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_destroy
(
memory_object_control_t memory_control,
kern_return_t reason
);
/* Routine memory_object_upl_request */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_upl_request
(
memory_object_control_t memory_control,
memory_object_offset_t offset,
upl_size_t size,
upl_t *upl,
upl_page_info_array_t page_list,
mach_msg_type_number_t *page_listCnt,
integer_t cntrl_flags,
integer_t tag
);
/* Routine memory_object_super_upl_request */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_super_upl_request
(
memory_object_control_t memory_control,
memory_object_offset_t offset,
upl_size_t size,
upl_size_t super_size,
upl_t *upl,
upl_page_info_array_t page_list,
mach_msg_type_number_t *page_listCnt,
integer_t cntrl_flags,
integer_t tag
);
/* Routine memory_object_cluster_size */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_cluster_size
(
memory_object_control_t control,
memory_object_offset_t *start,
vm_size_t *length,
uint32_t *io_streaming,
memory_object_fault_info_t fault_info
);
/* Routine memory_object_page_op */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_page_op
(
memory_object_control_t memory_control,
memory_object_offset_t offset,
integer_t ops,
uint32_t *phys_entry,
integer_t *flags
);
/* Routine memory_object_recover_named */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_recover_named
(
memory_object_control_t memory_control,
boolean_t wait_on_terminating
);
/* Routine memory_object_release_name */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_release_name
(
memory_object_control_t memory_control,
integer_t flags
);
/* Routine memory_object_range_op */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t memory_object_range_op
(
memory_object_control_t memory_control,
memory_object_offset_t offset_beg,
memory_object_offset_t offset_end,
integer_t ops,
integer_t *range
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__memory_object_control_subsystem__defined
#define __Request__memory_object_control_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_flavor_t flavor;
mach_msg_type_number_t attributesCnt;
} __Request__memory_object_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_flavor_t flavor;
mach_msg_type_number_t attributesCnt;
int attributes[6];
} __Request__memory_object_change_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset;
memory_object_size_t length;
} __Request__memory_object_synchronize_completed_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset;
memory_object_size_t size;
memory_object_return_t should_return;
integer_t flags;
vm_prot_t lock_value;
} __Request__memory_object_lock_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t reason;
} __Request__memory_object_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset;
upl_size_t size;
mach_msg_type_number_t page_listCnt;
integer_t cntrl_flags;
integer_t tag;
} __Request__memory_object_upl_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset;
upl_size_t size;
upl_size_t super_size;
mach_msg_type_number_t page_listCnt;
integer_t cntrl_flags;
integer_t tag;
} __Request__memory_object_super_upl_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_fault_info_t fault_info;
} __Request__memory_object_cluster_size_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset;
integer_t ops;
} __Request__memory_object_page_op_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
boolean_t wait_on_terminating;
} __Request__memory_object_recover_named_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
integer_t flags;
} __Request__memory_object_release_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
memory_object_offset_t offset_beg;
memory_object_offset_t offset_end;
integer_t ops;
} __Request__memory_object_range_op_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__memory_object_control_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__memory_object_control_subsystem__defined
#define __RequestUnion__memory_object_control_subsystem__defined
union __RequestUnion__memory_object_control_subsystem {
__Request__memory_object_get_attributes_t Request_memory_object_get_attributes;
__Request__memory_object_change_attributes_t Request_memory_object_change_attributes;
__Request__memory_object_synchronize_completed_t Request_memory_object_synchronize_completed;
__Request__memory_object_lock_request_t Request_memory_object_lock_request;
__Request__memory_object_destroy_t Request_memory_object_destroy;
__Request__memory_object_upl_request_t Request_memory_object_upl_request;
__Request__memory_object_super_upl_request_t Request_memory_object_super_upl_request;
__Request__memory_object_cluster_size_t Request_memory_object_cluster_size;
__Request__memory_object_page_op_t Request_memory_object_page_op;
__Request__memory_object_recover_named_t Request_memory_object_recover_named;
__Request__memory_object_release_name_t Request_memory_object_release_name;
__Request__memory_object_range_op_t Request_memory_object_range_op;
};
#endif /* !__RequestUnion__memory_object_control_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__memory_object_control_subsystem__defined
#define __Reply__memory_object_control_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t attributesCnt;
int attributes[6];
} __Reply__memory_object_get_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__memory_object_change_attributes_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__memory_object_synchronize_completed_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
memory_object_offset_t resid_offset;
integer_t io_errno;
} __Reply__memory_object_lock_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__memory_object_destroy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t upl;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t page_listCnt;
upl_page_info_t page_list[256];
} __Reply__memory_object_upl_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t upl;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t page_listCnt;
upl_page_info_t page_list[256];
} __Reply__memory_object_super_upl_request_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
memory_object_offset_t start;
vm_size_t length;
uint32_t io_streaming;
} __Reply__memory_object_cluster_size_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
uint32_t phys_entry;
integer_t flags;
} __Reply__memory_object_page_op_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__memory_object_recover_named_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__memory_object_release_name_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
integer_t range;
} __Reply__memory_object_range_op_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__memory_object_control_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__memory_object_control_subsystem__defined
#define __ReplyUnion__memory_object_control_subsystem__defined
union __ReplyUnion__memory_object_control_subsystem {
__Reply__memory_object_get_attributes_t Reply_memory_object_get_attributes;
__Reply__memory_object_change_attributes_t Reply_memory_object_change_attributes;
__Reply__memory_object_synchronize_completed_t Reply_memory_object_synchronize_completed;
__Reply__memory_object_lock_request_t Reply_memory_object_lock_request;
__Reply__memory_object_destroy_t Reply_memory_object_destroy;
__Reply__memory_object_upl_request_t Reply_memory_object_upl_request;
__Reply__memory_object_super_upl_request_t Reply_memory_object_super_upl_request;
__Reply__memory_object_cluster_size_t Reply_memory_object_cluster_size;
__Reply__memory_object_page_op_t Reply_memory_object_page_op;
__Reply__memory_object_recover_named_t Reply_memory_object_recover_named;
__Reply__memory_object_release_name_t Reply_memory_object_release_name;
__Reply__memory_object_range_op_t Reply_memory_object_range_op;
};
#endif /* !__RequestUnion__memory_object_control_subsystem__defined */
#ifndef subsystem_to_name_map_memory_object_control
#define subsystem_to_name_map_memory_object_control \
{ "memory_object_get_attributes", 2000 },\
{ "memory_object_change_attributes", 2001 },\
{ "memory_object_synchronize_completed", 2002 },\
{ "memory_object_lock_request", 2003 },\
{ "memory_object_destroy", 2004 },\
{ "memory_object_upl_request", 2005 },\
{ "memory_object_super_upl_request", 2006 },\
{ "memory_object_cluster_size", 2007 },\
{ "memory_object_page_op", 2008 },\
{ "memory_object_recover_named", 2009 },\
{ "memory_object_release_name", 2010 },\
{ "memory_object_range_op", 2011 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _memory_object_control_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/message.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* NOTICE: This file was modified by McAfee Research in 2004 to introduce
* support for mandatory and extensible security protections. This notice
* is included in support of clause 2.2 (b) of the Apple Public License,
* Version 2.0.
* Copyright (c) 2005 SPARTA, Inc.
*/
/*
*/
/*
* File: mach/message.h
*
* Mach IPC message and primitive function definitions.
*/
#ifndef _MACH_MESSAGE_H_
#define _MACH_MESSAGE_H_
#include <stdint.h>
#include <mach/port.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/machine/vm_types.h>
#include <sys/cdefs.h>
#include <sys/appleapiopts.h>
#include <Availability.h>
/*
* The timeout mechanism uses mach_msg_timeout_t values,
* passed by value. The timeout units are milliseconds.
* It is controlled with the MACH_SEND_TIMEOUT
* and MACH_RCV_TIMEOUT options.
*/
typedef natural_t mach_msg_timeout_t;
/*
* The value to be used when there is no timeout.
* (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.)
*/
#define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0)
/*
* The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it
* assumes the body of the message doesn't contain port rights or OOL
* data. The field is set in received messages. A user task must
* use caution in interpreting the body of a message if the bit isn't
* on, because the mach_msg_type's in the body might "lie" about the
* contents. If the bit isn't on, but the mach_msg_types
* in the body specify rights or OOL data, the behavior is undefined.
* (Ie, an error may or may not be produced.)
*
* The value of MACH_MSGH_BITS_REMOTE determines the interpretation
* of the msgh_remote_port field. It is handled like a msgt_name,
* but must result in a send or send-once type right.
*
* The value of MACH_MSGH_BITS_LOCAL determines the interpretation
* of the msgh_local_port field. It is handled like a msgt_name,
* and also must result in a send or send-once type right.
*
* The value of MACH_MSGH_BITS_VOUCHER determines the interpretation
* of the msgh_voucher_port field. It is handled like a msgt_name,
* but must result in a send right (and the msgh_voucher_port field
* must be the name of a send right to a Mach voucher kernel object.
*
* MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote
* and local fields, into a single value suitable for msgh_bits.
*
* MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally.
*
* The unused bits should be zero and are reserved for the kernel
* or for future interface expansion.
*/
#define MACH_MSGH_BITS_ZERO 0x00000000
#define MACH_MSGH_BITS_REMOTE_MASK 0x0000001f
#define MACH_MSGH_BITS_LOCAL_MASK 0x00001f00
#define MACH_MSGH_BITS_VOUCHER_MASK 0x001f0000
#define MACH_MSGH_BITS_PORTS_MASK \
(MACH_MSGH_BITS_REMOTE_MASK | \
MACH_MSGH_BITS_LOCAL_MASK | \
MACH_MSGH_BITS_VOUCHER_MASK)
#define MACH_MSGH_BITS_COMPLEX 0x80000000U /* message is complex */
#define MACH_MSGH_BITS_USER 0x801f1f1fU /* allowed bits user->kernel */
#define MACH_MSGH_BITS_RAISEIMP 0x20000000U /* importance raised due to msg */
#define MACH_MSGH_BITS_DENAP MACH_MSGH_BITS_RAISEIMP
#define MACH_MSGH_BITS_IMPHOLDASRT 0x10000000U /* assertion help, userland private */
#define MACH_MSGH_BITS_DENAPHOLDASRT MACH_MSGH_BITS_IMPHOLDASRT
#define MACH_MSGH_BITS_CIRCULAR 0x10000000U /* message circular, kernel private */
#define MACH_MSGH_BITS_USED 0xb01f1f1fU
/* setter macros for the bits */
#define MACH_MSGH_BITS(remote, local) /* legacy */ \
((remote) | ((local) << 8))
#define MACH_MSGH_BITS_SET_PORTS(remote, local, voucher) \
(((remote) & MACH_MSGH_BITS_REMOTE_MASK) | \
(((local) << 8) & MACH_MSGH_BITS_LOCAL_MASK) | \
(((voucher) << 16) & MACH_MSGH_BITS_VOUCHER_MASK))
#define MACH_MSGH_BITS_SET(remote, local, voucher, other) \
(MACH_MSGH_BITS_SET_PORTS((remote), (local), (voucher)) \
| ((other) &~ MACH_MSGH_BITS_PORTS_MASK))
/* getter macros for pulling values out of the bits field */
#define MACH_MSGH_BITS_REMOTE(bits) \
((bits) & MACH_MSGH_BITS_REMOTE_MASK)
#define MACH_MSGH_BITS_LOCAL(bits) \
(((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8)
#define MACH_MSGH_BITS_VOUCHER(bits) \
(((bits) & MACH_MSGH_BITS_VOUCHER_MASK) >> 16)
#define MACH_MSGH_BITS_PORTS(bits) \
((bits) & MACH_MSGH_BITS_PORTS_MASK)
#define MACH_MSGH_BITS_OTHER(bits) \
((bits) &~ MACH_MSGH_BITS_PORTS_MASK)
/* checking macros */
#define MACH_MSGH_BITS_HAS_REMOTE(bits) \
(MACH_MSGH_BITS_REMOTE(bits) != MACH_MSGH_BITS_ZERO)
#define MACH_MSGH_BITS_HAS_LOCAL(bits) \
(MACH_MSGH_BITS_LOCAL(bits) != MACH_MSGH_BITS_ZERO)
#define MACH_MSGH_BITS_HAS_VOUCHER(bits) \
(MACH_MSGH_BITS_VOUCHER(bits) != MACH_MSGH_BITS_ZERO)
#define MACH_MSGH_BITS_IS_COMPLEX(bits) \
(((bits) & MACH_MSGH_BITS_COMPLEX) != MACH_MSGH_BITS_ZERO)
/* importance checking macros */
#define MACH_MSGH_BITS_RAISED_IMPORTANCE(bits) \
(((bits) & MACH_MSGH_BITS_RAISEIMP) != MACH_MSGH_BITS_ZERO)
#define MACH_MSGH_BITS_HOLDS_IMPORTANCE_ASSERTION(bits) \
(((bits) & MACH_MSGH_BITS_IMPHOLDASRT) != MACH_MSGH_BITS_ZERO)
/*
* Every message starts with a message header.
* Following the message header, if the message is complex, are a count
* of type descriptors and the type descriptors themselves
* (mach_msg_descriptor_t). The size of the message must be specified in
* bytes, and includes the message header, descriptor count, descriptors,
* and inline data.
*
* The msgh_remote_port field specifies the destination of the message.
* It must specify a valid send or send-once right for a port.
*
* The msgh_local_port field specifies a "reply port". Normally,
* This field carries a send-once right that the receiver will use
* to reply to the message. It may carry the values MACH_PORT_NULL,
* MACH_PORT_DEAD, a send-once right, or a send right.
*
* The msgh_voucher_port field specifies a Mach voucher port. Only
* send rights to kernel-implemented Mach Voucher kernel objects in
* addition to MACH_PORT_NULL or MACH_PORT_DEAD may be passed.
*
* The msgh_id field is uninterpreted by the message primitives.
* It normally carries information specifying the format
* or meaning of the message.
*/
typedef unsigned int mach_msg_bits_t;
typedef natural_t mach_msg_size_t;
typedef integer_t mach_msg_id_t;
#define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0
typedef unsigned int mach_msg_priority_t;
#define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0
typedef unsigned int mach_msg_type_name_t;
#define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */
#define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send right(s) */
#define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce right */
#define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send right(s) */
#define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */
#define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive right */
#define MACH_MSG_TYPE_COPY_RECEIVE 22 /* NOT VALID */
#define MACH_MSG_TYPE_DISPOSE_RECEIVE 24 /* must hold receive right */
#define MACH_MSG_TYPE_DISPOSE_SEND 25 /* must hold send right(s) */
#define MACH_MSG_TYPE_DISPOSE_SEND_ONCE 26 /* must hold sendonce right */
typedef unsigned int mach_msg_copy_options_t;
#define MACH_MSG_PHYSICAL_COPY 0
#define MACH_MSG_VIRTUAL_COPY 1
#define MACH_MSG_ALLOCATE 2
#define MACH_MSG_OVERWRITE 3 /* deprecated */
#ifdef MACH_KERNEL
#define MACH_MSG_KALLOC_COPY_T 4
#endif /* MACH_KERNEL */
#define MACH_MSG_GUARD_FLAGS_NONE 0x0000
#define MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE 0x0001 /* Move the receive right and mark it as immovable */
#define MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND 0x0002 /* Verify that the port is unguarded */
#define MACH_MSG_GUARD_FLAGS_MASK 0x0003 /* Valid flag bits */
typedef unsigned int mach_msg_guard_flags_t;
/*
* In a complex mach message, the mach_msg_header_t is followed by
* a descriptor count, then an array of that number of descriptors
* (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t
* (which any descriptor can be cast to) indicates the flavor of the
* descriptor.
*
* Note that in LP64, the various types of descriptors are no longer all
* the same size as mach_msg_descriptor_t, so the array cannot be indexed
* as expected.
*/
typedef unsigned int mach_msg_descriptor_type_t;
#define MACH_MSG_PORT_DESCRIPTOR 0
#define MACH_MSG_OOL_DESCRIPTOR 1
#define MACH_MSG_OOL_PORTS_DESCRIPTOR 2
#define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3
#define MACH_MSG_GUARDED_PORT_DESCRIPTOR 4
#pragma pack(push, 4)
typedef struct{
natural_t pad1;
mach_msg_size_t pad2;
unsigned int pad3 : 24;
mach_msg_descriptor_type_t type : 8;
} mach_msg_type_descriptor_t;
typedef struct{
mach_port_t name;
#if !(defined(KERNEL) && defined(__LP64__))
// Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes
mach_msg_size_t pad1;
#endif
unsigned int pad2 : 16;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
uint32_t pad_end;
} mach_msg_port_descriptor_t;
typedef struct{
uint32_t address;
mach_msg_size_t size;
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
unsigned int pad1: 8;
mach_msg_descriptor_type_t type: 8;
} mach_msg_ool_descriptor32_t;
typedef struct{
uint64_t address;
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
unsigned int pad1: 8;
mach_msg_descriptor_type_t type: 8;
mach_msg_size_t size;
} mach_msg_ool_descriptor64_t;
typedef struct{
void* address;
#if !defined(__LP64__)
mach_msg_size_t size;
#endif
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
unsigned int pad1: 8;
mach_msg_descriptor_type_t type: 8;
#if defined(__LP64__)
mach_msg_size_t size;
#endif
#if defined(KERNEL) && !defined(__LP64__)
uint32_t pad_end;
#endif
} mach_msg_ool_descriptor_t;
typedef struct{
uint32_t address;
mach_msg_size_t count;
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
} mach_msg_ool_ports_descriptor32_t;
typedef struct{
uint64_t address;
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
mach_msg_size_t count;
} mach_msg_ool_ports_descriptor64_t;
typedef struct{
void* address;
#if !defined(__LP64__)
mach_msg_size_t count;
#endif
boolean_t deallocate: 8;
mach_msg_copy_options_t copy: 8;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
#if defined(__LP64__)
mach_msg_size_t count;
#endif
#if defined(KERNEL) && !defined(__LP64__)
uint32_t pad_end;
#endif
} mach_msg_ool_ports_descriptor_t;
typedef struct{
uint32_t context;
mach_port_name_t name;
mach_msg_guard_flags_t flags : 16;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
} mach_msg_guarded_port_descriptor32_t;
typedef struct{
uint64_t context;
mach_msg_guard_flags_t flags : 16;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
mach_port_name_t name;
} mach_msg_guarded_port_descriptor64_t;
typedef struct{
mach_port_t name;
#if !defined(__LP64__)
uint32_t pad1;
#endif
mach_msg_guard_flags_t flags : 16;
mach_msg_type_name_t disposition : 8;
mach_msg_descriptor_type_t type : 8;
#if defined(__LP64__)
uint32_t pad_end;
#endif /* defined(__LP64__) */
} mach_msg_guarded_port_descriptor_t;
/*
* LP64support - This union definition is not really
* appropriate in LP64 mode because not all descriptors
* are of the same size in that environment.
*/
#if defined(__LP64__) && defined(KERNEL)
typedef union{
mach_msg_port_descriptor_t port;
mach_msg_ool_descriptor32_t out_of_line;
mach_msg_ool_ports_descriptor32_t ool_ports;
mach_msg_type_descriptor_t type;
mach_msg_guarded_port_descriptor32_t guarded_port;
} mach_msg_descriptor_t;
#else
typedef union{
mach_msg_port_descriptor_t port;
mach_msg_ool_descriptor_t out_of_line;
mach_msg_ool_ports_descriptor_t ool_ports;
mach_msg_type_descriptor_t type;
mach_msg_guarded_port_descriptor_t guarded_port;
} mach_msg_descriptor_t;
#endif
typedef struct{
mach_msg_size_t msgh_descriptor_count;
} mach_msg_body_t;
#define MACH_MSG_BODY_NULL ((mach_msg_body_t *) 0)
#define MACH_MSG_DESCRIPTOR_NULL ((mach_msg_descriptor_t *) 0)
typedef struct{
mach_msg_bits_t msgh_bits;
mach_msg_size_t msgh_size;
mach_port_t msgh_remote_port;
mach_port_t msgh_local_port;
mach_port_name_t msgh_voucher_port;
mach_msg_id_t msgh_id;
} mach_msg_header_t;
#define msgh_reserved msgh_voucher_port
#define MACH_MSG_NULL ((mach_msg_header_t *) 0)
typedef struct{
mach_msg_header_t header;
mach_msg_body_t body;
} mach_msg_base_t;
typedef unsigned int mach_msg_trailer_type_t;
#define MACH_MSG_TRAILER_FORMAT_0 0
typedef unsigned int mach_msg_trailer_size_t;
typedef char *mach_msg_trailer_info_t;
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
} mach_msg_trailer_t;
/*
* The msgh_seqno field carries a sequence number
* associated with the received-from port. A port's
* sequence number is incremented every time a message
* is received from it and included in the received
* trailer to help put messages back in sequence if
* multiple threads receive and/or process received
* messages.
*/
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
mach_port_seqno_t msgh_seqno;
} mach_msg_seqno_trailer_t;
typedef struct{
unsigned int val[2];
} security_token_t;
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
mach_port_seqno_t msgh_seqno;
security_token_t msgh_sender;
} mach_msg_security_trailer_t;
/*
* The audit token is an opaque token which identifies
* Mach tasks and senders of Mach messages as subjects
* to the BSM audit system. Only the appropriate BSM
* library routines should be used to interpret the
* contents of the audit token as the representation
* of the subject identity within the token may change
* over time.
*/
typedef struct{
unsigned int val[8];
} audit_token_t;
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
mach_port_seqno_t msgh_seqno;
security_token_t msgh_sender;
audit_token_t msgh_audit;
} mach_msg_audit_trailer_t;
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
mach_port_seqno_t msgh_seqno;
security_token_t msgh_sender;
audit_token_t msgh_audit;
mach_port_context_t msgh_context;
} mach_msg_context_trailer_t;
typedef struct{
mach_port_name_t sender;
} msg_labels_t;
typedef int mach_msg_filter_id;
#define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0
/*
* Trailer type to pass MAC policy label info as a mach message trailer.
*
*/
typedef struct{
mach_msg_trailer_type_t msgh_trailer_type;
mach_msg_trailer_size_t msgh_trailer_size;
mach_port_seqno_t msgh_seqno;
security_token_t msgh_sender;
audit_token_t msgh_audit;
mach_port_context_t msgh_context;
mach_msg_filter_id msgh_ad;
msg_labels_t msgh_labels;
} mach_msg_mac_trailer_t;
#define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t)
/*
* These values can change from release to release - but clearly
* code cannot request additional trailer elements one was not
* compiled to understand. Therefore, it is safe to use this
* constant when the same module specified the receive options.
* Otherwise, you run the risk that the options requested by
* another module may exceed the local modules notion of
* MAX_TRAILER_SIZE.
*/
typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t;
#define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t))
/*
* Legacy requirements keep us from ever updating these defines (even
* when the format_0 trailers gain new option data fields in the future).
* Therefore, they shouldn't be used going forward. Instead, the sizes
* should be compared against the specific element size requested using
* REQUESTED_TRAILER_SIZE.
*/
typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t;
/*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t;
*/
#define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t)
#define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} }
extern const security_token_t KERNEL_SECURITY_TOKEN;
#define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} }
extern const audit_token_t KERNEL_AUDIT_TOKEN;
typedef integer_t mach_msg_options_t;
typedef struct{
mach_msg_header_t header;
} mach_msg_empty_send_t;
typedef struct{
mach_msg_header_t header;
mach_msg_trailer_t trailer;
} mach_msg_empty_rcv_t;
typedef union{
mach_msg_empty_send_t send;
mach_msg_empty_rcv_t rcv;
} mach_msg_empty_t;
#pragma pack(pop)
/* utility to round the message size - will become machine dependent */
#define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \
~(sizeof (natural_t) - 1))
/*
* There is no fixed upper bound to the size of Mach messages.
*/
#define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0)
#if defined(__APPLE_API_PRIVATE)
/*
* But architectural limits of a given implementation, or
* temporal conditions may cause unpredictable send failures
* for messages larger than MACH_MSG_SIZE_RELIABLE.
*
* In either case, waiting for memory is [currently] outside
* the scope of send timeout values provided to IPC.
*/
#define MACH_MSG_SIZE_RELIABLE ((mach_msg_size_t) 256 * 1024)
#endif
/*
* Compatibility definitions, for code written
* when there was a msgh_kind instead of msgh_seqno.
*/
#define MACH_MSGH_KIND_NORMAL 0x00000000
#define MACH_MSGH_KIND_NOTIFICATION 0x00000001
#define msgh_kind msgh_seqno
#define mach_msg_kind_t mach_port_seqno_t
typedef natural_t mach_msg_type_size_t;
typedef natural_t mach_msg_type_number_t;
/*
* Values received/carried in messages. Tells the receiver what
* sort of port right he now has.
*
* MACH_MSG_TYPE_PORT_NAME is used to transfer a port name
* which should remain uninterpreted by the kernel. (Port rights
* are not transferred, just the port name.)
*/
#define MACH_MSG_TYPE_PORT_NONE 0
#define MACH_MSG_TYPE_PORT_NAME 15
#define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE
#define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND
#define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE
#define MACH_MSG_TYPE_LAST 22 /* Last assigned */
/*
* A dummy value. Mostly used to indicate that the actual value
* will be filled in later, dynamically.
*/
#define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1)
/*
* Is a given item a port type?
*/
#define MACH_MSG_TYPE_PORT_ANY(x) \
(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \
((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE))
#define MACH_MSG_TYPE_PORT_ANY_SEND(x) \
(((x) >= MACH_MSG_TYPE_MOVE_SEND) && \
((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE))
#define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \
(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \
((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE))
typedef integer_t mach_msg_option_t;
#define MACH_MSG_OPTION_NONE 0x00000000
#define MACH_SEND_MSG 0x00000001
#define MACH_RCV_MSG 0x00000002
#define MACH_RCV_LARGE 0x00000004 /* report large message sizes */
#define MACH_RCV_LARGE_IDENTITY 0x00000008 /* identify source of large messages */
#define MACH_SEND_TIMEOUT 0x00000010 /* timeout value applies to send */
#define MACH_SEND_OVERRIDE 0x00000020 /* priority override for send */
#define MACH_SEND_INTERRUPT 0x00000040 /* don't restart interrupted sends */
#define MACH_SEND_NOTIFY 0x00000080 /* arm send-possible notify */
#define MACH_SEND_ALWAYS 0x00010000 /* ignore qlimits - kernel only */
#define MACH_SEND_FILTER_NONFATAL 0x00010000 /* rejection by message filter should return failure - user only */
#define MACH_SEND_TRAILER 0x00020000 /* sender-provided trailer */
#define MACH_SEND_NOIMPORTANCE 0x00040000 /* msg won't carry importance */
#define MACH_SEND_NODENAP MACH_SEND_NOIMPORTANCE
#define MACH_SEND_IMPORTANCE 0x00080000 /* msg carries importance - kernel only */
#define MACH_SEND_SYNC_OVERRIDE 0x00100000 /* msg should do sync IPC override (on legacy kernels) */
#define MACH_SEND_PROPAGATE_QOS 0x00200000 /* IPC should propagate the caller's QoS */
#define MACH_SEND_SYNC_USE_THRPRI MACH_SEND_PROPAGATE_QOS /* obsolete name */
#define MACH_SEND_KERNEL 0x00400000 /* full send from kernel space - kernel only */
#define MACH_SEND_SYNC_BOOTSTRAP_CHECKIN 0x00800000 /* special reply port should boost thread doing sync bootstrap checkin */
#define MACH_RCV_TIMEOUT 0x00000100 /* timeout value applies to receive */
#define MACH_RCV_NOTIFY 0x00000000 /* legacy name (value was: 0x00000200) */
#define MACH_RCV_INTERRUPT 0x00000400 /* don't restart interrupted receive */
#define MACH_RCV_VOUCHER 0x00000800 /* willing to receive voucher port */
#define MACH_RCV_OVERWRITE 0x00000000 /* scatter receive (deprecated) */
#define MACH_RCV_GUARDED_DESC 0x00001000 /* Can receive new guarded descriptor */
#define MACH_RCV_SYNC_WAIT 0x00004000 /* sync waiter waiting for rcv */
#define MACH_RCV_SYNC_PEEK 0x00008000 /* sync waiter waiting to peek */
#define MACH_MSG_STRICT_REPLY 0x00000200 /* Enforce specific properties about the reply port, and
* the context in which a thread replies to a message.
* This flag must be passed on both the SEND and RCV */
/*
* NOTE: a 0x00------ RCV mask implies to ask for
* a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements,
* which is equivalent to a mach_msg_trailer_t.
*
* XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS
* needs its own private bit since we only calculate its fields when absolutely
* required.
*/
#define MACH_RCV_TRAILER_NULL 0
#define MACH_RCV_TRAILER_SEQNO 1
#define MACH_RCV_TRAILER_SENDER 2
#define MACH_RCV_TRAILER_AUDIT 3
#define MACH_RCV_TRAILER_CTX 4
#define MACH_RCV_TRAILER_AV 7
#define MACH_RCV_TRAILER_LABELS 8
#define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28)
#define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24)
#define MACH_RCV_TRAILER_MASK ((0xf << 24))
#define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf)
/*
* XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS,
* we just fall through to mach_msg_max_trailer_t.
* This is correct behavior since mach_msg_max_trailer_t is defined as
* mac_msg_mac_trailer_t which is used for the LABELS trailer.
* It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed
* with one of the other options.
*/
#define REQUESTED_TRAILER_SIZE_NATIVE(y) \
((mach_msg_trailer_size_t) \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \
sizeof(mach_msg_trailer_t) : \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \
sizeof(mach_msg_seqno_trailer_t) : \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \
sizeof(mach_msg_security_trailer_t) : \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \
sizeof(mach_msg_audit_trailer_t) : \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \
sizeof(mach_msg_context_trailer_t) : \
((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \
sizeof(mach_msg_mac_trailer_t) : \
sizeof(mach_msg_max_trailer_t))))))))
#define REQUESTED_TRAILER_SIZE(y) REQUESTED_TRAILER_SIZE_NATIVE(y)
/*
* Much code assumes that mach_msg_return_t == kern_return_t.
* This definition is useful for descriptive purposes.
*
* See <mach/error.h> for the format of error codes.
* IPC errors are system 4. Send errors are subsystem 0;
* receive errors are subsystem 1. The code field is always non-zero.
* The high bits of the code field communicate extra information
* for some error codes. MACH_MSG_MASK masks off these special bits.
*/
typedef kern_return_t mach_msg_return_t;
#define MACH_MSG_SUCCESS 0x00000000
#define MACH_MSG_MASK 0x00003e00
/* All special error code bits defined below. */
#define MACH_MSG_IPC_SPACE 0x00002000
/* No room in IPC name space for another capability name. */
#define MACH_MSG_VM_SPACE 0x00001000
/* No room in VM address space for out-of-line memory. */
#define MACH_MSG_IPC_KERNEL 0x00000800
/* Kernel resource shortage handling an IPC capability. */
#define MACH_MSG_VM_KERNEL 0x00000400
/* Kernel resource shortage handling out-of-line memory. */
#define MACH_SEND_IN_PROGRESS 0x10000001
/* Thread is waiting to send. (Internal use only.) */
#define MACH_SEND_INVALID_DATA 0x10000002
/* Bogus in-line data. */
#define MACH_SEND_INVALID_DEST 0x10000003
/* Bogus destination port. */
#define MACH_SEND_TIMED_OUT 0x10000004
/* Message not sent before timeout expired. */
#define MACH_SEND_INVALID_VOUCHER 0x10000005
/* Bogus voucher port. */
#define MACH_SEND_INTERRUPTED 0x10000007
/* Software interrupt. */
#define MACH_SEND_MSG_TOO_SMALL 0x10000008
/* Data doesn't contain a complete message. */
#define MACH_SEND_INVALID_REPLY 0x10000009
/* Bogus reply port. */
#define MACH_SEND_INVALID_RIGHT 0x1000000a
/* Bogus port rights in the message body. */
#define MACH_SEND_INVALID_NOTIFY 0x1000000b
/* Bogus notify port argument. */
#define MACH_SEND_INVALID_MEMORY 0x1000000c
/* Invalid out-of-line memory pointer. */
#define MACH_SEND_NO_BUFFER 0x1000000d
/* No message buffer is available. */
#define MACH_SEND_TOO_LARGE 0x1000000e
/* Send is too large for port */
#define MACH_SEND_INVALID_TYPE 0x1000000f
/* Invalid msg-type specification. */
#define MACH_SEND_INVALID_HEADER 0x10000010
/* A field in the header had a bad value. */
#define MACH_SEND_INVALID_TRAILER 0x10000011
/* The trailer to be sent does not match kernel format. */
#define MACH_SEND_INVALID_CONTEXT 0x10000012
/* The sending thread context did not match the context on the dest port */
#define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015
/* compatibility: no longer a returned error */
#define MACH_SEND_NO_GRANT_DEST 0x10000016
/* The destination port doesn't accept ports in body */
#define MACH_SEND_MSG_FILTERED 0x10000017
/* Message send was rejected by message filter */
#define MACH_RCV_IN_PROGRESS 0x10004001
/* Thread is waiting for receive. (Internal use only.) */
#define MACH_RCV_INVALID_NAME 0x10004002
/* Bogus name for receive port/port-set. */
#define MACH_RCV_TIMED_OUT 0x10004003
/* Didn't get a message within the timeout value. */
#define MACH_RCV_TOO_LARGE 0x10004004
/* Message buffer is not large enough for inline data. */
#define MACH_RCV_INTERRUPTED 0x10004005
/* Software interrupt. */
#define MACH_RCV_PORT_CHANGED 0x10004006
/* compatibility: no longer a returned error */
#define MACH_RCV_INVALID_NOTIFY 0x10004007
/* Bogus notify port argument. */
#define MACH_RCV_INVALID_DATA 0x10004008
/* Bogus message buffer for inline data. */
#define MACH_RCV_PORT_DIED 0x10004009
/* Port/set was sent away/died during receive. */
#define MACH_RCV_IN_SET 0x1000400a
/* compatibility: no longer a returned error */
#define MACH_RCV_HEADER_ERROR 0x1000400b
/* Error receiving message header. See special bits. */
#define MACH_RCV_BODY_ERROR 0x1000400c
/* Error receiving message body. See special bits. */
#define MACH_RCV_INVALID_TYPE 0x1000400d
/* Invalid msg-type specification in scatter list. */
#define MACH_RCV_SCATTER_SMALL 0x1000400e
/* Out-of-line overwrite region is not large enough */
#define MACH_RCV_INVALID_TRAILER 0x1000400f
/* trailer type or number of trailer elements not supported */
#define MACH_RCV_IN_PROGRESS_TIMED 0x10004011
/* Waiting for receive with timeout. (Internal use only.) */
#define MACH_RCV_INVALID_REPLY 0x10004012
/* invalid reply port used in a STRICT_REPLY message */
__BEGIN_DECLS
/*
* Routine: mach_msg_overwrite
* Purpose:
* Send and/or receive a message. If the message operation
* is interrupted, and the user did not request an indication
* of that fact, then restart the appropriate parts of the
* operation silently (trap version does not restart).
*
* Distinct send and receive buffers may be specified. If
* no separate receive buffer is specified, the msg parameter
* will be used for both send and receive operations.
*
* In addition to a distinct receive buffer, that buffer may
* already contain scatter control information to direct the
* receiving of the message.
*/
__WATCHOS_PROHIBITED __TVOS_PROHIBITED
extern mach_msg_return_t mach_msg_overwrite(
mach_msg_header_t *msg,
mach_msg_option_t option,
mach_msg_size_t send_size,
mach_msg_size_t rcv_size,
mach_port_name_t rcv_name,
mach_msg_timeout_t timeout,
mach_port_name_t notify,
mach_msg_header_t *rcv_msg,
mach_msg_size_t rcv_limit);
__END_DECLS
#endif /* _MACH_MESSAGE_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/ndr.h | /*
* Copyright (c) 2000-2005 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
#ifndef _MACH_NDR_H_
#define _MACH_NDR_H_
#include <stdint.h>
#include <sys/cdefs.h>
#include <libkern/OSByteOrder.h>
typedef struct {
unsigned char mig_vers;
unsigned char if_vers;
unsigned char reserved1;
unsigned char mig_encoding;
unsigned char int_rep;
unsigned char char_rep;
unsigned char float_rep;
unsigned char reserved2;
} NDR_record_t;
/*
* MIG supported protocols for Network Data Representation
*/
#define NDR_PROTOCOL_2_0 0
/*
* NDR 2.0 format flag type definition and values.
*/
#define NDR_INT_BIG_ENDIAN 0
#define NDR_INT_LITTLE_ENDIAN 1
#define NDR_FLOAT_IEEE 0
#define NDR_FLOAT_VAX 1
#define NDR_FLOAT_CRAY 2
#define NDR_FLOAT_IBM 3
#define NDR_CHAR_ASCII 0
#define NDR_CHAR_EBCDIC 1
extern NDR_record_t NDR_record;
/* NDR conversion off by default */
#if !defined(__NDR_convert__)
#define __NDR_convert__ 0
#endif /* !defined(__NDR_convert__) */
#ifndef __NDR_convert__int_rep__
#define __NDR_convert__int_rep__ __NDR_convert__
#endif /* __NDR_convert__int_rep__ */
#ifndef __NDR_convert__char_rep__
#define __NDR_convert__char_rep__ 0
#endif /* __NDR_convert__char_rep__ */
#ifndef __NDR_convert__float_rep__
#define __NDR_convert__float_rep__ 0
#endif /* __NDR_convert__float_rep__ */
#if __NDR_convert__
#define __NDR_convert__NOOP do ; while (0)
#define __NDR_convert__UNKNOWN(s) __NDR_convert__NOOP
#define __NDR_convert__SINGLE(a, f, r) do { r((a), (f)); } while (0)
#define __NDR_convert__ARRAY(a, f, c, r) \
do { int __i__, __C__ = (c); \
for (__i__ = 0; __i__ < __C__; __i__++) \
r(&(a)[__i__], f); } while (0)
#define __NDR_convert__2DARRAY(a, f, s, c, r) \
do { int __i__, __C__ = (c), __S__ = (s); \
for (__i__ = 0; __i__ < __C__; __i__++) \
r(&(a)[__i__ * __S__], f, __S__); } while (0)
#if __NDR_convert__int_rep__
#define __NDR_READSWAP_assign(a, rs) do { *(a) = rs(a); } while (0)
#define __NDR_READSWAP__uint16_t(a) OSReadSwapInt16((void *)a, 0)
#define __NDR_READSWAP__int16_t(a) (int16_t)OSReadSwapInt16((void *)a, 0)
#define __NDR_READSWAP__uint32_t(a) OSReadSwapInt32((void *)a, 0)
#define __NDR_READSWAP__int32_t(a) (int32_t)OSReadSwapInt32((void *)a, 0)
#define __NDR_READSWAP__uint64_t(a) OSReadSwapInt64((void *)a, 0)
#define __NDR_READSWAP__int64_t(a) (int64_t)OSReadSwapInt64((void *)a, 0)
__BEGIN_DECLS
static __inline__ float
__NDR_READSWAP__float(float *argp)
{
union {
float sv;
uint32_t ull;
} result;
result.ull = __NDR_READSWAP__uint32_t((uint32_t *)argp);
return result.sv;
}
static __inline__ double
__NDR_READSWAP__double(double *argp)
{
union {
double sv;
uint64_t ull;
} result;
result.ull = __NDR_READSWAP__uint64_t((uint64_t *)argp);
return result.sv;
}
__END_DECLS
#define __NDR_convert__int_rep__int16_t__defined
#define __NDR_convert__int_rep__int16_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__int16_t)
#define __NDR_convert__int_rep__uint16_t__defined
#define __NDR_convert__int_rep__uint16_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__uint16_t)
#define __NDR_convert__int_rep__int32_t__defined
#define __NDR_convert__int_rep__int32_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__int32_t)
#define __NDR_convert__int_rep__uint32_t__defined
#define __NDR_convert__int_rep__uint32_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__uint32_t)
#define __NDR_convert__int_rep__int64_t__defined
#define __NDR_convert__int_rep__int64_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__int64_t)
#define __NDR_convert__int_rep__uint64_t__defined
#define __NDR_convert__int_rep__uint64_t(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__uint64_t)
#define __NDR_convert__int_rep__float__defined
#define __NDR_convert__int_rep__float(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__float)
#define __NDR_convert__int_rep__double__defined
#define __NDR_convert__int_rep__double(v, f) \
__NDR_READSWAP_assign(v, __NDR_READSWAP__double)
#define __NDR_convert__int_rep__boolean_t__defined
#define __NDR_convert__int_rep__boolean_t(v, f) \
__NDR_convert__int_rep__int32_t(v,f)
#define __NDR_convert__int_rep__kern_return_t__defined
#define __NDR_convert__int_rep__kern_return_t(v, f) \
__NDR_convert__int_rep__int32_t(v,f)
#define __NDR_convert__int_rep__mach_port_name_t__defined
#define __NDR_convert__int_rep__mach_port_name_t(v, f) \
__NDR_convert__int_rep__uint32_t(v,f)
#define __NDR_convert__int_rep__mach_msg_type_number_t__defined
#define __NDR_convert__int_rep__mach_msg_type_number_t(v, f) \
__NDR_convert__int_rep__uint32_t(v,f)
#endif /* __NDR_convert__int_rep__ */
#if __NDR_convert__char_rep__
#warning NDR character representation conversions not implemented yet!
#define __NDR_convert__char_rep__char(v, f) __NDR_convert__NOOP
#define __NDR_convert__char_rep__string(v, f, l) __NDR_convert__NOOP
#endif /* __NDR_convert__char_rep__ */
#if __NDR_convert__float_rep__
#warning NDR floating point representation conversions not implemented yet!
#define __NDR_convert__float_rep__float(v, f) __NDR_convert__NOOP
#define __NDR_convert__float_rep__double(v, f) __NDR_convert__NOOP
#endif /* __NDR_convert__float_rep__ */
#endif /* __NDR_convert__ */
#endif /* _MACH_NDR_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/thread_act.h | #ifndef _thread_act_user_
#define _thread_act_user_
/* Module thread_act */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef thread_act_MSG_COUNT
#define thread_act_MSG_COUNT 31
#endif /* thread_act_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine thread_terminate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_terminate
(
thread_act_t target_act
);
/* Routine act_get_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t act_get_state
(
thread_read_t target_act,
int flavor,
thread_state_t old_state,
mach_msg_type_number_t *old_stateCnt
);
/* Routine act_set_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t act_set_state
(
thread_act_t target_act,
int flavor,
thread_state_t new_state,
mach_msg_type_number_t new_stateCnt
);
/* Routine thread_get_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_state
(
thread_read_t target_act,
thread_state_flavor_t flavor,
thread_state_t old_state,
mach_msg_type_number_t *old_stateCnt
);
/* Routine thread_set_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_set_state
(
thread_act_t target_act,
thread_state_flavor_t flavor,
thread_state_t new_state,
mach_msg_type_number_t new_stateCnt
);
/* Routine thread_suspend */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_suspend
(
thread_read_t target_act
);
/* Routine thread_resume */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_resume
(
thread_read_t target_act
);
/* Routine thread_abort */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_abort
(
thread_act_t target_act
);
/* Routine thread_abort_safely */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_abort_safely
(
thread_act_t target_act
);
/* Routine thread_depress_abort */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_depress_abort
(
thread_act_t thread
);
/* Routine thread_get_special_port */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_special_port
(
thread_inspect_t thr_act,
int which_port,
mach_port_t *special_port
);
/* Routine thread_set_special_port */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_set_special_port
(
thread_act_t thr_act,
int which_port,
mach_port_t special_port
);
/* Routine thread_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_info
(
thread_inspect_t target_act,
thread_flavor_t flavor,
thread_info_t thread_info_out,
mach_msg_type_number_t *thread_info_outCnt
);
/* Routine thread_set_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_set_exception_ports
(
thread_act_t thread,
exception_mask_t exception_mask,
mach_port_t new_port,
exception_behavior_t behavior,
thread_state_flavor_t new_flavor
);
/* Routine thread_get_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_exception_ports
(
thread_act_t thread,
exception_mask_t exception_mask,
exception_mask_array_t masks,
mach_msg_type_number_t *masksCnt,
exception_handler_array_t old_handlers,
exception_behavior_array_t old_behaviors,
exception_flavor_array_t old_flavors
);
/* Routine thread_swap_exception_ports */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_swap_exception_ports
(
thread_act_t thread,
exception_mask_t exception_mask,
mach_port_t new_port,
exception_behavior_t behavior,
thread_state_flavor_t new_flavor,
exception_mask_array_t masks,
mach_msg_type_number_t *masksCnt,
exception_handler_array_t old_handlers,
exception_behavior_array_t old_behaviors,
exception_flavor_array_t old_flavors
);
/* Routine thread_policy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_policy
(
thread_act_t thr_act,
policy_t policy,
policy_base_t base,
mach_msg_type_number_t baseCnt,
boolean_t set_limit
);
/* Routine thread_policy_set */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_policy_set
(
thread_act_t thread,
thread_policy_flavor_t flavor,
thread_policy_t policy_info,
mach_msg_type_number_t policy_infoCnt
);
/* Routine thread_policy_get */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_policy_get
(
thread_inspect_t thread,
thread_policy_flavor_t flavor,
thread_policy_t policy_info,
mach_msg_type_number_t *policy_infoCnt,
boolean_t *get_default
);
/* Routine thread_sample */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_sample
(
thread_act_t thread,
mach_port_t reply
);
/* Routine etap_trace_thread */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t etap_trace_thread
(
thread_act_t target_act,
boolean_t trace_status
);
/* Routine thread_assign */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_assign
(
thread_act_t thread,
processor_set_t new_set
);
/* Routine thread_assign_default */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_assign_default
(
thread_act_t thread
);
/* Routine thread_get_assignment */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_assignment
(
thread_inspect_t thread,
processor_set_name_t *assigned_set
);
/* Routine thread_set_policy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_set_policy
(
thread_act_t thr_act,
processor_set_t pset,
policy_t policy,
policy_base_t base,
mach_msg_type_number_t baseCnt,
policy_limit_t limit,
mach_msg_type_number_t limitCnt
);
/* Routine thread_get_mach_voucher */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_mach_voucher
(
thread_read_t thr_act,
mach_voucher_selector_t which,
ipc_voucher_t *voucher
);
/* Routine thread_set_mach_voucher */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_set_mach_voucher
(
thread_act_t thr_act,
ipc_voucher_t voucher
);
/* Routine thread_swap_mach_voucher */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_swap_mach_voucher
(
thread_act_t thr_act,
ipc_voucher_t new_voucher,
ipc_voucher_t *old_voucher
);
/* Routine thread_convert_thread_state */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_convert_thread_state
(
thread_act_t thread,
int direction,
thread_state_flavor_t flavor,
thread_state_t in_state,
mach_msg_type_number_t in_stateCnt,
thread_state_t out_state,
mach_msg_type_number_t *out_stateCnt
);
/* Routine thread_get_exception_ports_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t thread_get_exception_ports_info
(
mach_port_t port,
exception_mask_t exception_mask,
exception_mask_array_t masks,
mach_msg_type_number_t *masksCnt,
exception_handler_info_array_t old_handlers_info,
exception_behavior_array_t old_behaviors,
exception_flavor_array_t old_flavors
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__thread_act_subsystem__defined
#define __Request__thread_act_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_terminate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int flavor;
mach_msg_type_number_t old_stateCnt;
} __Request__act_get_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Request__act_set_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_state_flavor_t flavor;
mach_msg_type_number_t old_stateCnt;
} __Request__thread_get_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_state_flavor_t flavor;
mach_msg_type_number_t new_stateCnt;
natural_t new_state[1296];
} __Request__thread_set_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_suspend_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_resume_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_abort_safely_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_depress_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int which_port;
} __Request__thread_get_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t special_port;
/* end of the kernel processed data */
NDR_record_t NDR;
int which_port;
} __Request__thread_set_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_flavor_t flavor;
mach_msg_type_number_t thread_info_outCnt;
} __Request__thread_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_port;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_mask_t exception_mask;
exception_behavior_t behavior;
thread_state_flavor_t new_flavor;
} __Request__thread_set_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_mask_t exception_mask;
} __Request__thread_get_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_port;
/* end of the kernel processed data */
NDR_record_t NDR;
exception_mask_t exception_mask;
exception_behavior_t behavior;
thread_state_flavor_t new_flavor;
} __Request__thread_swap_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
policy_t policy;
mach_msg_type_number_t baseCnt;
integer_t base[5];
boolean_t set_limit;
} __Request__thread_policy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_policy_flavor_t flavor;
mach_msg_type_number_t policy_infoCnt;
integer_t policy_info[16];
} __Request__thread_policy_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
thread_policy_flavor_t flavor;
mach_msg_type_number_t policy_infoCnt;
boolean_t get_default;
} __Request__thread_policy_get_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t reply;
/* end of the kernel processed data */
} __Request__thread_sample_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
boolean_t trace_status;
} __Request__etap_trace_thread_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_set;
/* end of the kernel processed data */
} __Request__thread_assign_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_assign_default_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__thread_get_assignment_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t pset;
/* end of the kernel processed data */
NDR_record_t NDR;
policy_t policy;
mach_msg_type_number_t baseCnt;
integer_t base[5];
mach_msg_type_number_t limitCnt;
integer_t limit[1];
} __Request__thread_set_policy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_voucher_selector_t which;
} __Request__thread_get_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t voucher;
/* end of the kernel processed data */
} __Request__thread_set_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_voucher;
mach_msg_port_descriptor_t old_voucher;
/* end of the kernel processed data */
} __Request__thread_swap_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int direction;
thread_state_flavor_t flavor;
mach_msg_type_number_t in_stateCnt;
natural_t in_state[1296];
mach_msg_type_number_t out_stateCnt;
} __Request__thread_convert_thread_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
exception_mask_t exception_mask;
} __Request__thread_get_exception_ports_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__thread_act_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__thread_act_subsystem__defined
#define __RequestUnion__thread_act_subsystem__defined
union __RequestUnion__thread_act_subsystem {
__Request__thread_terminate_t Request_thread_terminate;
__Request__act_get_state_t Request_act_get_state;
__Request__act_set_state_t Request_act_set_state;
__Request__thread_get_state_t Request_thread_get_state;
__Request__thread_set_state_t Request_thread_set_state;
__Request__thread_suspend_t Request_thread_suspend;
__Request__thread_resume_t Request_thread_resume;
__Request__thread_abort_t Request_thread_abort;
__Request__thread_abort_safely_t Request_thread_abort_safely;
__Request__thread_depress_abort_t Request_thread_depress_abort;
__Request__thread_get_special_port_t Request_thread_get_special_port;
__Request__thread_set_special_port_t Request_thread_set_special_port;
__Request__thread_info_t Request_thread_info;
__Request__thread_set_exception_ports_t Request_thread_set_exception_ports;
__Request__thread_get_exception_ports_t Request_thread_get_exception_ports;
__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports;
__Request__thread_policy_t Request_thread_policy;
__Request__thread_policy_set_t Request_thread_policy_set;
__Request__thread_policy_get_t Request_thread_policy_get;
__Request__thread_sample_t Request_thread_sample;
__Request__etap_trace_thread_t Request_etap_trace_thread;
__Request__thread_assign_t Request_thread_assign;
__Request__thread_assign_default_t Request_thread_assign_default;
__Request__thread_get_assignment_t Request_thread_get_assignment;
__Request__thread_set_policy_t Request_thread_set_policy;
__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher;
__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher;
__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher;
__Request__thread_convert_thread_state_t Request_thread_convert_thread_state;
__Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info;
};
#endif /* !__RequestUnion__thread_act_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__thread_act_subsystem__defined
#define __Reply__thread_act_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_terminate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Reply__act_get_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__act_set_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t old_stateCnt;
natural_t old_state[1296];
} __Reply__thread_get_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_set_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_suspend_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_resume_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_abort_safely_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_depress_abort_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t special_port;
/* end of the kernel processed data */
} __Reply__thread_get_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_set_special_port_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t thread_info_outCnt;
integer_t thread_info_out[32];
} __Reply__thread_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_set_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t old_handlers[32];
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t masksCnt;
exception_mask_t masks[32];
exception_behavior_t old_behaviors[32];
thread_state_flavor_t old_flavors[32];
} __Reply__thread_get_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t old_handlers[32];
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t masksCnt;
exception_mask_t masks[32];
exception_behavior_t old_behaviors[32];
thread_state_flavor_t old_flavors[32];
} __Reply__thread_swap_exception_ports_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_policy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_policy_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t policy_infoCnt;
integer_t policy_info[16];
boolean_t get_default;
} __Reply__thread_policy_get_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_sample_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__etap_trace_thread_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_assign_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_assign_default_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t assigned_set;
/* end of the kernel processed data */
} __Reply__thread_get_assignment_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_set_policy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t voucher;
/* end of the kernel processed data */
} __Reply__thread_get_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__thread_set_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t old_voucher;
/* end of the kernel processed data */
} __Reply__thread_swap_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t out_stateCnt;
natural_t out_state[1296];
} __Reply__thread_convert_thread_state_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t masksCnt;
exception_mask_t masks[32];
exception_handler_info_t old_handlers_info[32];
exception_behavior_t old_behaviors[32];
thread_state_flavor_t old_flavors[32];
} __Reply__thread_get_exception_ports_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__thread_act_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__thread_act_subsystem__defined
#define __ReplyUnion__thread_act_subsystem__defined
union __ReplyUnion__thread_act_subsystem {
__Reply__thread_terminate_t Reply_thread_terminate;
__Reply__act_get_state_t Reply_act_get_state;
__Reply__act_set_state_t Reply_act_set_state;
__Reply__thread_get_state_t Reply_thread_get_state;
__Reply__thread_set_state_t Reply_thread_set_state;
__Reply__thread_suspend_t Reply_thread_suspend;
__Reply__thread_resume_t Reply_thread_resume;
__Reply__thread_abort_t Reply_thread_abort;
__Reply__thread_abort_safely_t Reply_thread_abort_safely;
__Reply__thread_depress_abort_t Reply_thread_depress_abort;
__Reply__thread_get_special_port_t Reply_thread_get_special_port;
__Reply__thread_set_special_port_t Reply_thread_set_special_port;
__Reply__thread_info_t Reply_thread_info;
__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports;
__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports;
__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports;
__Reply__thread_policy_t Reply_thread_policy;
__Reply__thread_policy_set_t Reply_thread_policy_set;
__Reply__thread_policy_get_t Reply_thread_policy_get;
__Reply__thread_sample_t Reply_thread_sample;
__Reply__etap_trace_thread_t Reply_etap_trace_thread;
__Reply__thread_assign_t Reply_thread_assign;
__Reply__thread_assign_default_t Reply_thread_assign_default;
__Reply__thread_get_assignment_t Reply_thread_get_assignment;
__Reply__thread_set_policy_t Reply_thread_set_policy;
__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher;
__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher;
__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher;
__Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state;
__Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info;
};
#endif /* !__RequestUnion__thread_act_subsystem__defined */
#ifndef subsystem_to_name_map_thread_act
#define subsystem_to_name_map_thread_act \
{ "thread_terminate", 3600 },\
{ "act_get_state", 3601 },\
{ "act_set_state", 3602 },\
{ "thread_get_state", 3603 },\
{ "thread_set_state", 3604 },\
{ "thread_suspend", 3605 },\
{ "thread_resume", 3606 },\
{ "thread_abort", 3607 },\
{ "thread_abort_safely", 3608 },\
{ "thread_depress_abort", 3609 },\
{ "thread_get_special_port", 3610 },\
{ "thread_set_special_port", 3611 },\
{ "thread_info", 3612 },\
{ "thread_set_exception_ports", 3613 },\
{ "thread_get_exception_ports", 3614 },\
{ "thread_swap_exception_ports", 3615 },\
{ "thread_policy", 3616 },\
{ "thread_policy_set", 3617 },\
{ "thread_policy_get", 3618 },\
{ "thread_sample", 3619 },\
{ "etap_trace_thread", 3620 },\
{ "thread_assign", 3621 },\
{ "thread_assign_default", 3622 },\
{ "thread_get_assignment", 3623 },\
{ "thread_set_policy", 3624 },\
{ "thread_get_mach_voucher", 3625 },\
{ "thread_set_mach_voucher", 3626 },\
{ "thread_swap_mach_voucher", 3627 },\
{ "thread_convert_thread_state", 3628 },\
{ "thread_get_exception_ports_info", 3630 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _thread_act_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mig_voucher_support.h | /*
* Copyright (c) 2017 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
//This dummy header file is created for mig to check when to include voucher code.
//Mig checks if this file is available to include and knows that Libsyscall has the new voucher symbols to link to.
//Do not delete this file, mig will stop including vouchers code.
#ifndef __MACH_MIG_VOUCHER_SUPPORT__
#define __MACH_MIG_VOUCHER_SUPPORT__
#endif // __MACH_MIG_VOUCHER_SUPPORT__
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/task_access.h | #ifndef _task_access_user_
#define _task_access_user_
/* Module task_access */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef task_access_MSG_COUNT
#define task_access_MSG_COUNT 3
#endif /* task_access_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine check_task_access */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t check_task_access
(
mach_port_t task_access_port,
int32_t calling_pid,
uint32_t calling_gid,
int32_t target_pid
);
/* Routine find_code_signature */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t find_code_signature
(
mach_port_t task_access_port,
int32_t new_pid
);
/* Routine check_task_access_with_flavor */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t check_task_access_with_flavor
(
mach_port_t task_access_port,
int32_t calling_pid,
uint32_t calling_gid,
int32_t target_pid,
mach_task_flavor_t flavor
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__task_access_subsystem__defined
#define __Request__task_access_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t calling_pid;
uint32_t calling_gid;
int32_t target_pid;
} __Request__check_task_access_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t new_pid;
} __Request__find_code_signature_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
int32_t calling_pid;
uint32_t calling_gid;
int32_t target_pid;
mach_task_flavor_t flavor;
} __Request__check_task_access_with_flavor_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__task_access_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__task_access_subsystem__defined
#define __RequestUnion__task_access_subsystem__defined
union __RequestUnion__task_access_subsystem {
__Request__check_task_access_t Request_check_task_access;
__Request__find_code_signature_t Request_find_code_signature;
__Request__check_task_access_with_flavor_t Request_check_task_access_with_flavor;
};
#endif /* !__RequestUnion__task_access_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__task_access_subsystem__defined
#define __Reply__task_access_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__check_task_access_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__find_code_signature_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__check_task_access_with_flavor_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__task_access_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__task_access_subsystem__defined
#define __ReplyUnion__task_access_subsystem__defined
union __ReplyUnion__task_access_subsystem {
__Reply__check_task_access_t Reply_check_task_access;
__Reply__find_code_signature_t Reply_find_code_signature;
__Reply__check_task_access_with_flavor_t Reply_check_task_access_with_flavor;
};
#endif /* !__RequestUnion__task_access_subsystem__defined */
#ifndef subsystem_to_name_map_task_access
#define subsystem_to_name_map_task_access \
{ "check_task_access", 27000 },\
{ "find_code_signature", 27001 },\
{ "check_task_access_with_flavor", 27002 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _task_access_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_host.h | #ifndef _mach_host_user_
#define _mach_host_user_
/* Module mach_host */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_host_MSG_COUNT
#define mach_host_MSG_COUNT 35
#endif /* mach_host_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine host_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_info
(
host_t host,
host_flavor_t flavor,
host_info_t host_info_out,
mach_msg_type_number_t *host_info_outCnt
);
/* Routine host_kernel_version */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_kernel_version
(
host_t host,
kernel_version_t kernel_version
);
/* Routine host_page_size */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_page_size
(
host_t host,
vm_size_t *out_page_size
);
/* Routine mach_memory_object_memory_entry */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_object_memory_entry
(
host_t host,
boolean_t internal,
vm_size_t size,
vm_prot_t permission,
memory_object_t pager,
mach_port_t *entry_handle
);
/* Routine host_processor_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_processor_info
(
host_t host,
processor_flavor_t flavor,
natural_t *out_processor_count,
processor_info_array_t *out_processor_info,
mach_msg_type_number_t *out_processor_infoCnt
);
/* Routine host_get_io_master */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_io_master
(
host_t host,
io_master_t *io_master
);
/* Routine host_get_clock_service */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_get_clock_service
(
host_t host,
clock_id_t clock_id,
clock_serv_t *clock_serv
);
/* Routine kmod_get_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t kmod_get_info
(
host_t host,
kmod_args_t *modules,
mach_msg_type_number_t *modulesCnt
);
/* Routine host_virtual_physical_table_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_virtual_physical_table_info
(
host_t host,
hash_info_bucket_array_t *info,
mach_msg_type_number_t *infoCnt
);
/* Routine processor_set_default */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_set_default
(
host_t host,
processor_set_name_t *default_set
);
/* Routine processor_set_create */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t processor_set_create
(
host_t host,
processor_set_t *new_set,
processor_set_name_t *new_name
);
/* Routine mach_memory_object_memory_entry_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_object_memory_entry_64
(
host_t host,
boolean_t internal,
memory_object_size_t size,
vm_prot_t permission,
memory_object_t pager,
mach_port_t *entry_handle
);
/* Routine host_statistics */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_statistics
(
host_t host_priv,
host_flavor_t flavor,
host_info_t host_info_out,
mach_msg_type_number_t *host_info_outCnt
);
/* Routine host_request_notification */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_request_notification
(
host_t host,
host_flavor_t notify_type,
mach_port_t notify_port
);
/* Routine host_lockgroup_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_lockgroup_info
(
host_t host,
lockgroup_info_array_t *lockgroup_info,
mach_msg_type_number_t *lockgroup_infoCnt
);
/* Routine host_statistics64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_statistics64
(
host_t host_priv,
host_flavor_t flavor,
host_info64_t host_info64_out,
mach_msg_type_number_t *host_info64_outCnt
);
/* Routine mach_zone_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_info
(
host_priv_t host,
mach_zone_name_array_t *names,
mach_msg_type_number_t *namesCnt,
mach_zone_info_array_t *info,
mach_msg_type_number_t *infoCnt
);
/* Routine mach_zone_force_gc */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_force_gc
(
host_t host
);
/* Routine host_create_mach_voucher */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_create_mach_voucher
(
host_t host,
mach_voucher_attr_raw_recipe_array_t recipes,
mach_msg_type_number_t recipesCnt,
ipc_voucher_t *voucher
);
/* Routine host_register_mach_voucher_attr_manager */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_register_mach_voucher_attr_manager
(
host_t host,
mach_voucher_attr_manager_t attr_manager,
mach_voucher_attr_value_handle_t default_value,
mach_voucher_attr_key_t *new_key,
ipc_voucher_attr_control_t *new_attr_control
);
/* Routine host_register_well_known_mach_voucher_attr_manager */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_register_well_known_mach_voucher_attr_manager
(
host_t host,
mach_voucher_attr_manager_t attr_manager,
mach_voucher_attr_value_handle_t default_value,
mach_voucher_attr_key_t key,
ipc_voucher_attr_control_t *new_attr_control
);
/* Routine host_set_atm_diagnostic_flag */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_set_atm_diagnostic_flag
(
host_t host,
uint32_t diagnostic_flag
);
/* Routine mach_memory_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_memory_info
(
host_priv_t host,
mach_zone_name_array_t *names,
mach_msg_type_number_t *namesCnt,
mach_zone_info_array_t *info,
mach_msg_type_number_t *infoCnt,
mach_memory_info_array_t *memory_info,
mach_msg_type_number_t *memory_infoCnt
);
/* Routine host_set_multiuser_config_flags */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t host_set_multiuser_config_flags
(
host_priv_t host_priv,
uint32_t multiuser_flags
);
/* Routine mach_zone_info_for_zone */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_info_for_zone
(
host_priv_t host,
mach_zone_name_t name,
mach_zone_info_t *info
);
/* Routine mach_zone_info_for_largest_zone */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_info_for_largest_zone
(
host_priv_t host,
mach_zone_name_t *name,
mach_zone_info_t *info
);
/* Routine mach_zone_get_zlog_zones */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_get_zlog_zones
(
host_priv_t host,
mach_zone_name_array_t *names,
mach_msg_type_number_t *namesCnt
);
/* Routine mach_zone_get_btlog_records */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_zone_get_btlog_records
(
host_priv_t host,
mach_zone_name_t name,
zone_btrecord_array_t *recs,
mach_msg_type_number_t *recsCnt
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__mach_host_subsystem__defined
#define __Request__mach_host_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
host_flavor_t flavor;
mach_msg_type_number_t host_info_outCnt;
} __Request__host_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_kernel_version_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_page_size_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t pager;
/* end of the kernel processed data */
NDR_record_t NDR;
boolean_t internal;
vm_size_t size;
vm_prot_t permission;
} __Request__mach_memory_object_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
processor_flavor_t flavor;
} __Request__host_processor_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_get_io_master_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
clock_id_t clock_id;
} __Request__host_get_clock_service_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__kmod_get_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_virtual_physical_table_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__processor_set_default_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__processor_set_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t pager;
/* end of the kernel processed data */
NDR_record_t NDR;
boolean_t internal;
memory_object_size_t size;
vm_prot_t permission;
} __Request__mach_memory_object_memory_entry_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
host_flavor_t flavor;
mach_msg_type_number_t host_info_outCnt;
} __Request__host_statistics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t notify_port;
/* end of the kernel processed data */
NDR_record_t NDR;
host_flavor_t notify_type;
} __Request__host_request_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__host_lockgroup_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
host_flavor_t flavor;
mach_msg_type_number_t host_info64_outCnt;
} __Request__host_statistics64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_zone_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_zone_force_gc_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_msg_type_number_t recipesCnt;
uint8_t recipes[5120];
} __Request__host_create_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t attr_manager;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_voucher_attr_value_handle_t default_value;
} __Request__host_register_mach_voucher_attr_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t attr_manager;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_voucher_attr_value_handle_t default_value;
mach_voucher_attr_key_t key;
} __Request__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t diagnostic_flag;
} __Request__host_set_atm_diagnostic_flag_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_memory_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
uint32_t multiuser_flags;
} __Request__host_set_multiuser_config_flags_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_zone_name_t name;
} __Request__mach_zone_info_for_zone_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_zone_info_for_largest_zone_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__mach_zone_get_zlog_zones_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_zone_name_t name;
} __Request__mach_zone_get_btlog_records_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_host_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__mach_host_subsystem__defined
#define __RequestUnion__mach_host_subsystem__defined
union __RequestUnion__mach_host_subsystem {
__Request__host_info_t Request_host_info;
__Request__host_kernel_version_t Request_host_kernel_version;
__Request__host_page_size_t Request_host_page_size;
__Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry;
__Request__host_processor_info_t Request_host_processor_info;
__Request__host_get_io_master_t Request_host_get_io_master;
__Request__host_get_clock_service_t Request_host_get_clock_service;
__Request__kmod_get_info_t Request_kmod_get_info;
__Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info;
__Request__processor_set_default_t Request_processor_set_default;
__Request__processor_set_create_t Request_processor_set_create;
__Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64;
__Request__host_statistics_t Request_host_statistics;
__Request__host_request_notification_t Request_host_request_notification;
__Request__host_lockgroup_info_t Request_host_lockgroup_info;
__Request__host_statistics64_t Request_host_statistics64;
__Request__mach_zone_info_t Request_mach_zone_info;
__Request__mach_zone_force_gc_t Request_mach_zone_force_gc;
__Request__host_create_mach_voucher_t Request_host_create_mach_voucher;
__Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager;
__Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager;
__Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag;
__Request__mach_memory_info_t Request_mach_memory_info;
__Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags;
__Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone;
__Request__mach_zone_info_for_largest_zone_t Request_mach_zone_info_for_largest_zone;
__Request__mach_zone_get_zlog_zones_t Request_mach_zone_get_zlog_zones;
__Request__mach_zone_get_btlog_records_t Request_mach_zone_get_btlog_records;
};
#endif /* !__RequestUnion__mach_host_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_host_subsystem__defined
#define __Reply__mach_host_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t host_info_outCnt;
integer_t host_info_out[68];
} __Reply__host_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */
mach_msg_type_number_t kernel_versionCnt;
char kernel_version[512];
} __Reply__host_kernel_version_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_size_t out_page_size;
} __Reply__host_page_size_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t entry_handle;
/* end of the kernel processed data */
} __Reply__mach_memory_object_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t out_processor_info;
/* end of the kernel processed data */
NDR_record_t NDR;
natural_t out_processor_count;
mach_msg_type_number_t out_processor_infoCnt;
} __Reply__host_processor_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t io_master;
/* end of the kernel processed data */
} __Reply__host_get_io_master_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t clock_serv;
/* end of the kernel processed data */
} __Reply__host_get_clock_service_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t modules;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t modulesCnt;
} __Reply__kmod_get_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t info;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t infoCnt;
} __Reply__host_virtual_physical_table_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t default_set;
/* end of the kernel processed data */
} __Reply__processor_set_default_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_set;
mach_msg_port_descriptor_t new_name;
/* end of the kernel processed data */
} __Reply__processor_set_create_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t entry_handle;
/* end of the kernel processed data */
} __Reply__mach_memory_object_memory_entry_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t host_info_outCnt;
integer_t host_info_out[68];
} __Reply__host_statistics_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_request_notification_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t lockgroup_info;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t lockgroup_infoCnt;
} __Reply__host_lockgroup_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t host_info64_outCnt;
integer_t host_info64_out[256];
} __Reply__host_statistics64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t names;
mach_msg_ool_descriptor_t info;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t namesCnt;
mach_msg_type_number_t infoCnt;
} __Reply__mach_zone_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_zone_force_gc_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t voucher;
/* end of the kernel processed data */
} __Reply__host_create_mach_voucher_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_attr_control;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_voucher_attr_key_t new_key;
} __Reply__host_register_mach_voucher_attr_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t new_attr_control;
/* end of the kernel processed data */
} __Reply__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_set_atm_diagnostic_flag_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t names;
mach_msg_ool_descriptor_t info;
mach_msg_ool_descriptor_t memory_info;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t namesCnt;
mach_msg_type_number_t infoCnt;
mach_msg_type_number_t memory_infoCnt;
} __Reply__mach_memory_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__host_set_multiuser_config_flags_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_zone_info_t info;
} __Reply__mach_zone_info_for_zone_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_zone_name_t name;
mach_zone_info_t info;
} __Reply__mach_zone_info_for_largest_zone_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t names;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t namesCnt;
} __Reply__mach_zone_get_zlog_zones_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t recs;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t recsCnt;
} __Reply__mach_zone_get_btlog_records_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_host_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__mach_host_subsystem__defined
#define __ReplyUnion__mach_host_subsystem__defined
union __ReplyUnion__mach_host_subsystem {
__Reply__host_info_t Reply_host_info;
__Reply__host_kernel_version_t Reply_host_kernel_version;
__Reply__host_page_size_t Reply_host_page_size;
__Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry;
__Reply__host_processor_info_t Reply_host_processor_info;
__Reply__host_get_io_master_t Reply_host_get_io_master;
__Reply__host_get_clock_service_t Reply_host_get_clock_service;
__Reply__kmod_get_info_t Reply_kmod_get_info;
__Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info;
__Reply__processor_set_default_t Reply_processor_set_default;
__Reply__processor_set_create_t Reply_processor_set_create;
__Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64;
__Reply__host_statistics_t Reply_host_statistics;
__Reply__host_request_notification_t Reply_host_request_notification;
__Reply__host_lockgroup_info_t Reply_host_lockgroup_info;
__Reply__host_statistics64_t Reply_host_statistics64;
__Reply__mach_zone_info_t Reply_mach_zone_info;
__Reply__mach_zone_force_gc_t Reply_mach_zone_force_gc;
__Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher;
__Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager;
__Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager;
__Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag;
__Reply__mach_memory_info_t Reply_mach_memory_info;
__Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags;
__Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone;
__Reply__mach_zone_info_for_largest_zone_t Reply_mach_zone_info_for_largest_zone;
__Reply__mach_zone_get_zlog_zones_t Reply_mach_zone_get_zlog_zones;
__Reply__mach_zone_get_btlog_records_t Reply_mach_zone_get_btlog_records;
};
#endif /* !__RequestUnion__mach_host_subsystem__defined */
#ifndef subsystem_to_name_map_mach_host
#define subsystem_to_name_map_mach_host \
{ "host_info", 200 },\
{ "host_kernel_version", 201 },\
{ "host_page_size", 202 },\
{ "mach_memory_object_memory_entry", 203 },\
{ "host_processor_info", 204 },\
{ "host_get_io_master", 205 },\
{ "host_get_clock_service", 206 },\
{ "kmod_get_info", 207 },\
{ "host_virtual_physical_table_info", 209 },\
{ "processor_set_default", 213 },\
{ "processor_set_create", 214 },\
{ "mach_memory_object_memory_entry_64", 215 },\
{ "host_statistics", 216 },\
{ "host_request_notification", 217 },\
{ "host_lockgroup_info", 218 },\
{ "host_statistics64", 219 },\
{ "mach_zone_info", 220 },\
{ "mach_zone_force_gc", 221 },\
{ "host_create_mach_voucher", 222 },\
{ "host_register_mach_voucher_attr_manager", 223 },\
{ "host_register_well_known_mach_voucher_attr_manager", 224 },\
{ "host_set_atm_diagnostic_flag", 225 },\
{ "mach_memory_info", 227 },\
{ "host_set_multiuser_config_flags", 228 },\
{ "mach_zone_info_for_zone", 231 },\
{ "mach_zone_info_for_largest_zone", 232 },\
{ "mach_zone_get_zlog_zones", 233 },\
{ "mach_zone_get_btlog_records", 234 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _mach_host_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_vm.h | #ifndef _mach_vm_user_
#define _mach_vm_user_
/* Module mach_vm */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef mach_vm_MSG_COUNT
#define mach_vm_MSG_COUNT 22
#endif /* mach_vm_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine mach_vm_allocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_allocate
(
vm_map_t target,
mach_vm_address_t *address,
mach_vm_size_t size,
int flags
);
/* Routine mach_vm_deallocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_deallocate
(
vm_map_t target,
mach_vm_address_t address,
mach_vm_size_t size
);
/* Routine mach_vm_protect */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_protect
(
vm_map_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
boolean_t set_maximum,
vm_prot_t new_protection
);
/* Routine mach_vm_inherit */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_inherit
(
vm_map_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_inherit_t new_inheritance
);
/* Routine mach_vm_read */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_read
(
vm_map_read_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_offset_t *data,
mach_msg_type_number_t *dataCnt
);
/* Routine mach_vm_read_list */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_read_list
(
vm_map_read_t target_task,
mach_vm_read_entry_t data_list,
natural_t count
);
/* Routine mach_vm_write */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_write
(
vm_map_t target_task,
mach_vm_address_t address,
vm_offset_t data,
mach_msg_type_number_t dataCnt
);
/* Routine mach_vm_copy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_copy
(
vm_map_t target_task,
mach_vm_address_t source_address,
mach_vm_size_t size,
mach_vm_address_t dest_address
);
/* Routine mach_vm_read_overwrite */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_read_overwrite
(
vm_map_read_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
mach_vm_address_t data,
mach_vm_size_t *outsize
);
/* Routine mach_vm_msync */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_msync
(
vm_map_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_sync_t sync_flags
);
/* Routine mach_vm_behavior_set */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_behavior_set
(
vm_map_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_behavior_t new_behavior
);
/* Routine mach_vm_map */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_map
(
vm_map_t target_task,
mach_vm_address_t *address,
mach_vm_size_t size,
mach_vm_offset_t mask,
int flags,
mem_entry_name_port_t object,
memory_object_offset_t offset,
boolean_t copy,
vm_prot_t cur_protection,
vm_prot_t max_protection,
vm_inherit_t inheritance
);
/* Routine mach_vm_machine_attribute */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_machine_attribute
(
vm_map_t target_task,
mach_vm_address_t address,
mach_vm_size_t size,
vm_machine_attribute_t attribute,
vm_machine_attribute_val_t *value
);
/* Routine mach_vm_remap */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_remap
(
vm_map_t target_task,
mach_vm_address_t *target_address,
mach_vm_size_t size,
mach_vm_offset_t mask,
int flags,
vm_map_t src_task,
mach_vm_address_t src_address,
boolean_t copy,
vm_prot_t *cur_protection,
vm_prot_t *max_protection,
vm_inherit_t inheritance
);
/* Routine mach_vm_page_query */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_page_query
(
vm_map_read_t target_map,
mach_vm_offset_t offset,
integer_t *disposition,
integer_t *ref_count
);
/* Routine mach_vm_region_recurse */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_region_recurse
(
vm_map_read_t target_task,
mach_vm_address_t *address,
mach_vm_size_t *size,
natural_t *nesting_depth,
vm_region_recurse_info_t info,
mach_msg_type_number_t *infoCnt
);
/* Routine mach_vm_region */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_region
(
vm_map_read_t target_task,
mach_vm_address_t *address,
mach_vm_size_t *size,
vm_region_flavor_t flavor,
vm_region_info_t info,
mach_msg_type_number_t *infoCnt,
mach_port_t *object_name
);
/* Routine _mach_make_memory_entry */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t _mach_make_memory_entry
(
vm_map_t target_task,
memory_object_size_t *size,
memory_object_offset_t offset,
vm_prot_t permission,
mem_entry_name_port_t *object_handle,
mem_entry_name_port_t parent_handle
);
/* Routine mach_vm_purgable_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_purgable_control
(
vm_map_t target_task,
mach_vm_address_t address,
vm_purgable_t control,
int *state
);
/* Routine mach_vm_page_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_page_info
(
vm_map_read_t target_task,
mach_vm_address_t address,
vm_page_info_flavor_t flavor,
vm_page_info_t info,
mach_msg_type_number_t *infoCnt
);
/* Routine mach_vm_page_range_query */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_page_range_query
(
vm_map_read_t target_map,
mach_vm_offset_t address,
mach_vm_size_t size,
mach_vm_address_t dispositions,
mach_vm_size_t *dispositions_count
);
/* Routine mach_vm_remap_new */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_remap_new
(
vm_map_t target_task,
mach_vm_address_t *target_address,
mach_vm_size_t size,
mach_vm_offset_t mask,
int flags,
vm_map_read_t src_task,
mach_vm_address_t src_address,
boolean_t copy,
vm_prot_t *cur_protection,
vm_prot_t *max_protection,
vm_inherit_t inheritance
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__mach_vm_subsystem__defined
#define __Request__mach_vm_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
int flags;
} __Request__mach_vm_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
} __Request__mach_vm_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
boolean_t set_maximum;
vm_prot_t new_protection;
} __Request__mach_vm_protect_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
vm_inherit_t new_inheritance;
} __Request__mach_vm_inherit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
} __Request__mach_vm_read_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_read_entry_t data_list;
natural_t count;
} __Request__mach_vm_read_list_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t address;
mach_msg_type_number_t dataCnt;
} __Request__mach_vm_write_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t source_address;
mach_vm_size_t size;
mach_vm_address_t dest_address;
} __Request__mach_vm_copy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
mach_vm_address_t data;
} __Request__mach_vm_read_overwrite_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
vm_sync_t sync_flags;
} __Request__mach_vm_msync_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
vm_behavior_t new_behavior;
} __Request__mach_vm_behavior_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
mach_vm_offset_t mask;
int flags;
memory_object_offset_t offset;
boolean_t copy;
vm_prot_t cur_protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
} __Request__mach_vm_map_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
vm_machine_attribute_t attribute;
vm_machine_attribute_val_t value;
} __Request__mach_vm_machine_attribute_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t src_task;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t target_address;
mach_vm_size_t size;
mach_vm_offset_t mask;
int flags;
mach_vm_address_t src_address;
boolean_t copy;
vm_inherit_t inheritance;
} __Request__mach_vm_remap_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_offset_t offset;
} __Request__mach_vm_page_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
} __Request__mach_vm_region_recurse_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
vm_region_flavor_t flavor;
mach_msg_type_number_t infoCnt;
} __Request__mach_vm_region_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t parent_handle;
/* end of the kernel processed data */
NDR_record_t NDR;
memory_object_size_t size;
memory_object_offset_t offset;
vm_prot_t permission;
} __Request___mach_make_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
vm_purgable_t control;
int state;
} __Request__mach_vm_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_address_t address;
vm_page_info_flavor_t flavor;
mach_msg_type_number_t infoCnt;
} __Request__mach_vm_page_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
mach_vm_offset_t address;
mach_vm_size_t size;
mach_vm_address_t dispositions;
mach_vm_size_t dispositions_count;
} __Request__mach_vm_page_range_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t src_task;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t target_address;
mach_vm_size_t size;
mach_vm_offset_t mask;
int flags;
mach_vm_address_t src_address;
boolean_t copy;
vm_prot_t cur_protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
} __Request__mach_vm_remap_new_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__mach_vm_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__mach_vm_subsystem__defined
#define __RequestUnion__mach_vm_subsystem__defined
union __RequestUnion__mach_vm_subsystem {
__Request__mach_vm_allocate_t Request_mach_vm_allocate;
__Request__mach_vm_deallocate_t Request_mach_vm_deallocate;
__Request__mach_vm_protect_t Request_mach_vm_protect;
__Request__mach_vm_inherit_t Request_mach_vm_inherit;
__Request__mach_vm_read_t Request_mach_vm_read;
__Request__mach_vm_read_list_t Request_mach_vm_read_list;
__Request__mach_vm_write_t Request_mach_vm_write;
__Request__mach_vm_copy_t Request_mach_vm_copy;
__Request__mach_vm_read_overwrite_t Request_mach_vm_read_overwrite;
__Request__mach_vm_msync_t Request_mach_vm_msync;
__Request__mach_vm_behavior_set_t Request_mach_vm_behavior_set;
__Request__mach_vm_map_t Request_mach_vm_map;
__Request__mach_vm_machine_attribute_t Request_mach_vm_machine_attribute;
__Request__mach_vm_remap_t Request_mach_vm_remap;
__Request__mach_vm_page_query_t Request_mach_vm_page_query;
__Request__mach_vm_region_recurse_t Request_mach_vm_region_recurse;
__Request__mach_vm_region_t Request_mach_vm_region;
__Request___mach_make_memory_entry_t Request__mach_make_memory_entry;
__Request__mach_vm_purgable_control_t Request_mach_vm_purgable_control;
__Request__mach_vm_page_info_t Request_mach_vm_page_info;
__Request__mach_vm_page_range_query_t Request_mach_vm_page_range_query;
__Request__mach_vm_remap_new_t Request_mach_vm_remap_new;
};
#endif /* !__RequestUnion__mach_vm_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__mach_vm_subsystem__defined
#define __Reply__mach_vm_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t address;
} __Reply__mach_vm_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_protect_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_inherit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t dataCnt;
} __Reply__mach_vm_read_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_read_entry_t data_list;
} __Reply__mach_vm_read_list_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_write_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_copy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_size_t outsize;
} __Reply__mach_vm_read_overwrite_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_msync_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__mach_vm_behavior_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t address;
} __Reply__mach_vm_map_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_machine_attribute_val_t value;
} __Reply__mach_vm_machine_attribute_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t target_address;
vm_prot_t cur_protection;
vm_prot_t max_protection;
} __Reply__mach_vm_remap_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
integer_t disposition;
integer_t ref_count;
} __Reply__mach_vm_page_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t address;
mach_vm_size_t size;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
int info[19];
} __Reply__mach_vm_region_recurse_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_name;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_vm_address_t address;
mach_vm_size_t size;
mach_msg_type_number_t infoCnt;
int info[10];
} __Reply__mach_vm_region_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_handle;
/* end of the kernel processed data */
NDR_record_t NDR;
memory_object_size_t size;
} __Reply___mach_make_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int state;
} __Reply__mach_vm_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_msg_type_number_t infoCnt;
int info[32];
} __Reply__mach_vm_page_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_size_t dispositions_count;
} __Reply__mach_vm_page_range_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
mach_vm_address_t target_address;
vm_prot_t cur_protection;
vm_prot_t max_protection;
} __Reply__mach_vm_remap_new_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__mach_vm_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__mach_vm_subsystem__defined
#define __ReplyUnion__mach_vm_subsystem__defined
union __ReplyUnion__mach_vm_subsystem {
__Reply__mach_vm_allocate_t Reply_mach_vm_allocate;
__Reply__mach_vm_deallocate_t Reply_mach_vm_deallocate;
__Reply__mach_vm_protect_t Reply_mach_vm_protect;
__Reply__mach_vm_inherit_t Reply_mach_vm_inherit;
__Reply__mach_vm_read_t Reply_mach_vm_read;
__Reply__mach_vm_read_list_t Reply_mach_vm_read_list;
__Reply__mach_vm_write_t Reply_mach_vm_write;
__Reply__mach_vm_copy_t Reply_mach_vm_copy;
__Reply__mach_vm_read_overwrite_t Reply_mach_vm_read_overwrite;
__Reply__mach_vm_msync_t Reply_mach_vm_msync;
__Reply__mach_vm_behavior_set_t Reply_mach_vm_behavior_set;
__Reply__mach_vm_map_t Reply_mach_vm_map;
__Reply__mach_vm_machine_attribute_t Reply_mach_vm_machine_attribute;
__Reply__mach_vm_remap_t Reply_mach_vm_remap;
__Reply__mach_vm_page_query_t Reply_mach_vm_page_query;
__Reply__mach_vm_region_recurse_t Reply_mach_vm_region_recurse;
__Reply__mach_vm_region_t Reply_mach_vm_region;
__Reply___mach_make_memory_entry_t Reply__mach_make_memory_entry;
__Reply__mach_vm_purgable_control_t Reply_mach_vm_purgable_control;
__Reply__mach_vm_page_info_t Reply_mach_vm_page_info;
__Reply__mach_vm_page_range_query_t Reply_mach_vm_page_range_query;
__Reply__mach_vm_remap_new_t Reply_mach_vm_remap_new;
};
#endif /* !__RequestUnion__mach_vm_subsystem__defined */
#ifndef subsystem_to_name_map_mach_vm
#define subsystem_to_name_map_mach_vm \
{ "mach_vm_allocate", 4800 },\
{ "mach_vm_deallocate", 4801 },\
{ "mach_vm_protect", 4802 },\
{ "mach_vm_inherit", 4803 },\
{ "mach_vm_read", 4804 },\
{ "mach_vm_read_list", 4805 },\
{ "mach_vm_write", 4806 },\
{ "mach_vm_copy", 4807 },\
{ "mach_vm_read_overwrite", 4808 },\
{ "mach_vm_msync", 4809 },\
{ "mach_vm_behavior_set", 4810 },\
{ "mach_vm_map", 4811 },\
{ "mach_vm_machine_attribute", 4812 },\
{ "mach_vm_remap", 4813 },\
{ "mach_vm_page_query", 4814 },\
{ "mach_vm_region_recurse", 4815 },\
{ "mach_vm_region", 4816 },\
{ "_mach_make_memory_entry", 4817 },\
{ "mach_vm_purgable_control", 4818 },\
{ "mach_vm_page_info", 4819 },\
{ "mach_vm_page_range_query", 4820 },\
{ "mach_vm_remap_new", 4821 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _mach_vm_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_statistics.h | /*
* Copyright (c) 2000-2020 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: mach/vm_statistics.h
* Author: Avadis Tevanian, Jr., Michael Wayne Young, David Golub
*
* Virtual memory statistics structure.
*
*/
#ifndef _MACH_VM_STATISTICS_H_
#define _MACH_VM_STATISTICS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <mach/machine/vm_types.h>
#include <mach/machine/kern_return.h>
/*
* vm_statistics
*
* History:
* rev0 - original structure.
* rev1 - added purgable info (purgable_count and purges).
* rev2 - added speculative_count.
*
* Note: you cannot add any new fields to this structure. Add them below in
* vm_statistics64.
*/
struct vm_statistics {
natural_t free_count; /* # of pages free */
natural_t active_count; /* # of pages active */
natural_t inactive_count; /* # of pages inactive */
natural_t wire_count; /* # of pages wired down */
natural_t zero_fill_count; /* # of zero fill pages */
natural_t reactivations; /* # of pages reactivated */
natural_t pageins; /* # of pageins */
natural_t pageouts; /* # of pageouts */
natural_t faults; /* # of faults */
natural_t cow_faults; /* # of copy-on-writes */
natural_t lookups; /* object cache lookups */
natural_t hits; /* object cache hits */
/* added for rev1 */
natural_t purgeable_count; /* # of pages purgeable */
natural_t purges; /* # of pages purged */
/* added for rev2 */
/*
* NB: speculative pages are already accounted for in "free_count",
* so "speculative_count" is the number of "free" pages that are
* used to hold data that was read speculatively from disk but
* haven't actually been used by anyone so far.
*/
natural_t speculative_count; /* # of pages speculative */
};
/* Used by all architectures */
typedef struct vm_statistics *vm_statistics_t;
typedef struct vm_statistics vm_statistics_data_t;
/*
* vm_statistics64
*
* History:
* rev0 - original structure.
* rev1 - added purgable info (purgable_count and purges).
* rev2 - added speculative_count.
* ----
* rev3 - changed name to vm_statistics64.
* changed some fields in structure to 64-bit on
* arm, i386 and x86_64 architectures.
* rev4 - require 64-bit alignment for efficient access
* in the kernel. No change to reported data.
*
*/
struct vm_statistics64 {
natural_t free_count; /* # of pages free */
natural_t active_count; /* # of pages active */
natural_t inactive_count; /* # of pages inactive */
natural_t wire_count; /* # of pages wired down */
uint64_t zero_fill_count; /* # of zero fill pages */
uint64_t reactivations; /* # of pages reactivated */
uint64_t pageins; /* # of pageins */
uint64_t pageouts; /* # of pageouts */
uint64_t faults; /* # of faults */
uint64_t cow_faults; /* # of copy-on-writes */
uint64_t lookups; /* object cache lookups */
uint64_t hits; /* object cache hits */
uint64_t purges; /* # of pages purged */
natural_t purgeable_count; /* # of pages purgeable */
/*
* NB: speculative pages are already accounted for in "free_count",
* so "speculative_count" is the number of "free" pages that are
* used to hold data that was read speculatively from disk but
* haven't actually been used by anyone so far.
*/
natural_t speculative_count; /* # of pages speculative */
/* added for rev1 */
uint64_t decompressions; /* # of pages decompressed */
uint64_t compressions; /* # of pages compressed */
uint64_t swapins; /* # of pages swapped in (via compression segments) */
uint64_t swapouts; /* # of pages swapped out (via compression segments) */
natural_t compressor_page_count; /* # of pages used by the compressed pager to hold all the compressed data */
natural_t throttled_count; /* # of pages throttled */
natural_t external_page_count; /* # of pages that are file-backed (non-swap) */
natural_t internal_page_count; /* # of pages that are anonymous */
uint64_t total_uncompressed_pages_in_compressor; /* # of pages (uncompressed) held within the compressor. */
} __attribute__((aligned(8)));
typedef struct vm_statistics64 *vm_statistics64_t;
typedef struct vm_statistics64 vm_statistics64_data_t;
kern_return_t vm_stats(void *info, unsigned int *count);
/*
* VM_STATISTICS_TRUNCATE_TO_32_BIT
*
* This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from
* vm_statistics64 to the 32-bit values of the older structure above (vm_statistics).
*/
#define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value)))
/*
* vm_extmod_statistics
*
* Structure to record modifications to a task by an
* external agent.
*
* History:
* rev0 - original structure.
*/
struct vm_extmod_statistics {
int64_t task_for_pid_count; /* # of times task port was looked up */
int64_t task_for_pid_caller_count; /* # of times this task called task_for_pid */
int64_t thread_creation_count; /* # of threads created in task */
int64_t thread_creation_caller_count; /* # of threads created by task */
int64_t thread_set_state_count; /* # of register state sets in task */
int64_t thread_set_state_caller_count; /* # of register state sets by task */
} __attribute__((aligned(8)));
typedef struct vm_extmod_statistics *vm_extmod_statistics_t;
typedef struct vm_extmod_statistics vm_extmod_statistics_data_t;
typedef struct vm_purgeable_stat {
uint64_t count;
uint64_t size;
}vm_purgeable_stat_t;
struct vm_purgeable_info {
vm_purgeable_stat_t fifo_data[8];
vm_purgeable_stat_t obsolete_data;
vm_purgeable_stat_t lifo_data[8];
};
typedef struct vm_purgeable_info *vm_purgeable_info_t;
/* included for the vm_map_page_query call */
#define VM_PAGE_QUERY_PAGE_PRESENT 0x1
#define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2
#define VM_PAGE_QUERY_PAGE_REF 0x4
#define VM_PAGE_QUERY_PAGE_DIRTY 0x8
#define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10
#define VM_PAGE_QUERY_PAGE_COPIED 0x20
#define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40
#define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80
#define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100
#define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200
#define VM_PAGE_QUERY_PAGE_CS_NX 0x400
#define VM_PAGE_QUERY_PAGE_REUSABLE 0x800
/*
* VM allocation flags:
*
* VM_FLAGS_FIXED
* (really the absence of VM_FLAGS_ANYWHERE)
* Allocate new VM region at the specified virtual address, if possible.
*
* VM_FLAGS_ANYWHERE
* Allocate new VM region anywhere it would fit in the address space.
*
* VM_FLAGS_PURGABLE
* Create a purgable VM object for that new VM region.
*
* VM_FLAGS_4GB_CHUNK
* The new VM region will be chunked up into 4GB sized pieces.
*
* VM_FLAGS_NO_PMAP_CHECK
* (for DEBUG kernel config only, ignored for other configs)
* Do not check that there is no stale pmap mapping for the new VM region.
* This is useful for kernel memory allocations at bootstrap when building
* the initial kernel address space while some memory is already in use.
*
* VM_FLAGS_OVERWRITE
* The new VM region can replace existing VM regions if necessary
* (to be used in combination with VM_FLAGS_FIXED).
*
* VM_FLAGS_NO_CACHE
* Pages brought in to this VM region are placed on the speculative
* queue instead of the active queue. In other words, they are not
* cached so that they will be stolen first if memory runs low.
*/
#define VM_FLAGS_FIXED 0x0000
#define VM_FLAGS_ANYWHERE 0x0001
#define VM_FLAGS_PURGABLE 0x0002
#define VM_FLAGS_4GB_CHUNK 0x0004
#define VM_FLAGS_RANDOM_ADDR 0x0008
#define VM_FLAGS_NO_CACHE 0x0010
#define VM_FLAGS_RESILIENT_CODESIGN 0x0020
#define VM_FLAGS_RESILIENT_MEDIA 0x0040
#define VM_FLAGS_PERMANENT 0x0080
#define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */
/*
* VM_FLAGS_SUPERPAGE_MASK
* 3 bits that specify whether large pages should be used instead of
* base pages (!=0), as well as the requested page size.
*/
#define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */
#define VM_FLAGS_RETURN_DATA_ADDR 0x100000 /* Return address of target data, rather than base of page */
#define VM_FLAGS_RETURN_4K_DATA_ADDR 0x800000 /* Return 4K aligned address of target data */
#define VM_FLAGS_ALIAS_MASK 0xFF000000
#define VM_GET_FLAGS_ALIAS(flags, alias) \
(alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24
#define VM_SET_FLAGS_ALIAS(flags, alias) \
(flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \
(((alias) & ~VM_FLAGS_ALIAS_MASK) << 24))
/* These are the flags that we accept from user-space */
#define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \
VM_FLAGS_ANYWHERE | \
VM_FLAGS_PURGABLE | \
VM_FLAGS_4GB_CHUNK | \
VM_FLAGS_RANDOM_ADDR | \
VM_FLAGS_NO_CACHE | \
VM_FLAGS_PERMANENT | \
VM_FLAGS_OVERWRITE | \
VM_FLAGS_SUPERPAGE_MASK | \
VM_FLAGS_ALIAS_MASK)
#define VM_FLAGS_USER_MAP (VM_FLAGS_USER_ALLOCATE | \
VM_FLAGS_RETURN_4K_DATA_ADDR | \
VM_FLAGS_RETURN_DATA_ADDR)
#define VM_FLAGS_USER_REMAP (VM_FLAGS_FIXED | \
VM_FLAGS_ANYWHERE | \
VM_FLAGS_RANDOM_ADDR | \
VM_FLAGS_OVERWRITE| \
VM_FLAGS_RETURN_DATA_ADDR | \
VM_FLAGS_RESILIENT_CODESIGN | \
VM_FLAGS_RESILIENT_MEDIA)
#define VM_FLAGS_SUPERPAGE_SHIFT 16
#define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */
#define SUPERPAGE_SIZE_ANY 1
#define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE << VM_FLAGS_SUPERPAGE_SHIFT)
#define VM_FLAGS_SUPERPAGE_SIZE_ANY (SUPERPAGE_SIZE_ANY << VM_FLAGS_SUPERPAGE_SHIFT)
#if defined(__x86_64__) || !defined(KERNEL)
#define SUPERPAGE_SIZE_2MB 2
#define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT)
#endif
/*
* EXC_GUARD definitions for virtual memory.
*/
#define GUARD_TYPE_VIRT_MEMORY 0x5
/* Reasons for exception for virtual memory */
enum virtual_memory_guard_exception_codes {
kGUARD_EXC_DEALLOC_GAP = 1u << 0
};
/* current accounting postmark */
#define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600
/* discrete values: */
#define VM_LEDGER_TAG_NONE 0x00000000
#define VM_LEDGER_TAG_DEFAULT 0x00000001
#define VM_LEDGER_TAG_NETWORK 0x00000002
#define VM_LEDGER_TAG_MEDIA 0x00000003
#define VM_LEDGER_TAG_GRAPHICS 0x00000004
#define VM_LEDGER_TAG_NEURAL 0x00000005
#define VM_LEDGER_TAG_MAX 0x00000005
/* individual bits: */
#define VM_LEDGER_FLAG_NO_FOOTPRINT (1 << 0)
#define VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG (1 << 1)
#define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT | VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG)
#define VM_MEMORY_MALLOC 1
#define VM_MEMORY_MALLOC_SMALL 2
#define VM_MEMORY_MALLOC_LARGE 3
#define VM_MEMORY_MALLOC_HUGE 4
#define VM_MEMORY_SBRK 5// uninteresting -- no one should call
#define VM_MEMORY_REALLOC 6
#define VM_MEMORY_MALLOC_TINY 7
#define VM_MEMORY_MALLOC_LARGE_REUSABLE 8
#define VM_MEMORY_MALLOC_LARGE_REUSED 9
#define VM_MEMORY_ANALYSIS_TOOL 10
#define VM_MEMORY_MALLOC_NANO 11
#define VM_MEMORY_MALLOC_MEDIUM 12
#define VM_MEMORY_MALLOC_PGUARD 13 // Will be removed
#define VM_MEMORY_MALLOC_PROB_GUARD 13
#define VM_MEMORY_MACH_MSG 20
#define VM_MEMORY_IOKIT 21
#define VM_MEMORY_STACK 30
#define VM_MEMORY_GUARD 31
#define VM_MEMORY_SHARED_PMAP 32
/* memory containing a dylib */
#define VM_MEMORY_DYLIB 33
#define VM_MEMORY_OBJC_DISPATCHERS 34
/* Was a nested pmap (VM_MEMORY_SHARED_PMAP) which has now been unnested */
#define VM_MEMORY_UNSHARED_PMAP 35
// Placeholders for now -- as we analyze the libraries and find how they
// use memory, we can make these labels more specific.
#define VM_MEMORY_APPKIT 40
#define VM_MEMORY_FOUNDATION 41
#define VM_MEMORY_COREGRAPHICS 42
#define VM_MEMORY_CORESERVICES 43
#define VM_MEMORY_CARBON VM_MEMORY_CORESERVICES
#define VM_MEMORY_JAVA 44
#define VM_MEMORY_COREDATA 45
#define VM_MEMORY_COREDATA_OBJECTIDS 46
#define VM_MEMORY_ATS 50
#define VM_MEMORY_LAYERKIT 51
#define VM_MEMORY_CGIMAGE 52
#define VM_MEMORY_TCMALLOC 53
/* private raster data (i.e. layers, some images, QGL allocator) */
#define VM_MEMORY_COREGRAPHICS_DATA 54
/* shared image and font caches */
#define VM_MEMORY_COREGRAPHICS_SHARED 55
/* Memory used for virtual framebuffers, shadowing buffers, etc... */
#define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56
/* Window backing stores, custom shadow data, and compressed backing stores */
#define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57
/* x-alloc'd memory */
#define VM_MEMORY_COREGRAPHICS_XALLOC 58
/* catch-all for other uses, such as the read-only shared data page */
#define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS
/* memory allocated by the dynamic loader for itself */
#define VM_MEMORY_DYLD 60
/* malloc'd memory created by dyld */
#define VM_MEMORY_DYLD_MALLOC 61
/* Used for sqlite page cache */
#define VM_MEMORY_SQLITE 62
/* JavaScriptCore heaps */
#define VM_MEMORY_JAVASCRIPT_CORE 63
#define VM_MEMORY_WEBASSEMBLY VM_MEMORY_JAVASCRIPT_CORE
/* memory allocated for the JIT */
#define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64
#define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65
/* memory allocated for GLSL */
#define VM_MEMORY_GLSL 66
/* memory allocated for OpenCL.framework */
#define VM_MEMORY_OPENCL 67
/* memory allocated for QuartzCore.framework */
#define VM_MEMORY_COREIMAGE 68
/* memory allocated for WebCore Purgeable Buffers */
#define VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69
/* ImageIO memory */
#define VM_MEMORY_IMAGEIO 70
/* CoreProfile memory */
#define VM_MEMORY_COREPROFILE 71
/* assetsd / MobileSlideShow memory */
#define VM_MEMORY_ASSETSD 72
/* libsystem_kernel os_once_alloc */
#define VM_MEMORY_OS_ALLOC_ONCE 73
/* libdispatch internal allocator */
#define VM_MEMORY_LIBDISPATCH 74
/* Accelerate.framework image backing stores */
#define VM_MEMORY_ACCELERATE 75
/* CoreUI image block data */
#define VM_MEMORY_COREUI 76
/* CoreUI image file */
#define VM_MEMORY_COREUIFILE 77
/* Genealogy buffers */
#define VM_MEMORY_GENEALOGY 78
/* RawCamera VM allocated memory */
#define VM_MEMORY_RAWCAMERA 79
/* corpse info for dead process */
#define VM_MEMORY_CORPSEINFO 80
/* Apple System Logger (ASL) messages */
#define VM_MEMORY_ASL 81
/* Swift runtime */
#define VM_MEMORY_SWIFT_RUNTIME 82
/* Swift metadata */
#define VM_MEMORY_SWIFT_METADATA 83
/* DHMM data */
#define VM_MEMORY_DHMM 84
/* memory allocated by SceneKit.framework */
#define VM_MEMORY_SCENEKIT 86
/* memory allocated by skywalk networking */
#define VM_MEMORY_SKYWALK 87
#define VM_MEMORY_IOSURFACE 88
#define VM_MEMORY_LIBNETWORK 89
#define VM_MEMORY_AUDIO 90
#define VM_MEMORY_VIDEOBITSTREAM 91
/* memory allocated by CoreMedia */
#define VM_MEMORY_CM_XPC 92
#define VM_MEMORY_CM_RPC 93
#define VM_MEMORY_CM_MEMORYPOOL 94
#define VM_MEMORY_CM_READCACHE 95
#define VM_MEMORY_CM_CRABS 96
/* memory allocated for QuickLookThumbnailing */
#define VM_MEMORY_QUICKLOOK_THUMBNAILS 97
/* memory allocated by Accounts framework */
#define VM_MEMORY_ACCOUNTS 98
/* memory allocated by Sanitizer runtime libraries */
#define VM_MEMORY_SANITIZER 99
/* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */
#define VM_MEMORY_IOACCELERATOR 100
/* memory allocated by CoreMedia for global image registration of frames */
#define VM_MEMORY_CM_REGWARP 101
/* memory allocated by EmbeddedAcousticRecognition for speech decoder */
#define VM_MEMORY_EAR_DECODER 102
/* CoreUI cached image data */
#define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103
/* ColorSync is using mmap for read-only copies of ICC profile data */
#define VM_MEMORY_COLORSYNC 104
/* Reserve 230-239 for Rosetta */
#define VM_MEMORY_ROSETTA 230
#define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231
#define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232
#define VM_MEMORY_ROSETTA_RETURN_STACK 233
#define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234
#define VM_MEMORY_ROSETTA_USER_LDT 235
#define VM_MEMORY_ROSETTA_ARENA 236
#define VM_MEMORY_ROSETTA_10 239
/* Reserve 240-255 for application */
#define VM_MEMORY_APPLICATION_SPECIFIC_1 240
#define VM_MEMORY_APPLICATION_SPECIFIC_16 255
#define VM_MAKE_TAG(tag) ((tag) << 24)
#ifdef __cplusplus
}
#endif
#endif /* _MACH_VM_STATISTICS_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/memory_object_types.h | /*
* Copyright (c) 2000-2016 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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@
*/
/*
* @OSF_COPYRIGHT@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
*/
/*
* File: memory_object.h
* Author: Michael Wayne Young
*
* External memory management interface definition.
*/
#ifndef _MACH_MEMORY_OBJECT_TYPES_H_
#define _MACH_MEMORY_OBJECT_TYPES_H_
/*
* User-visible types used in the external memory
* management interface:
*/
#include <mach/port.h>
#include <mach/message.h>
#include <mach/vm_prot.h>
#include <mach/vm_sync.h>
#include <mach/vm_types.h>
#include <mach/machine/vm_types.h>
#include <sys/cdefs.h>
#define VM_64_BIT_DATA_OBJECTS
typedef unsigned long long memory_object_offset_t;
typedef unsigned long long memory_object_size_t;
typedef natural_t memory_object_cluster_size_t;
typedef natural_t * memory_object_fault_info_t;
typedef unsigned long long vm_object_id_t;
/*
* Temporary until real EMMI version gets re-implemented
*/
typedef mach_port_t memory_object_t;
/*
* vestigial, maintained for source compatibility,
* no MIG interface will accept or return non NULL
* objects for those.
*/
typedef mach_port_t memory_object_control_t;
typedef memory_object_t *memory_object_array_t;
/* A memory object ... */
/* Used by the kernel to retrieve */
/* or store data */
typedef mach_port_t memory_object_name_t;
/* Used to describe the memory ... */
/* object in vm_regions() calls */
typedef mach_port_t memory_object_default_t;
/* Registered with the host ... */
/* for creating new internal objects */
#define MEMORY_OBJECT_NULL ((memory_object_t) 0)
#define MEMORY_OBJECT_CONTROL_NULL ((memory_object_control_t) 0)
#define MEMORY_OBJECT_NAME_NULL ((memory_object_name_t) 0)
#define MEMORY_OBJECT_DEFAULT_NULL ((memory_object_default_t) 0)
typedef int memory_object_copy_strategy_t;
/* How memory manager handles copy: */
#define MEMORY_OBJECT_COPY_NONE 0
/* ... No special support */
#define MEMORY_OBJECT_COPY_CALL 1
/* ... Make call on memory manager */
#define MEMORY_OBJECT_COPY_DELAY 2
/* ... Memory manager doesn't
* change data externally.
*/
#define MEMORY_OBJECT_COPY_TEMPORARY 3
/* ... Memory manager doesn't
* change data externally, and
* doesn't need to see changes.
*/
#define MEMORY_OBJECT_COPY_SYMMETRIC 4
/* ... Memory manager doesn't
* change data externally,
* doesn't need to see changes,
* and object will not be
* multiply mapped.
*
* XXX
* Not yet safe for non-kernel use.
*/
#define MEMORY_OBJECT_COPY_INVALID 5
/* ... An invalid copy strategy,
* for external objects which
* have not been initialized.
* Allows copy_strategy to be
* examined without also
* examining pager_ready and
* internal.
*/
typedef int memory_object_return_t;
/* Which pages to return to manager
* this time (lock_request) */
#define MEMORY_OBJECT_RETURN_NONE 0
/* ... don't return any. */
#define MEMORY_OBJECT_RETURN_DIRTY 1
/* ... only dirty pages. */
#define MEMORY_OBJECT_RETURN_ALL 2
/* ... dirty and precious pages. */
#define MEMORY_OBJECT_RETURN_ANYTHING 3
/* ... any resident page. */
/*
* Data lock request flags
*/
#define MEMORY_OBJECT_DATA_FLUSH 0x1
#define MEMORY_OBJECT_DATA_NO_CHANGE 0x2
#define MEMORY_OBJECT_DATA_PURGE 0x4
#define MEMORY_OBJECT_COPY_SYNC 0x8
#define MEMORY_OBJECT_DATA_SYNC 0x10
#define MEMORY_OBJECT_IO_SYNC 0x20
#define MEMORY_OBJECT_DATA_FLUSH_ALL 0x40
/*
* Types for the memory object flavor interfaces
*/
#define MEMORY_OBJECT_INFO_MAX (1024)
typedef int *memory_object_info_t;
typedef int memory_object_flavor_t;
typedef int memory_object_info_data_t[MEMORY_OBJECT_INFO_MAX];
#define MEMORY_OBJECT_PERFORMANCE_INFO 11
#define MEMORY_OBJECT_ATTRIBUTE_INFO 14
#define MEMORY_OBJECT_BEHAVIOR_INFO 15
struct memory_object_perf_info {
memory_object_cluster_size_t cluster_size;
boolean_t may_cache;
};
struct memory_object_attr_info {
memory_object_copy_strategy_t copy_strategy;
memory_object_cluster_size_t cluster_size;
boolean_t may_cache_object;
boolean_t temporary;
};
struct memory_object_behave_info {
memory_object_copy_strategy_t copy_strategy;
boolean_t temporary;
boolean_t invalidate;
boolean_t silent_overwrite;
boolean_t advisory_pageout;
};
typedef struct memory_object_behave_info *memory_object_behave_info_t;
typedef struct memory_object_behave_info memory_object_behave_info_data_t;
typedef struct memory_object_perf_info *memory_object_perf_info_t;
typedef struct memory_object_perf_info memory_object_perf_info_data_t;
typedef struct memory_object_attr_info *memory_object_attr_info_t;
typedef struct memory_object_attr_info memory_object_attr_info_data_t;
#define MEMORY_OBJECT_BEHAVE_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(memory_object_behave_info_data_t)/sizeof(int)))
#define MEMORY_OBJECT_PERF_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(memory_object_perf_info_data_t)/sizeof(int)))
#define MEMORY_OBJECT_ATTR_INFO_COUNT ((mach_msg_type_number_t) \
(sizeof(memory_object_attr_info_data_t)/sizeof(int)))
#define invalid_memory_object_flavor(f) \
(f != MEMORY_OBJECT_ATTRIBUTE_INFO && \
f != MEMORY_OBJECT_PERFORMANCE_INFO && \
f != OLD_MEMORY_OBJECT_BEHAVIOR_INFO && \
f != MEMORY_OBJECT_BEHAVIOR_INFO && \
f != OLD_MEMORY_OBJECT_ATTRIBUTE_INFO)
/*
* Used to support options on memory_object_release_name call
*/
#define MEMORY_OBJECT_TERMINATE_IDLE 0x1
#define MEMORY_OBJECT_RESPECT_CACHE 0x2
#define MEMORY_OBJECT_RELEASE_NO_OP 0x4
/* named entry processor mapping options */
/* enumerated */
#define MAP_MEM_NOOP 0
#define MAP_MEM_COPYBACK 1
#define MAP_MEM_IO 2
#define MAP_MEM_WTHRU 3
#define MAP_MEM_WCOMB 4 /* Write combining mode */
/* aka store gather */
#define MAP_MEM_INNERWBACK 5
#define MAP_MEM_POSTED 6
#define MAP_MEM_RT 7
#define MAP_MEM_POSTED_REORDERED 8
#define MAP_MEM_POSTED_COMBINED_REORDERED 9
#define GET_MAP_MEM(flags) \
((((unsigned int)(flags)) >> 24) & 0xFF)
#define SET_MAP_MEM(caching, flags) \
((flags) = ((((unsigned int)(caching)) << 24) \
& 0xFF000000) | ((flags) & 0xFFFFFF));
/* leave room for vm_prot bits (0xFF ?) */
#define MAP_MEM_LEDGER_TAGGED 0x002000 /* object owned by a specific task and ledger */
#define MAP_MEM_PURGABLE_KERNEL_ONLY 0x004000 /* volatility controlled by kernel */
#define MAP_MEM_GRAB_SECLUDED 0x008000 /* can grab secluded pages */
#define MAP_MEM_ONLY 0x010000 /* change processor caching */
#define MAP_MEM_NAMED_CREATE 0x020000 /* create extant object */
#define MAP_MEM_PURGABLE 0x040000 /* create a purgable VM object */
#define MAP_MEM_NAMED_REUSE 0x080000 /* reuse provided entry if identical */
#define MAP_MEM_USE_DATA_ADDR 0x100000 /* preserve address of data, rather than base of page */
#define MAP_MEM_VM_COPY 0x200000 /* make a copy of a VM range */
#define MAP_MEM_VM_SHARE 0x400000 /* extract a VM range for remap */
#define MAP_MEM_4K_DATA_ADDR 0x800000 /* preserve 4K aligned address of data */
#define MAP_MEM_FLAGS_MASK 0x00FFFF00
#define MAP_MEM_FLAGS_USER ( \
MAP_MEM_PURGABLE_KERNEL_ONLY | \
MAP_MEM_GRAB_SECLUDED | \
MAP_MEM_ONLY | \
MAP_MEM_NAMED_CREATE | \
MAP_MEM_PURGABLE | \
MAP_MEM_NAMED_REUSE | \
MAP_MEM_USE_DATA_ADDR | \
MAP_MEM_VM_COPY | \
MAP_MEM_VM_SHARE | \
MAP_MEM_LEDGER_TAGGED | \
MAP_MEM_4K_DATA_ADDR)
#define MAP_MEM_FLAGS_ALL ( \
MAP_MEM_FLAGS_USER)
/*
* Universal Page List data structures
*
* A UPL describes a bounded set of physical pages
* associated with some range of an object or map
* and a snapshot of the attributes associated with
* each of those pages.
*/
struct upl_page_info {
unsigned int opaque[2]; /* use upl_page_xxx() accessor funcs */
};
typedef struct upl_page_info upl_page_info_t;
typedef upl_page_info_t *upl_page_info_array_t;
typedef upl_page_info_array_t upl_page_list_ptr_t;
typedef uint32_t upl_offset_t; /* page-aligned byte offset */
typedef uint32_t upl_size_t; /* page-aligned byte size */
/* upl invocation flags */
/* top nibble is used by super upl */
typedef uint64_t upl_control_flags_t;
#define UPL_FLAGS_NONE 0x00000000ULL
#define UPL_COPYOUT_FROM 0x00000001ULL
#define UPL_PRECIOUS 0x00000002ULL
#define UPL_NO_SYNC 0x00000004ULL
#define UPL_CLEAN_IN_PLACE 0x00000008ULL
#define UPL_NOBLOCK 0x00000010ULL
#define UPL_RET_ONLY_DIRTY 0x00000020ULL
#define UPL_SET_INTERNAL 0x00000040ULL
#define UPL_QUERY_OBJECT_TYPE 0x00000080ULL
#define UPL_RET_ONLY_ABSENT 0x00000100ULL /* used only for COPY_FROM = FALSE */
#define UPL_FILE_IO 0x00000200ULL
#define UPL_SET_LITE 0x00000400ULL
#define UPL_SET_INTERRUPTIBLE 0x00000800ULL
#define UPL_SET_IO_WIRE 0x00001000ULL
#define UPL_FOR_PAGEOUT 0x00002000ULL
#define UPL_WILL_BE_DUMPED 0x00004000ULL
#define UPL_FORCE_DATA_SYNC 0x00008000ULL
/* continued after the ticket bits... */
#define UPL_PAGE_TICKET_MASK 0x000F0000ULL
#define UPL_PAGE_TICKET_SHIFT 16
/* ... flags resume here */
#define UPL_BLOCK_ACCESS 0x00100000ULL
#define UPL_ENCRYPT 0x00200000ULL
#define UPL_NOZEROFILL 0x00400000ULL
#define UPL_WILL_MODIFY 0x00800000ULL /* caller will modify the pages */
#define UPL_NEED_32BIT_ADDR 0x01000000ULL
#define UPL_UBC_MSYNC 0x02000000ULL
#define UPL_UBC_PAGEOUT 0x04000000ULL
#define UPL_UBC_PAGEIN 0x08000000ULL
#define UPL_REQUEST_SET_DIRTY 0x10000000ULL
#define UPL_REQUEST_NO_FAULT 0x20000000ULL /* fail if pages not all resident */
#define UPL_NOZEROFILLIO 0x40000000ULL /* allow non zerofill pages present */
#define UPL_REQUEST_FORCE_COHERENCY 0x80000000ULL
/* UPL flags known by this kernel */
#define UPL_VALID_FLAGS 0xFFFFFFFFFFULL
/* upl abort error flags */
#define UPL_ABORT_RESTART 0x1
#define UPL_ABORT_UNAVAILABLE 0x2
#define UPL_ABORT_ERROR 0x4
#define UPL_ABORT_FREE_ON_EMPTY 0x8 /* only implemented in wrappers */
#define UPL_ABORT_DUMP_PAGES 0x10
#define UPL_ABORT_NOTIFY_EMPTY 0x20
/* deprecated: #define UPL_ABORT_ALLOW_ACCESS 0x40 */
#define UPL_ABORT_REFERENCE 0x80
/* upl pages check flags */
#define UPL_CHECK_DIRTY 0x1
/*
* upl pagein/pageout flags
*
*
* when I/O is issued from this UPL it should be done synchronously
*/
#define UPL_IOSYNC 0x1
/*
* the passed in UPL should not have either a commit or abort
* applied to it by the underlying layers... the site that
* created the UPL is responsible for cleaning it up.
*/
#define UPL_NOCOMMIT 0x2
/*
* turn off any speculative read-ahead applied at the I/O layer
*/
#define UPL_NORDAHEAD 0x4
/*
* pageout request is targeting a real file
* as opposed to a swap file.
*/
#define UPL_VNODE_PAGER 0x8
/*
* this pageout is being originated as part of an explicit
* memory synchronization operation... no speculative clustering
* should be applied, only the range specified should be pushed.
*/
#define UPL_MSYNC 0x10
/*
*
*/
#define UPL_PAGING_ENCRYPTED 0x20
/*
* this pageout is being originated as part of an explicit
* memory synchronization operation that is checking for I/O
* errors and taking it's own action... if an error occurs,
* just abort the pages back into the cache unchanged
*/
#define UPL_KEEPCACHED 0x40
/*
* this pageout originated from within cluster_io to deal
* with a dirty page that hasn't yet been seen by the FS
* that backs it... tag it so that the FS can take the
* appropriate action w/r to its locking model since the
* pageout will reenter the FS for the same file currently
* being handled in this context.
*/
#define UPL_NESTED_PAGEOUT 0x80
/*
* we've detected a sequential access pattern and
* we are speculatively and aggressively pulling
* pages in... do not count these as real PAGEINs
* w/r to our hard throttle maintenance
*/
#define UPL_IOSTREAMING 0x100
/*
* Currently, it's only used for the swap pagein path.
* Since the swap + compressed pager layer manage their
* pages, these pages are not marked "absent" i.e. these
* are "valid" pages. The pagein path will _not_ issue an
* I/O (correctly) for valid pages. So, this flag is used
* to override that logic in the vnode I/O path.
*/
#define UPL_IGNORE_VALID_PAGE_CHECK 0x200
/* upl commit flags */
#define UPL_COMMIT_FREE_ON_EMPTY 0x1 /* only implemented in wrappers */
#define UPL_COMMIT_CLEAR_DIRTY 0x2
#define UPL_COMMIT_SET_DIRTY 0x4
#define UPL_COMMIT_INACTIVATE 0x8
#define UPL_COMMIT_NOTIFY_EMPTY 0x10
/* deprecated: #define UPL_COMMIT_ALLOW_ACCESS 0x20 */
#define UPL_COMMIT_CS_VALIDATED 0x40
#define UPL_COMMIT_CLEAR_PRECIOUS 0x80
#define UPL_COMMIT_SPECULATE 0x100
#define UPL_COMMIT_FREE_ABSENT 0x200
#define UPL_COMMIT_WRITTEN_BY_KERNEL 0x400
#define UPL_COMMIT_KERNEL_ONLY_FLAGS (UPL_COMMIT_CS_VALIDATED | UPL_COMMIT_FREE_ABSENT)
/* flags for return of state from vm_map_get_upl, vm_upl address space */
/* based call */
#define UPL_DEV_MEMORY 0x1
#define UPL_PHYS_CONTIG 0x2
/*
* Flags for the UPL page ops routine. This routine is not exported
* out of the kernel at the moment and so the defs live here.
*/
#define UPL_POP_DIRTY 0x1
#define UPL_POP_PAGEOUT 0x2
#define UPL_POP_PRECIOUS 0x4
#define UPL_POP_ABSENT 0x8
#define UPL_POP_BUSY 0x10
#define UPL_POP_PHYSICAL 0x10000000
#define UPL_POP_DUMP 0x20000000
#define UPL_POP_SET 0x40000000
#define UPL_POP_CLR 0x80000000
/*
* Flags for the UPL range op routine. This routine is not exported
* out of the kernel at the moemet and so the defs live here.
*/
/*
* UPL_ROP_ABSENT: Returns the extent of the range presented which
* is absent, starting with the start address presented
*/
#define UPL_ROP_ABSENT 0x01
/*
* UPL_ROP_PRESENT: Returns the extent of the range presented which
* is present (i.e. resident), starting with the start address presented
*/
#define UPL_ROP_PRESENT 0x02
/*
* UPL_ROP_DUMP: Dump the pages which are found in the target object
* for the target range.
*/
#define UPL_ROP_DUMP 0x04
__BEGIN_DECLS
extern boolean_t upl_page_present(upl_page_info_t *upl, int index);
extern boolean_t upl_dirty_page(upl_page_info_t *upl, int index);
extern boolean_t upl_valid_page(upl_page_info_t *upl, int index);
extern void upl_deallocate(upl_t upl);
extern void upl_mark_decmp(upl_t upl);
extern void upl_unmark_decmp(upl_t upl);
__END_DECLS
#endif /* _MACH_MEMORY_OBJECT_TYPES_H_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/task_inspect.h | /*
* Copyright (c) 2017 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 MACH_TASK_INSPECT_H
#define MACH_TASK_INSPECT_H
#include <stdint.h>
#include <mach/vm_types.h>
/*
* XXX These interfaces are still in development -- they are subject to change
* without notice.
*/
typedef natural_t task_inspect_flavor_t;
enum task_inspect_flavor {
TASK_INSPECT_BASIC_COUNTS = 1,
};
struct task_inspect_basic_counts {
uint64_t instructions;
uint64_t cycles;
};
#define TASK_INSPECT_BASIC_COUNTS_COUNT \
(sizeof(struct task_inspect_basic_counts) / sizeof(natural_t))
typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t;
typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t;
typedef integer_t *task_inspect_info_t;
#endif /* !defined(MACH_TASK_INSPECT_H) */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/vm_map.h | #ifndef _vm_map_user_
#define _vm_map_user_
/* Module vm_map */
#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */
/* END MIG_STRNCPY_ZEROFILL CODE */
#ifdef AUTOTEST
#ifndef FUNCTION_PTR_T
#define FUNCTION_PTR_T
typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
typedef struct {
char *name;
function_ptr_t function;
} function_table_entry;
typedef function_table_entry *function_table_t;
#endif /* FUNCTION_PTR_T */
#endif /* AUTOTEST */
#ifndef vm_map_MSG_COUNT
#define vm_map_MSG_COUNT 33
#endif /* vm_map_MSG_COUNT */
#include <Availability.h>
#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach_debug/mach_debug_types.h>
#ifdef __BeforeMigUserHeader
__BeforeMigUserHeader
#endif /* __BeforeMigUserHeader */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* Routine vm_region */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_region
(
vm_map_read_t target_task,
vm_address_t *address,
vm_size_t *size,
vm_region_flavor_t flavor,
vm_region_info_t info,
mach_msg_type_number_t *infoCnt,
mach_port_t *object_name
);
/* Routine vm_allocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_allocate
(
vm_map_t target_task,
vm_address_t *address,
vm_size_t size,
int flags
);
/* Routine vm_deallocate */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_deallocate
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size
);
/* Routine vm_protect */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_protect
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size,
boolean_t set_maximum,
vm_prot_t new_protection
);
/* Routine vm_inherit */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_inherit
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size,
vm_inherit_t new_inheritance
);
/* Routine vm_read */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_read
(
vm_map_read_t target_task,
vm_address_t address,
vm_size_t size,
vm_offset_t *data,
mach_msg_type_number_t *dataCnt
);
/* Routine vm_read_list */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_read_list
(
vm_map_read_t target_task,
vm_read_entry_t data_list,
natural_t count
);
/* Routine vm_write */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_write
(
vm_map_t target_task,
vm_address_t address,
vm_offset_t data,
mach_msg_type_number_t dataCnt
);
/* Routine vm_copy */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_copy
(
vm_map_t target_task,
vm_address_t source_address,
vm_size_t size,
vm_address_t dest_address
);
/* Routine vm_read_overwrite */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_read_overwrite
(
vm_map_read_t target_task,
vm_address_t address,
vm_size_t size,
vm_address_t data,
vm_size_t *outsize
);
/* Routine vm_msync */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_msync
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size,
vm_sync_t sync_flags
);
/* Routine vm_behavior_set */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_behavior_set
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size,
vm_behavior_t new_behavior
);
/* Routine vm_map */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_map
(
vm_map_t target_task,
vm_address_t *address,
vm_size_t size,
vm_address_t mask,
int flags,
mem_entry_name_port_t object,
vm_offset_t offset,
boolean_t copy,
vm_prot_t cur_protection,
vm_prot_t max_protection,
vm_inherit_t inheritance
);
/* Routine vm_machine_attribute */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_machine_attribute
(
vm_map_t target_task,
vm_address_t address,
vm_size_t size,
vm_machine_attribute_t attribute,
vm_machine_attribute_val_t *value
);
/* Routine vm_remap */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_remap
(
vm_map_t target_task,
vm_address_t *target_address,
vm_size_t size,
vm_address_t mask,
int flags,
vm_map_t src_task,
vm_address_t src_address,
boolean_t copy,
vm_prot_t *cur_protection,
vm_prot_t *max_protection,
vm_inherit_t inheritance
);
/* Routine task_wire */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t task_wire
(
vm_map_t target_task,
boolean_t must_wire
);
/* Routine mach_make_memory_entry */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_make_memory_entry
(
vm_map_t target_task,
vm_size_t *size,
vm_offset_t offset,
vm_prot_t permission,
mem_entry_name_port_t *object_handle,
mem_entry_name_port_t parent_entry
);
/* Routine vm_map_page_query */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_map_page_query
(
vm_map_read_t target_map,
vm_offset_t offset,
integer_t *disposition,
integer_t *ref_count
);
/* Routine mach_vm_region_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_region_info
(
vm_map_read_t task,
vm_address_t address,
vm_info_region_t *region,
vm_info_object_array_t *objects,
mach_msg_type_number_t *objectsCnt
);
/* Routine vm_mapped_pages_info */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_mapped_pages_info
(
vm_map_read_t task,
page_address_array_t *pages,
mach_msg_type_number_t *pagesCnt
);
/* Routine vm_region_recurse */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_region_recurse
(
vm_map_read_t target_task,
vm_address_t *address,
vm_size_t *size,
natural_t *nesting_depth,
vm_region_recurse_info_t info,
mach_msg_type_number_t *infoCnt
);
/* Routine vm_region_recurse_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_region_recurse_64
(
vm_map_read_t target_task,
vm_address_t *address,
vm_size_t *size,
natural_t *nesting_depth,
vm_region_recurse_info_t info,
mach_msg_type_number_t *infoCnt
);
/* Routine mach_vm_region_info_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_vm_region_info_64
(
vm_map_read_t task,
vm_address_t address,
vm_info_region_64_t *region,
vm_info_object_array_t *objects,
mach_msg_type_number_t *objectsCnt
);
/* Routine vm_region_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_region_64
(
vm_map_read_t target_task,
vm_address_t *address,
vm_size_t *size,
vm_region_flavor_t flavor,
vm_region_info_t info,
mach_msg_type_number_t *infoCnt,
mach_port_t *object_name
);
/* Routine mach_make_memory_entry_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t mach_make_memory_entry_64
(
vm_map_t target_task,
memory_object_size_t *size,
memory_object_offset_t offset,
vm_prot_t permission,
mach_port_t *object_handle,
mem_entry_name_port_t parent_entry
);
/* Routine vm_map_64 */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_map_64
(
vm_map_t target_task,
vm_address_t *address,
vm_size_t size,
vm_address_t mask,
int flags,
mem_entry_name_port_t object,
memory_object_offset_t offset,
boolean_t copy,
vm_prot_t cur_protection,
vm_prot_t max_protection,
vm_inherit_t inheritance
);
/* Routine vm_purgable_control */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_purgable_control
(
vm_map_t target_task,
vm_address_t address,
vm_purgable_t control,
int *state
);
/* Routine vm_map_exec_lockdown */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_map_exec_lockdown
(
vm_map_t target_task
);
/* Routine vm_remap_new */
#ifdef mig_external
mig_external
#else
extern
#endif /* mig_external */
kern_return_t vm_remap_new
(
vm_map_t target_task,
vm_address_t *target_address,
vm_size_t size,
vm_address_t mask,
int flags,
vm_map_read_t src_task,
vm_address_t src_address,
boolean_t copy,
vm_prot_t *cur_protection,
vm_prot_t *max_protection,
vm_inherit_t inheritance
);
__END_DECLS
/********************** Caution **************************/
/* The following data types should be used to calculate */
/* maximum message sizes only. The actual message may be */
/* smaller, and the position of the arguments within the */
/* message layout may vary from what is presented here. */
/* For example, if any of the arguments are variable- */
/* sized, and less than the maximum is sent, the data */
/* will be packed tight in the actual message to reduce */
/* the presence of holes. */
/********************** Caution **************************/
/* typedefs for all requests */
#ifndef __Request__vm_map_subsystem__defined
#define __Request__vm_map_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_region_flavor_t flavor;
mach_msg_type_number_t infoCnt;
} __Request__vm_region_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
int flags;
} __Request__vm_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
} __Request__vm_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
boolean_t set_maximum;
vm_prot_t new_protection;
} __Request__vm_protect_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_inherit_t new_inheritance;
} __Request__vm_inherit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
} __Request__vm_read_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_read_entry_t data_list;
natural_t count;
} __Request__vm_read_list_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
mach_msg_type_number_t dataCnt;
} __Request__vm_write_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t source_address;
vm_size_t size;
vm_address_t dest_address;
} __Request__vm_copy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_address_t data;
} __Request__vm_read_overwrite_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_sync_t sync_flags;
} __Request__vm_msync_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_behavior_t new_behavior;
} __Request__vm_behavior_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_address_t mask;
int flags;
vm_offset_t offset;
boolean_t copy;
vm_prot_t cur_protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
} __Request__vm_map_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_machine_attribute_t attribute;
vm_machine_attribute_val_t value;
} __Request__vm_machine_attribute_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t src_task;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t target_address;
vm_size_t size;
vm_address_t mask;
int flags;
vm_address_t src_address;
boolean_t copy;
vm_inherit_t inheritance;
} __Request__vm_remap_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
boolean_t must_wire;
} __Request__task_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t parent_entry;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_size_t size;
vm_offset_t offset;
vm_prot_t permission;
} __Request__mach_make_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_offset_t offset;
} __Request__vm_map_page_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
} __Request__mach_vm_region_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__vm_mapped_pages_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
} __Request__vm_region_recurse_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
} __Request__vm_region_recurse_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
} __Request__mach_vm_region_info_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_region_flavor_t flavor;
mach_msg_type_number_t infoCnt;
} __Request__vm_region_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t parent_entry;
/* end of the kernel processed data */
NDR_record_t NDR;
memory_object_size_t size;
memory_object_offset_t offset;
vm_prot_t permission;
} __Request__mach_make_memory_entry_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
vm_address_t mask;
int flags;
memory_object_offset_t offset;
boolean_t copy;
vm_prot_t cur_protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
} __Request__vm_map_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
vm_address_t address;
vm_purgable_t control;
int state;
} __Request__vm_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
} __Request__vm_map_exec_lockdown_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t src_task;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t target_address;
vm_size_t size;
vm_address_t mask;
int flags;
vm_address_t src_address;
boolean_t copy;
vm_prot_t cur_protection;
vm_prot_t max_protection;
vm_inherit_t inheritance;
} __Request__vm_remap_new_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Request__vm_map_subsystem__defined */
/* union of all requests */
#ifndef __RequestUnion__vm_map_subsystem__defined
#define __RequestUnion__vm_map_subsystem__defined
union __RequestUnion__vm_map_subsystem {
__Request__vm_region_t Request_vm_region;
__Request__vm_allocate_t Request_vm_allocate;
__Request__vm_deallocate_t Request_vm_deallocate;
__Request__vm_protect_t Request_vm_protect;
__Request__vm_inherit_t Request_vm_inherit;
__Request__vm_read_t Request_vm_read;
__Request__vm_read_list_t Request_vm_read_list;
__Request__vm_write_t Request_vm_write;
__Request__vm_copy_t Request_vm_copy;
__Request__vm_read_overwrite_t Request_vm_read_overwrite;
__Request__vm_msync_t Request_vm_msync;
__Request__vm_behavior_set_t Request_vm_behavior_set;
__Request__vm_map_t Request_vm_map;
__Request__vm_machine_attribute_t Request_vm_machine_attribute;
__Request__vm_remap_t Request_vm_remap;
__Request__task_wire_t Request_task_wire;
__Request__mach_make_memory_entry_t Request_mach_make_memory_entry;
__Request__vm_map_page_query_t Request_vm_map_page_query;
__Request__mach_vm_region_info_t Request_mach_vm_region_info;
__Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info;
__Request__vm_region_recurse_t Request_vm_region_recurse;
__Request__vm_region_recurse_64_t Request_vm_region_recurse_64;
__Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64;
__Request__vm_region_64_t Request_vm_region_64;
__Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64;
__Request__vm_map_64_t Request_vm_map_64;
__Request__vm_purgable_control_t Request_vm_purgable_control;
__Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown;
__Request__vm_remap_new_t Request_vm_remap_new;
};
#endif /* !__RequestUnion__vm_map_subsystem__defined */
/* typedefs for all replies */
#ifndef __Reply__vm_map_subsystem__defined
#define __Reply__vm_map_subsystem__defined
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_name;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
mach_msg_type_number_t infoCnt;
int info[10];
} __Reply__vm_region_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
} __Reply__vm_allocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_deallocate_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_protect_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_inherit_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t data;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t dataCnt;
} __Reply__vm_read_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_read_entry_t data_list;
} __Reply__vm_read_list_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_write_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_copy_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_size_t outsize;
} __Reply__vm_read_overwrite_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_msync_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_behavior_set_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
} __Reply__vm_map_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_machine_attribute_val_t value;
} __Reply__vm_machine_attribute_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t target_address;
vm_prot_t cur_protection;
vm_prot_t max_protection;
} __Reply__vm_remap_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__task_wire_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_handle;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_size_t size;
} __Reply__mach_make_memory_entry_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
integer_t disposition;
integer_t ref_count;
} __Reply__vm_map_page_query_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t objects;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_info_region_t region;
mach_msg_type_number_t objectsCnt;
} __Reply__mach_vm_region_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t pages;
/* end of the kernel processed data */
NDR_record_t NDR;
mach_msg_type_number_t pagesCnt;
} __Reply__vm_mapped_pages_info_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
vm_size_t size;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
int info[19];
} __Reply__vm_region_recurse_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
vm_size_t size;
natural_t nesting_depth;
mach_msg_type_number_t infoCnt;
int info[19];
} __Reply__vm_region_recurse_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_ool_descriptor_t objects;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_info_region_64_t region;
mach_msg_type_number_t objectsCnt;
} __Reply__mach_vm_region_info_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_name;
/* end of the kernel processed data */
NDR_record_t NDR;
vm_address_t address;
vm_size_t size;
mach_msg_type_number_t infoCnt;
int info[10];
} __Reply__vm_region_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
/* start of the kernel processed data */
mach_msg_body_t msgh_body;
mach_msg_port_descriptor_t object_handle;
/* end of the kernel processed data */
NDR_record_t NDR;
memory_object_size_t size;
} __Reply__mach_make_memory_entry_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t address;
} __Reply__vm_map_64_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
int state;
} __Reply__vm_purgable_control_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
} __Reply__vm_map_exec_lockdown_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#ifdef __MigPackStructs
#pragma pack(push, 4)
#endif
typedef struct {
mach_msg_header_t Head;
NDR_record_t NDR;
kern_return_t RetCode;
vm_address_t target_address;
vm_prot_t cur_protection;
vm_prot_t max_protection;
} __Reply__vm_remap_new_t __attribute__((unused));
#ifdef __MigPackStructs
#pragma pack(pop)
#endif
#endif /* !__Reply__vm_map_subsystem__defined */
/* union of all replies */
#ifndef __ReplyUnion__vm_map_subsystem__defined
#define __ReplyUnion__vm_map_subsystem__defined
union __ReplyUnion__vm_map_subsystem {
__Reply__vm_region_t Reply_vm_region;
__Reply__vm_allocate_t Reply_vm_allocate;
__Reply__vm_deallocate_t Reply_vm_deallocate;
__Reply__vm_protect_t Reply_vm_protect;
__Reply__vm_inherit_t Reply_vm_inherit;
__Reply__vm_read_t Reply_vm_read;
__Reply__vm_read_list_t Reply_vm_read_list;
__Reply__vm_write_t Reply_vm_write;
__Reply__vm_copy_t Reply_vm_copy;
__Reply__vm_read_overwrite_t Reply_vm_read_overwrite;
__Reply__vm_msync_t Reply_vm_msync;
__Reply__vm_behavior_set_t Reply_vm_behavior_set;
__Reply__vm_map_t Reply_vm_map;
__Reply__vm_machine_attribute_t Reply_vm_machine_attribute;
__Reply__vm_remap_t Reply_vm_remap;
__Reply__task_wire_t Reply_task_wire;
__Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry;
__Reply__vm_map_page_query_t Reply_vm_map_page_query;
__Reply__mach_vm_region_info_t Reply_mach_vm_region_info;
__Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info;
__Reply__vm_region_recurse_t Reply_vm_region_recurse;
__Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64;
__Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64;
__Reply__vm_region_64_t Reply_vm_region_64;
__Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64;
__Reply__vm_map_64_t Reply_vm_map_64;
__Reply__vm_purgable_control_t Reply_vm_purgable_control;
__Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown;
__Reply__vm_remap_new_t Reply_vm_remap_new;
};
#endif /* !__RequestUnion__vm_map_subsystem__defined */
#ifndef subsystem_to_name_map_vm_map
#define subsystem_to_name_map_vm_map \
{ "vm_region", 3800 },\
{ "vm_allocate", 3801 },\
{ "vm_deallocate", 3802 },\
{ "vm_protect", 3803 },\
{ "vm_inherit", 3804 },\
{ "vm_read", 3805 },\
{ "vm_read_list", 3806 },\
{ "vm_write", 3807 },\
{ "vm_copy", 3808 },\
{ "vm_read_overwrite", 3809 },\
{ "vm_msync", 3810 },\
{ "vm_behavior_set", 3811 },\
{ "vm_map", 3812 },\
{ "vm_machine_attribute", 3813 },\
{ "vm_remap", 3814 },\
{ "task_wire", 3815 },\
{ "mach_make_memory_entry", 3816 },\
{ "vm_map_page_query", 3817 },\
{ "mach_vm_region_info", 3818 },\
{ "vm_mapped_pages_info", 3819 },\
{ "vm_region_recurse", 3821 },\
{ "vm_region_recurse_64", 3822 },\
{ "mach_vm_region_info_64", 3823 },\
{ "vm_region_64", 3824 },\
{ "mach_make_memory_entry_64", 3825 },\
{ "vm_map_64", 3826 },\
{ "vm_purgable_control", 3830 },\
{ "vm_map_exec_lockdown", 3831 },\
{ "vm_remap_new", 3832 }
#endif
#ifdef __AfterMigUserHeader
__AfterMigUserHeader
#endif /* __AfterMigUserHeader */
#endif /* _vm_map_user_ */
|
0 | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers | repos/simulations/libs/system-sdk/macos12/System/Library/Frameworks/Kernel.framework/Headers/mach/mach_voucher_types.h | /*
* Copyright (c) 2013 Apple Computer, 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
* 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
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* 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 _MACH_VOUCHER_TYPES_H_
#define _MACH_VOUCHER_TYPES_H_
#include <mach/std_types.h>
#include <mach/port.h>
#include <mach/message.h>
/*
* Mach Voucher - an immutable collection of attribute value handles.
*
* The mach voucher is such that it can be passed between processes
* as a Mach port send right (by convention in the mach_msg_header_t’s
* msgh_voucher field).
*
* You may construct a new mach voucher by passing a construction
* recipe to host_create_mach_voucher(). The construction recipe supports
* generic commands for copying, removing, and redeeming attribute value
* handles from previous vouchers, or running attribute-mananger-specific
* commands within the recipe.
*
* Once the set of attribute value handles is constructed and returned,
* that set will not change for the life of the voucher (just because the
* attribute value handle itself doesn't change, the value the handle refers
* to is free to change at will).
*/
typedef mach_port_t mach_voucher_t;
#define MACH_VOUCHER_NULL ((mach_voucher_t) 0)
typedef mach_port_name_t mach_voucher_name_t;
#define MACH_VOUCHER_NAME_NULL ((mach_voucher_name_t) 0)
typedef mach_voucher_name_t *mach_voucher_name_array_t;
#define MACH_VOUCHER_NAME_ARRAY_NULL ((mach_voucher_name_array_t) 0)
/*
* This type changes appearance between user-space and kernel. It is
* a port at user-space and a reference to an ipc_voucher structure in-kernel.
*/
struct ipc_voucher;
typedef struct ipc_voucher *ipc_voucher_t;
#define IPC_VOUCHER_NULL ((ipc_voucher_t) 0)
/*
* mach_voucher_selector_t - A means of specifying which thread/task value to extract -
* the current voucher set at this level, or a voucher representing
* the full [layered] effective value for the task/thread.
*/
typedef uint32_t mach_voucher_selector_t;
#define MACH_VOUCHER_SELECTOR_CURRENT ((mach_voucher_selector_t)0)
#define MACH_VOUCHER_SELECTOR_EFFECTIVE ((mach_voucher_selector_t)1)
/*
* mach_voucher_attr_key_t - The key used to identify a particular managed resource or
* to select the specific resource manager’s data associated
* with a given voucher.
*/
typedef uint32_t mach_voucher_attr_key_t;
typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t;
#define MACH_VOUCHER_ATTR_KEY_ALL ((mach_voucher_attr_key_t)~0)
#define MACH_VOUCHER_ATTR_KEY_NONE ((mach_voucher_attr_key_t)0)
/* other well-known-keys will be added here */
#define MACH_VOUCHER_ATTR_KEY_ATM ((mach_voucher_attr_key_t)1)
#define MACH_VOUCHER_ATTR_KEY_IMPORTANCE ((mach_voucher_attr_key_t)2)
#define MACH_VOUCHER_ATTR_KEY_BANK ((mach_voucher_attr_key_t)3)
#define MACH_VOUCHER_ATTR_KEY_PTHPRIORITY ((mach_voucher_attr_key_t)4)
#define MACH_VOUCHER_ATTR_KEY_USER_DATA ((mach_voucher_attr_key_t)7)
#define MACH_VOUCHER_ATTR_KEY_BITS MACH_VOUCHER_ATTR_KEY_USER_DATA /* deprecated */
#define MACH_VOUCHER_ATTR_KEY_TEST ((mach_voucher_attr_key_t)8)
#define MACH_VOUCHER_ATTR_KEY_NUM_WELL_KNOWN MACH_VOUCHER_ATTR_KEY_TEST
/*
* mach_voucher_attr_content_t
*
* Data passed to a resource manager for modifying an attribute
* value or returned from the resource manager in response to a
* request to externalize the current value for that attribute.
*/
typedef uint8_t *mach_voucher_attr_content_t;
typedef uint32_t mach_voucher_attr_content_size_t;
/*
* mach_voucher_attr_command_t - The private verbs implemented by each voucher
* attribute manager via mach_voucher_attr_command().
*/
typedef uint32_t mach_voucher_attr_command_t;
/*
* mach_voucher_attr_recipe_command_t
*
* The verbs used to create/morph a voucher attribute value.
* We define some system-wide commands here - related to creation, and transport of
* vouchers and attributes. Additional commands can be defined by, and supported by,
* individual attribute resource managers.
*/
typedef uint32_t mach_voucher_attr_recipe_command_t;
typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t;
#define MACH_VOUCHER_ATTR_NOOP ((mach_voucher_attr_recipe_command_t)0)
#define MACH_VOUCHER_ATTR_COPY ((mach_voucher_attr_recipe_command_t)1)
#define MACH_VOUCHER_ATTR_REMOVE ((mach_voucher_attr_recipe_command_t)2)
#define MACH_VOUCHER_ATTR_SET_VALUE_HANDLE ((mach_voucher_attr_recipe_command_t)3)
#define MACH_VOUCHER_ATTR_AUTO_REDEEM ((mach_voucher_attr_recipe_command_t)4)
#define MACH_VOUCHER_ATTR_SEND_PREPROCESS ((mach_voucher_attr_recipe_command_t)5)
/* redeem is on its way out? */
#define MACH_VOUCHER_ATTR_REDEEM ((mach_voucher_attr_recipe_command_t)10)
/* recipe command(s) for importance attribute manager */
#define MACH_VOUCHER_ATTR_IMPORTANCE_SELF ((mach_voucher_attr_recipe_command_t)200)
/* recipe command(s) for bit-store attribute manager */
#define MACH_VOUCHER_ATTR_USER_DATA_STORE ((mach_voucher_attr_recipe_command_t)211)
#define MACH_VOUCHER_ATTR_BITS_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE /* deprecated */
/* recipe command(s) for test attribute manager */
#define MACH_VOUCHER_ATTR_TEST_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE
/*
* mach_voucher_attr_recipe_t
*
* An element in a recipe list to create a voucher.
*/
#pragma pack(push, 1)
typedef struct mach_voucher_attr_recipe_data {
mach_voucher_attr_key_t key;
mach_voucher_attr_recipe_command_t command;
mach_voucher_name_t previous_voucher;
mach_voucher_attr_content_size_t content_size;
uint8_t content[];
} mach_voucher_attr_recipe_data_t;
typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t;
typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t;
/* Make the above palatable to MIG */
typedef uint8_t *mach_voucher_attr_raw_recipe_t;
typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t;
typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t;
typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t;
#define MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE 5120
#define MACH_VOUCHER_TRAP_STACK_LIMIT 256
#pragma pack(pop)
/*
* VOUCHER ATTRIBUTE MANAGER Writer types
*/
/*
* mach_voucher_attr_manager_t
*
* A handle through which the mach voucher mechanism communicates with the voucher
* attribute manager for a given attribute key.
*/
typedef mach_port_t mach_voucher_attr_manager_t;
#define MACH_VOUCHER_ATTR_MANAGER_NULL ((mach_voucher_attr_manager_t) 0)
/*
* mach_voucher_attr_control_t
*
* A handle provided to the voucher attribute manager for a given attribute key
* through which it makes inquiries or control operations of the mach voucher mechanism.
*/
typedef mach_port_t mach_voucher_attr_control_t;
#define MACH_VOUCHER_ATTR_CONTROL_NULL ((mach_voucher_attr_control_t) 0)
/*
* These types are different in-kernel vs user-space. They are ports in user-space,
* pointers to opaque structs in most of the kernel, and pointers to known struct
* types in the Mach portion of the kernel.
*/
struct ipc_voucher_attr_manager;
struct ipc_voucher_attr_control;
typedef const struct ipc_voucher_attr_manager *ipc_voucher_attr_manager_t;
typedef struct ipc_voucher_attr_control *ipc_voucher_attr_control_t;
#define IPC_VOUCHER_ATTR_MANAGER_NULL ((ipc_voucher_attr_manager_t) 0)
#define IPC_VOUCHER_ATTR_CONTROL_NULL ((ipc_voucher_attr_control_t) 0)
/*
* mach_voucher_attr_value_handle_t
*
* The private handle that the voucher attribute manager provides to
* the mach voucher mechanism to represent a given attr content/value.
*/
typedef uint64_t mach_voucher_attr_value_handle_t __kernel_ptr_semantics;
typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t;
typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t;
#define MACH_VOUCHER_ATTR_VALUE_MAX_NESTED ((mach_voucher_attr_value_handle_array_size_t)4)
typedef uint32_t mach_voucher_attr_value_reference_t;
typedef uint32_t mach_voucher_attr_value_flags_t;
#define MACH_VOUCHER_ATTR_VALUE_FLAGS_NONE ((mach_voucher_attr_value_flags_t)0)
#define MACH_VOUCHER_ATTR_VALUE_FLAGS_PERSIST ((mach_voucher_attr_value_flags_t)1)
/* USE - TBD */
typedef uint32_t mach_voucher_attr_control_flags_t;
#define MACH_VOUCHER_ATTR_CONTROL_FLAGS_NONE ((mach_voucher_attr_control_flags_t)0)
/*
* Commands and types for the IPC Importance Attribute Manager
*
* These are the valid mach_voucher_attr_command() options with the
* MACH_VOUCHER_ATTR_KEY_IMPORTANCE key.
*/
#define MACH_VOUCHER_IMPORTANCE_ATTR_ADD_EXTERNAL 1 /* Add some number of external refs (not supported) */
#define MACH_VOUCHER_IMPORTANCE_ATTR_DROP_EXTERNAL 2 /* Drop some number of external refs */
typedef uint32_t mach_voucher_attr_importance_refs;
/*
* Activity id Generation defines
*/
#define MACH_ACTIVITY_ID_COUNT_MAX 16
#endif /* _MACH_VOUCHER_TYPES_H_ */
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.