extern int boothowto; /* reboot flags, from console subsystem */
extern int show_space;
+extern int minimalboot;
+#if CONFIG_EMBEDDED
+extern int darkboot;
+#endif
-extern int nblkdev; /* number of entries in bdevsw */
-extern int nchrdev; /* number of entries in cdevsw */
+extern const int nblkdev; /* number of entries in bdevsw */
+extern const int nchrdev; /* number of entries in cdevsw */
#endif /* BSD_KERNEL_PRIVATE */
#ifdef KERNEL_PRIVATE
extern dev_t rootdev; /* root device */
extern struct vnode *rootvp; /* vnode equivalent to above */
-#ifdef XNU_KERNEL_PRIVATE
-#define NO_FUNNEL 0
-#define KERNEL_FUNNEL 1
-extern funnel_t * kernel_flock;
-#endif /* XNU_KERNEL_PRIVATE */
-
#endif /* KERNEL_PRIVATE */
#define SYSINIT(a,b,c,d,e)
int hzto(struct timeval *tv);
void tablefull(const char *);
int kvprintf(char const *, void (*)(int, void*), void *, int,
- __darwin_va_list);
+ __darwin_va_list) __printflike(1,0);
void uprintf(const char *, ...) __printflike(1,2);
int copywithin(void *saddr, void *daddr, size_t len);
int64_t fulong(user_addr_t addr);
int sulong(user_addr_t addr, int64_t longword);
uint64_t fuulong(user_addr_t addr);
int suulong(user_addr_t addr, uint64_t ulongword);
-int vslock(user_addr_t addr, user_size_t len);
-int vsunlock(user_addr_t addr, user_size_t len, int dirtied);
int clone_system_shared_regions(int shared_regions_active,
int chain_regions,
int base_vnode);
void get_procrustime(struct time_value *tv);
void load_init_program(struct proc *p);
void __pthread_testcancel(int presyscall);
-void syscall_exit_funnelcheck(void);
void throttle_info_get_last_io_time(mount_t mp, struct timeval *tv);
void update_last_io_time(mount_t mp);
+void throttle_info_end_io(buf_t bp);
#endif /* BSD_KERNEL_PRIVATE */
#ifdef KERNEL_PRIVATE
void timeout(void (*)(void *), void *arg, int ticks);
+void timeout_with_leeway(void (*)(void *), void *arg, int ticks, int leeway_ticks);
void untimeout(void (*)(void *), void *arg);
int bsd_hostname(char *, int, int*);
+int vslock(user_addr_t addr, user_size_t len);
+int vsunlock(user_addr_t addr, user_size_t len, int dirtied);
#endif /* KERNEL_PRIVATE */
int nullop(void);
void bsd_untimeout(void (*)(void *), void *arg);
void set_fsblocksize(struct vnode *);
uint64_t tvtoabstime(struct timeval *);
+uint64_t tstoabstime(struct timespec *);
void *throttle_info_create(void);
void throttle_info_mount_ref(mount_t mp, void * throttle_info);
void throttle_info_mount_rel(mount_t mp);
void throttle_info_update(void *throttle_info, int flags);
uint32_t throttle_lowpri_io(int sleep_amount);
void throttle_set_thread_io_policy(int policy);
+
typedef struct __throttle_info_handle *throttle_info_handle_t;
-int throttle_info_ref_by_mask(
- uint64_t throttle_mask, throttle_info_handle_t *throttle_info_handle);
+int throttle_info_ref_by_mask(uint64_t throttle_mask, throttle_info_handle_t *throttle_info_handle);
void throttle_info_rel_by_mask(throttle_info_handle_t throttle_info_handle);
void throttle_info_update_by_mask(void *throttle_info_handle, int flags);
+void throttle_info_disable_throttle(int devno, boolean_t isfusion);
+/*
+ * 'throttle_info_handle' acquired via 'throttle_info_ref_by_mask'
+ * 'policy' should be specified as either IOPOL_UTILITY or IPOL_THROTTLE,
+ * all other values will be treated as IOPOL_NORMAL (i.e. no throttling)
+ */
+int throttle_info_io_will_be_throttled(void *throttle_info_handle, int policy);
+
+#ifdef KERNEL_PRIVATE
+
+/* returned by throttle_io_will_be_throttled */
+#define THROTTLE_DISENGAGED 0
+#define THROTTLE_ENGAGED 1
+#define THROTTLE_NOW 2
+
+int throttle_io_will_be_throttled(int lowpri_window_msecs, mount_t mp);
+int throttle_lowpri_window(void) __attribute__((pure));
+struct uthread;
+void throttle_info_reset_window(struct uthread *ut);
+
+#endif
+
+#ifdef XNU_KERNEL_PRIVATE
+void *exec_spawnattr_getmacpolicyinfo(const void *macextensions, const char *policyname, size_t *lenp);
+#endif
+
+#ifdef BSD_KERNEL_PRIVATE
+
+#define THROTTLE_IO_ENABLE 1
+#define THROTTLE_IO_DISABLE 0
+void sys_override_io_throttle(int flag);
+
+#endif /* BSD_KERNEL_PRIVATE */
+
__END_DECLS
#endif /* !_SYS_SYSTM_H_ */