File: idle.h

package info (click to toggle)
iwd 3.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,176 kB
  • sloc: ansic: 140,705; sh: 5,514; makefile: 714
file content (34 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * Embedded Linux library
 * Copyright (C) 2011-2014  Intel Corporation
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#ifndef __ELL_IDLE_H
#define __ELL_IDLE_H

#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

struct l_idle;

typedef void (*l_idle_notify_cb_t) (struct l_idle *idle, void *user_data);
typedef void (*l_idle_oneshot_cb_t) (void *user_data);
typedef void (*l_idle_destroy_cb_t) (void *user_data);

struct l_idle *l_idle_create(l_idle_notify_cb_t callback,
			void *user_data, l_idle_destroy_cb_t destroy);
void l_idle_remove(struct l_idle *idle);

bool l_idle_oneshot(l_idle_oneshot_cb_t callback, void *user_data,
			l_idle_destroy_cb_t destroy);

#ifdef __cplusplus
}
#endif

#endif /* __ELL_IDLE_H */