2 * PASS (Power Aware System Service)
4 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
22 #include <libsyscommon/resource-manager.h>
23 #include <util/thread.h>
24 #include <util/queue.h>
26 #define MONITOR_POLLING_DURATION 100
28 struct monitor_command {
29 struct syscommon_resman_resource *resource;
36 struct thread *thread;
43 struct monitor *monitor_get(void);
44 gboolean monitor_get_debug_mode(void);
45 void monitor_set_debug_mode(gboolean on);
46 int monitor_thread_init(struct monitor *monitor);
47 void monitor_thread_exit(struct monitor *monitor);
49 void monitor_command_wait_done(struct monitor_command *cmd);
50 void monitor_command_submit(struct monitor_command *cmd);
51 void monitor_command_submit_sync(struct monitor_command *cmd);
52 void monitor_command_bind_resource(struct monitor_command *cmd, struct syscommon_resman_resource *res);
53 void monitor_command_unbind_resource(struct monitor_command *cmd);
54 int monitor_command_init(struct monitor_command **cmd);
55 void monitor_command_exit(struct monitor_command *cmd);
57 int request_server_init(void);
58 void request_server_exit(void);