Snitch Runtime
Loading...
Searching...
No Matches
eu_decls.h
1// Copyright 2021 ETH Zurich and University of Bologna.
2// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3// SPDX-License-Identifier: Apache-2.0
4
5#pragma once
6
7#include <stdint.h>
8
9typedef struct {
10 uint32_t workers_in_loop;
11 uint32_t exit_flag;
12 uint32_t workers_mutex;
13 uint32_t workers_wfi;
14 struct {
15 void (*fn)(void *, uint32_t); // points to microtask wrapper
16 void *data;
17 uint32_t argc;
18 uint32_t nthreads;
19 uint32_t fini_count;
20 } e;
21} eu_t;
22
26inline void eu_init(void);
27
32inline void eu_exit(uint32_t core_idx);
33
39inline void eu_event_loop(uint32_t cluster_core_idx);
40
50inline int eu_dispatch_push(void (*fn)(void *, uint32_t), uint32_t argc,
51 void *data, uint32_t nthreads);
52
57inline void eu_run_empty(uint32_t core_idx);
58
63inline void eu_print_status();
Definition eu_decls.h:9