1/*
2 * Copyright 2016, 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(D61_BSD)
11 */
12
13#ifndef _TIMESERV_DATASPACE_SYSCALL_DISPATCHER_H_
14#define _TIMESERV_DATASPACE_SYSCALL_DISPATCHER_H_
15
16#include "../../state.h"
17#include "../dispatch.h"
18#include <refos-rpc/data_server.h>
19#include <refos-util/serv_connect.h>
20
21 /*! @file
22     @brief Common dataspace interface functions. */
23
24int rpc_sv_data_dispatcher(void *rpc_userptr, uint32_t label);
25
26/*! @brief Check whether the given recieved message is a data syscall.
27    @param m Struct containing info about the recieved message.
28    @param userptr Output user pointer. Pass this into the generated dispatcher function.
29    @return DISPATCH_SUCCESS if message is a dataspace syscall, DISPATCH_PASS otherwise.
30*/
31int check_dispatch_data(srv_msg_t *m, void **userptr);
32
33#endif /* _TIMESERV_DATASPACE_SYSCALL_DISPATCHER_H_ */
34