#include <string.h>
#include <stdio.h>
#include "runqueue.h"
Go to the source code of this file.
|
static void | __runqueue_empty_cb (struct uloop_timeout *timeout) |
|
void | runqueue_init (struct runqueue *q) |
|
static void | __runqueue_start_next (struct uloop_timeout *timeout) |
|
static void | runqueue_start_next (struct runqueue *q) |
|
static int | __runqueue_cancel (void *ctx, struct safe_list *list) |
|
void | runqueue_cancel_active (struct runqueue *q) |
|
void | runqueue_cancel_pending (struct runqueue *q) |
|
void | runqueue_cancel (struct runqueue *q) |
|
void | runqueue_kill (struct runqueue *q) |
|
void | runqueue_task_cancel (struct runqueue_task *t, int type) |
|
static void | __runqueue_task_timeout (struct uloop_timeout *timeout) |
|
static void | _runqueue_task_add (struct runqueue *q, struct runqueue_task *t, bool running, bool first) |
|
void | runqueue_task_add (struct runqueue *q, struct runqueue_task *t, bool running) |
|
void | runqueue_task_add_first (struct runqueue *q, struct runqueue_task *t, bool running) |
|
void | runqueue_task_kill (struct runqueue_task *t) |
|
void | runqueue_stop (struct runqueue *q) |
|
void | runqueue_resume (struct runqueue *q) |
|
void | runqueue_task_complete (struct runqueue_task *t) |
|
static void | __runqueue_proc_cb (struct uloop_process *p, int ret) |
|
void | runqueue_process_cancel_cb (struct runqueue *q, struct runqueue_task *t, int type) |
|
void | runqueue_process_kill_cb (struct runqueue *q, struct runqueue_task *t) |
|
void | runqueue_process_add (struct runqueue *q, struct runqueue_process *p, pid_t pid) |
|
◆ __runqueue_cancel()
static int __runqueue_cancel |
( |
void * |
ctx, |
|
|
struct safe_list * |
list |
|
) |
| |
|
static |
Definition at line 82 of file runqueue.c.
#define container_of(ptr, type, member)
void runqueue_task_cancel(struct runqueue_task *t, int type)
◆ __runqueue_empty_cb()
static void __runqueue_empty_cb |
( |
struct uloop_timeout * |
timeout | ) |
|
|
static |
Definition at line 24 of file runqueue.c.
struct uloop_timeout timeout
void(* empty_cb)(struct runqueue *q)
◆ __runqueue_proc_cb()
static void __runqueue_proc_cb |
( |
struct uloop_process * |
p, |
|
|
int |
ret |
|
) |
| |
|
static |
Definition at line 238 of file runqueue.c.
void runqueue_task_complete(struct runqueue_task *t)
struct runqueue_task task
struct uloop_process proc
◆ __runqueue_start_next()
static void __runqueue_start_next |
( |
struct uloop_timeout * |
timeout | ) |
|
|
static |
Definition at line 37 of file runqueue.c.
static bool list_empty(const struct list_head *head)
#define list_first_entry(ptr, type, field)
static void __runqueue_empty_cb(struct uloop_timeout *timeout)
void safe_list_add(struct safe_list *list, struct safe_list *head)
void safe_list_del(struct safe_list *list)
void(* run)(struct runqueue *q, struct runqueue_task *t)
const struct runqueue_task_type * type
struct uloop_timeout timeout
struct safe_list tasks_inactive
struct safe_list tasks_active
int uloop_timeout_set(struct uloop_timeout *timeout, int msecs)
◆ __runqueue_task_timeout()
static void __runqueue_task_timeout |
( |
struct uloop_timeout * |
timeout | ) |
|
|
static |
Definition at line 138 of file runqueue.c.
void runqueue_task_kill(struct runqueue_task *t)
◆ _runqueue_task_add()
static void _runqueue_task_add |
( |
struct runqueue * |
q, |
|
|
struct runqueue_task * |
t, |
|
|
bool |
running, |
|
|
bool |
first |
|
) |
| |
|
static |
Definition at line 148 of file runqueue.c.
155 if (!t->
type->
run && !running) {
156 fprintf(stderr,
"BUG: inactive task added without run() callback\n");
static void runqueue_start_next(struct runqueue *q)
static void __runqueue_task_timeout(struct uloop_timeout *timeout)
void safe_list_add_first(struct safe_list *list, struct safe_list *head)
◆ runqueue_cancel()
void runqueue_cancel |
( |
struct runqueue * |
q | ) |
|
Definition at line 102 of file runqueue.c.
void runqueue_cancel_active(struct runqueue *q)
void runqueue_cancel_pending(struct runqueue *q)
◆ runqueue_cancel_active()
void runqueue_cancel_active |
( |
struct runqueue * |
q | ) |
|
Definition at line 92 of file runqueue.c.
static int __runqueue_cancel(void *ctx, struct safe_list *list)
int safe_list_for_each(struct safe_list *head, int(*cb)(void *ctx, struct safe_list *list), void *ctx)
◆ runqueue_cancel_pending()
void runqueue_cancel_pending |
( |
struct runqueue * |
q | ) |
|
◆ runqueue_init()
void runqueue_init |
( |
struct runqueue * |
q | ) |
|
Definition at line 31 of file runqueue.c.
#define INIT_SAFE_LIST(_head)
◆ runqueue_kill()
void runqueue_kill |
( |
struct runqueue * |
q | ) |
|
Definition at line 108 of file runqueue.c.
int uloop_timeout_cancel(struct uloop_timeout *timeout)
◆ runqueue_process_add()
Definition at line 269 of file runqueue.c.
void runqueue_task_add(struct runqueue *q, struct runqueue_task *t, bool running)
static const struct runqueue_task_type runqueue_proc_type
static void __runqueue_proc_cb(struct uloop_process *p, int ret)
int uloop_process_add(struct uloop_process *p)
◆ runqueue_process_cancel_cb()
◆ runqueue_process_kill_cb()
Definition at line 255 of file runqueue.c.
int uloop_process_delete(struct uloop_process *p)
◆ runqueue_resume()
void runqueue_resume |
( |
struct runqueue * |
q | ) |
|
◆ runqueue_start_next()
static void runqueue_start_next |
( |
struct runqueue * |
q | ) |
|
|
static |
Definition at line 73 of file runqueue.c.
static void __runqueue_start_next(struct uloop_timeout *timeout)
◆ runqueue_stop()
void runqueue_stop |
( |
struct runqueue * |
q | ) |
|
◆ runqueue_task_add()
Definition at line 181 of file runqueue.c.
static void _runqueue_task_add(struct runqueue *q, struct runqueue_task *t, bool running, bool first)
◆ runqueue_task_add_first()
◆ runqueue_task_cancel()
Definition at line 120 of file runqueue.c.
void(* cancel)(struct runqueue *q, struct runqueue_task *t, int type)
◆ runqueue_task_complete()
Definition at line 216 of file runqueue.c.
void(* complete)(struct runqueue *q, struct runqueue_task *t)
◆ runqueue_task_kill()
Definition at line 191 of file runqueue.c.
void(* kill)(struct runqueue *q, struct runqueue_task *t)
◆ runqueue_proc_type
Initial value:= {
.name = "process",
}
void runqueue_process_cancel_cb(struct runqueue *q, struct runqueue_task *t, int type)
void runqueue_process_kill_cb(struct runqueue *q, struct runqueue_task *t)
Definition at line 255 of file runqueue.c.