/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* mach/policy.h
*
* Definitions for scheduing policy.
- *
- * N.B. The interfaces defined here are all obsolete!!
+ */
+
+/*
+ * All interfaces defined here are obsolete.
*/
#include <mach/boolean.h>
+#include <mach/message.h>
#include <mach/vm_types.h>
-#include <sys/appleapiopts.h>
-
/*
* Old scheduling control interface
*/
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
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)))
/*
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)))
/*
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
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_ */