X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/d7e50217d7adf6e52786a38bcaa4cd698cb9a79e..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/osfmk/mach/policy.h diff --git a/osfmk/mach/policy.h b/osfmk/mach/policy.h index 0e004fc95..b6ec795a2 100644 --- a/osfmk/mach/policy.h +++ b/osfmk/mach/policy.h @@ -1,16 +1,19 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ - * - * Copyright (c) 1999-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. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. + * 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 @@ -20,7 +23,7 @@ * Please see the License for the specific language governing rights and * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * @OSF_COPYRIGHT@ @@ -60,15 +63,16 @@ * mach/policy.h * * Definitions for scheduing policy. - * - * N.B. The interfaces defined here are all obsolete!! + */ + +/* + * All interfaces defined here are obsolete. */ #include +#include #include -#include - /* * Old scheduling control interface */ @@ -77,8 +81,6 @@ typedef integer_t *policy_info_t; typedef integer_t *policy_base_t; typedef integer_t *policy_limit_t; -#ifdef __APPLE_API_UNSTABLE - /* * Policy definitions. Policies should be powers of 2, * but cannot be or'd together other than to test for a @@ -131,12 +133,12 @@ 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 \ - (sizeof(struct policy_timeshare_base)/sizeof(integer_t)) -#define POLICY_TIMESHARE_LIMIT_COUNT \ - (sizeof(struct policy_timeshare_limit)/sizeof(integer_t)) -#define POLICY_TIMESHARE_INFO_COUNT \ - (sizeof(struct policy_timeshare_info)/sizeof(integer_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))) /* @@ -165,12 +167,12 @@ 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 \ - (sizeof(struct policy_rr_base)/sizeof(integer_t)) -#define POLICY_RR_LIMIT_COUNT \ - (sizeof(struct policy_rr_limit)/sizeof(integer_t)) -#define POLICY_RR_INFO_COUNT \ - (sizeof(struct policy_rr_info)/sizeof(integer_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))) /* @@ -197,12 +199,12 @@ 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 \ - (sizeof(struct policy_fifo_base)/sizeof(integer_t)) -#define POLICY_FIFO_LIMIT_COUNT \ - (sizeof(struct policy_fifo_limit)/sizeof(integer_t)) -#define POLICY_FIFO_INFO_COUNT \ - (sizeof(struct policy_fifo_info)/sizeof(integer_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 @@ -230,6 +232,4 @@ 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 /* __APPLE_API_UNSTABLE */ - -#endif /* _MACH_POLICY_H_ */ +#endif /* _MACH_POLICY_H_ */