1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (C) 2024 Intel Corporation. 3 * All rights reserved. 4 */ 5 #ifndef EVENT_INTERNAL_H 6 #define EVENT_INTERNAL_H 7 8 #include "spdk/stdinc.h" 9 #include "spdk/cpuset.h" 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 /** 16 * Parse proc/stat and get time spent processing system mode and user mode 17 * 18 * \param core Core which will be queried 19 * \param usr Holds time [USER_HZ] spent processing in user mode 20 * \param sys Holds time [USER_HZ] spent processing in system mode 21 * \param irq Holds time [USER_HZ] spent processing interrupts 22 * 23 * \return 0 on success -1 on fail 24 */ 25 int app_get_proc_stat(unsigned int core, uint64_t *usr, uint64_t *sys, uint64_t *irq); 26 27 #ifdef __cplusplus 28 } 29 #endif 30 31 /** 32 * Get isolated CPU core mask. 33 */ 34 const char *scheduler_get_isolated_core_mask(void); 35 36 /** 37 * Set isolated CPU core mask. 38 */ 39 bool scheduler_set_isolated_core_mask(struct spdk_cpuset isolated_core_mask); 40 41 #endif /* EVENT_INTERNAL_H */ 42