C Microkernel Realtime eXecutive
Realtime Operating System for Cortex-M based microcontrollers
 
Loading...
Searching...
No Matches
rpc.h
1
6#pragma once
7
8#include <stdint.h>
9#include <stdbool.h>
10#include <cmrx/defines.h>
11
13#define E_VTABLE_UNKNOWN 0xFF
14
15struct RPC_Service_t_;
16
18
34typedef int (*RPC_Method_t)(RPC_Service_t * service, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long zarg3);
35
43
57
65
75bool rpc_stack_push(Process_t process_id);
76
82int rpc_stack_pop();
83
91
100int os_rpc_call(unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3);
101
107int os_rpc_return(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3);
108
uint8_t Process_t
Data type used for process IDs.
Definition defines.h:75
int os_rpc_return(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3)
Kernel implementation of rpc_return syscall.
Definition rpc.c:109
int os_rpc_call(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3)
Kernel implementation of rpc_call syscall.
bool rpc_stack_push(Process_t process_id)
Add new process ID to the stack of RPC calls.
Definition rpc.c:35
Process_t rpc_stack_top()
Retrieve the topmost process ID in thread's RPC call stack.
Definition rpc.c:63
int(* RPC_Method_t)(RPC_Service_t *service, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long zarg3)
Calling signature of a RPC call.
Definition rpc.h:34
Process_t get_vtable_process(VTable_t vtable)
Identify process which owns the VTable.
Definition rpc.c:18
RPC_Method_t * VTable_t
Type definition of VTable.
Definition rpc.h:42
int rpc_stack_pop()
Remove the last entry in the RPC stack.
Definition rpc.c:49
Basic structure of any RPC object.
Definition rpc.h:51
VTable_t vtable
Address of the VTable which contains pointers to functions that implement this service.
Definition rpc.h:55