Commit 3c363dd9 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/kernel: add abstract inband work submission API

Provide an abstract interface for triggering work handlers on the
in-band execution stage (aka "secondary mode" in the old jargon),
which can be implemented using ipipe_post_root_work() from the I-pipe,
or as a Dovetail-aware irq_work.

No functional change is introduced in the pre-existing code.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 52a52211
/*
* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2019 Philippe Gerum <rpm@xenomai.org>
*/
#ifndef _COBALT_KERNEL_IPIPE_INBAND_WORK_H
#define _COBALT_KERNEL_IPIPE_INBAND_WORK_H
#include <linux/ipipe.h>
/*
* This field must be named inband_work and appear first in the
* container work struct.
*/
struct pipeline_inband_work {
struct ipipe_work_header work;
};
#define PIPELINE_INBAND_WORK_INITIALIZER(__work, __handler) \
{ \
.work = { \
.size = sizeof(__work), \
.handler = (void (*)(struct ipipe_work_header *)) \
__handler, \
}, \
}
#define pipeline_post_inband_work(__work) \
ipipe_post_work_root(__work, inband_work.work)
#endif /* !_COBALT_KERNEL_IPIPE_INBAND_WORK_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment