Commit abcbf5d2 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/inband_work: dovetail: provide for deferred in-band calls

Dovetail enables irq_work for deferring the execution of a routine
until the in-band stage is active again on the current CPU, we don't
need to provide for any additional mechanism. Therefore we just need
to wrap the pipeline interface calls to the irq_work API.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent a768a5c0
/*
* SPDX-License-Identifier: GPL-2.0
*
* Copyright (C) 2020 Philippe Gerum <rpm@xenomai.org>
*/
#ifndef _COBALT_KERNEL_DOVETAIL_INBAND_WORK_H
#define _COBALT_KERNEL_DOVETAIL_INBAND_WORK_H
#include <linux/irq_work.h>
/*
* This field must be named inband_work and appear first in the
* container work struct.
*/
struct pipeline_inband_work {
struct irq_work work;
};
#define PIPELINE_INBAND_WORK_INITIALIZER(__work, __handler) \
{ \
.work = { \
.func = (void (*)(struct irq_work *)) \
__handler, \
.flags = ATOMIC_INIT(0), \
}, \
}
#define pipeline_post_inband_work(__work) \
irq_work_queue(&(__work)->inband_work.work)
#endif /* !_COBALT_KERNEL_DOVETAIL_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