xref: /dpdk/examples/vm_power_manager/oob_monitor.h (revision 23f3dac43237d5de18f9544c6e3f932c70c39e27)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Intel Corporation
3  */
4 
5 #ifndef OOB_MONITOR_H_
6 #define OOB_MONITOR_H_
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 /**
13  * Setup the Branch Monitor resources required to initialize epoll.
14  * Must be called first before calling other functions.
15  *
16  * @return
17  *  - 0 on success.
18  *  - Negative on error.
19  */
20 int branch_monitor_init(void);
21 
22 /**
23  * Run the OOB branch monitor, loops forever on epoll_wait.
24  *
25  *
26  * @return
27  *  None
28  */
29 void run_branch_monitor(void);
30 
31 /**
32  * Exit the OOB Branch Monitor.
33  *
34  * @return
35  *  None
36  */
37 void branch_monitor_exit(void);
38 
39 /**
40  * Add a core to the list of cores to monitor.
41  *
42  * @param core
43  *  Core Number
44  *
45  * @return
46  *  - 0 on success.
47  *  - Negative on error.
48  */
49 int add_core_to_monitor(int core);
50 
51 /**
52  * Remove a previously added core from core list.
53  *
54  * @param core
55  *  Core Number
56  *
57  * @return
58  *  - 0 on success.
59  *  - Negative on error.
60  */
61 int remove_core_from_monitor(int core);
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 
68 #endif /* OOB_MONITOR_H_ */
69