*/
struct sched sched = {.max_fileno = 0};
-/**
- * The task for obtaining para_server's status (para_client stat).
- *
- * \sa struct task, struct sched.
- */
+/* The task for obtaining para_server's status (para_client stat). */
struct status_task {
/** The associated task structure of audiod. */
struct task *task;
exit(EXIT_FAILURE);
}
-static void signal_pre_select(struct sched *s, struct task *t)
+static void signal_pre_select(struct sched *s, void *context)
{
- struct signal_task *st = task_context(t);
+ struct signal_task *st = context;
para_fd_set(st->fd, &s->rfds, &s->max_fileno);
}
-static int signal_post_select(struct sched *s, __a_unused struct task *t)
+static int signal_post_select(struct sched *s, __a_unused void *context)
{
int signum;
-
signum = para_next_signal(&s->rfds);
switch (signum) {
case SIGINT:
return 0;
}
-static void command_pre_select(struct sched *s, struct task *t)
+static void command_pre_select(struct sched *s, void *context)
{
- struct command_task *ct = task_context(t);
+ struct command_task *ct = context;
para_fd_set(ct->fd, &s->rfds, &s->max_fileno);
}
-static int command_post_select(struct sched *s, struct task *t)
+static int command_post_select(struct sched *s, void *context)
{
int ret;
- struct command_task *ct = task_context(t);
+ struct command_task *ct = context;
static struct timeval last_status_dump;
struct timeval tmp, delay;
bool force = true;
{
if (!stat_task->ct)
return;
- client_close(stat_task->ct);
task_reap(&stat_task->ct->task);
+ client_close(stat_task->ct);
stat_task->ct = NULL;
clear_and_dump_items();
stat_task->length_seconds = 0;
btr_log_tree(sl->receiver_node->btrn, LL_NOTICE);
}
-static void status_pre_select(struct sched *s, struct task *t)
+static void status_pre_select(struct sched *s, void *context)
{
- struct status_task *st = task_context(t);
+ struct status_task *st = context;
int i, ret, cafn = stat_task->current_audio_format_num;
if (must_start_decoder())
}
/* restart the client task if necessary */
-static int status_post_select(struct sched *s, struct task *t)
+static int status_post_select(struct sched *s, void *context)
{
- struct status_task *st = task_context(t);
+ struct status_task *st = context;
if (audiod_status == AUDIOD_OFF) {
if (!st->ct)