1*1b191cb5SApple OSS Distributions #ifndef XNU_DARWINTEST_UTILS_H 2*1b191cb5SApple OSS Distributions #define XNU_DARWINTEST_UTILS_H 3*1b191cb5SApple OSS Distributions 4*1b191cb5SApple OSS Distributions #include <stdbool.h> 5*1b191cb5SApple OSS Distributions 6*1b191cb5SApple OSS Distributions /* Misc. utility functions for writing darwintests. */ 7*1b191cb5SApple OSS Distributions bool is_development_kernel(void); 8*1b191cb5SApple OSS Distributions 9*1b191cb5SApple OSS Distributions /* Launches the given helper variant as a managed process. */ 10*1b191cb5SApple OSS Distributions pid_t launch_background_helper( 11*1b191cb5SApple OSS Distributions const char* variant, 12*1b191cb5SApple OSS Distributions bool start_suspended, 13*1b191cb5SApple OSS Distributions bool memorystatus_managed); 14*1b191cb5SApple OSS Distributions /* 15*1b191cb5SApple OSS Distributions * Set the process's managed bit, so that the memorystatus subsystem treats 16*1b191cb5SApple OSS Distributions * this process like an app instead of a sysproc. 17*1b191cb5SApple OSS Distributions */ 18*1b191cb5SApple OSS Distributions void set_process_memorystatus_managed(pid_t pid); 19*1b191cb5SApple OSS Distributions 20*1b191cb5SApple OSS Distributions #define XNU_T_META_SOC_SPECIFIC T_META_TAG("SoCSpecific") 21*1b191cb5SApple OSS Distributions 22*1b191cb5SApple OSS Distributions #endif /* XNU_DARWINTEST_UTILS_H */ 23