1/* 2 * Copyright 2020, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#include <sel4/sel4.h> 14 15 16typedef int (*camkes_module_init_fn_t)(ps_io_ops_t *io_ops); 17 18#define CAMKES_ENV_INIT_MODULE_DEFINE(name, init_func) \ 19 static_assert(init_func != NULL, "Supplied init_func is NULL!"); \ 20 USED SECTION("_env_init") camkes_module_init_fn_t name = init_func; 21 22#define CAMKES_PRE_INIT_MODULE_DEFINE(name, init_func) \ 23 static_assert(init_func != NULL, "Supplied init_func is NULL!"); \ 24 USED SECTION("_pre_init") camkes_module_init_fn_t name = init_func; 25 26#define CAMKES_POST_INIT_MODULE_DEFINE(name, init_func) \ 27 static_assert(init_func != NULL, "Supplied init_func is NULL!"); \ 28 USED SECTION("_post_init") camkes_module_init_fn_t name = init_func; 29 30 31/* Function for registering notification event handlers under a certain badge value */ 32int single_threaded_component_register_handler(seL4_Word badge, const char* name, void (*callback_handler)(seL4_Word, void *), void * cookie); 33 34