2022-09-19 12:39:02 +02:00
|
|
|
/* Copyright (c) 2021 Barcelona Supercomputing Center (BSC)
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later */
|
2021-10-26 18:42:41 +02:00
|
|
|
|
2021-10-21 16:15:29 +02:00
|
|
|
#ifndef OVNI_CHAN_H
|
|
|
|
#define OVNI_CHAN_H
|
|
|
|
|
|
|
|
#include "emu.h"
|
|
|
|
|
|
|
|
void
|
2021-10-18 12:47:51 +02:00
|
|
|
chan_th_init(struct ovni_ethread *th,
|
2022-09-30 10:25:09 +02:00
|
|
|
struct ovni_chan **update_list,
|
|
|
|
enum chan id,
|
|
|
|
enum chan_track track,
|
|
|
|
int init_st,
|
|
|
|
int enabled,
|
|
|
|
int dirty,
|
|
|
|
int row,
|
|
|
|
FILE *prv,
|
|
|
|
int64_t *clock);
|
2021-10-21 16:41:52 +02:00
|
|
|
|
|
|
|
void
|
2021-10-21 15:46:32 +02:00
|
|
|
chan_cpu_init(struct ovni_cpu *cpu,
|
2022-09-30 10:25:09 +02:00
|
|
|
struct ovni_chan **update_list,
|
|
|
|
enum chan id,
|
|
|
|
enum chan_track track,
|
|
|
|
int row,
|
|
|
|
int init_st,
|
|
|
|
int enabled,
|
|
|
|
int dirty,
|
|
|
|
FILE *prv,
|
|
|
|
int64_t *clock);
|
2021-10-21 16:41:52 +02:00
|
|
|
|
|
|
|
void
|
2021-10-18 12:47:51 +02:00
|
|
|
chan_enable(struct ovni_chan *chan, int enabled);
|
2021-10-21 16:15:29 +02:00
|
|
|
|
|
|
|
void
|
2021-10-18 12:47:51 +02:00
|
|
|
chan_disable(struct ovni_chan *chan);
|
2021-10-21 16:15:29 +02:00
|
|
|
|
|
|
|
int
|
2022-10-03 10:51:58 +02:00
|
|
|
chan_is_enabled(const struct ovni_chan *chan);
|
2021-10-21 16:15:29 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
chan_set(struct ovni_chan *chan, int st);
|
|
|
|
|
|
|
|
void
|
|
|
|
chan_push(struct ovni_chan *chan, int st);
|
|
|
|
|
|
|
|
int
|
|
|
|
chan_pop(struct ovni_chan *chan, int expected_st);
|
|
|
|
|
|
|
|
void
|
|
|
|
chan_ev(struct ovni_chan *chan, int ev);
|
|
|
|
|
|
|
|
int
|
2022-10-03 10:51:58 +02:00
|
|
|
chan_get_st(const struct ovni_chan *chan);
|
2021-10-21 16:15:29 +02:00
|
|
|
|
|
|
|
void
|
|
|
|
chan_emit(struct ovni_chan *chan);
|
|
|
|
|
2022-10-03 10:51:58 +02:00
|
|
|
void
|
|
|
|
chan_copy(struct ovni_chan *dst, const struct ovni_chan *src);
|
|
|
|
|
2021-10-21 16:15:29 +02:00
|
|
|
#endif /* OVNI_CHAN_H */
|