UbixOS  2.0
sysproto.h
Go to the documentation of this file.
1 /*-
2  * Copyright (c) 2002-2018 The UbixOS Project.
3  * All rights reserved.
4  *
5  * This was developed by Christopher W. Olsen for the UbixOS Project.
6  *
7  * Redistribution and use in source and binary forms, with or without modification, are permitted
8  * provided that the following conditions are met:
9  *
10  * 1) Redistributions of source code must retain the above copyright notice, this list of
11  * conditions, the following disclaimer and the list of authors.
12  * 2) Redistributions in binary form must reproduce the above copyright notice, this list of
13  * conditions, the following disclaimer and the list of authors in the documentation and/or
14  * other materials provided with the distribution.
15  * 3) Neither the name of the UbixOS Project nor the names of its contributors may be used to
16  * endorse or promote products derived from this software without specific prior written
17  * permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
20  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
22  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
24  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef _SYS_SYSPROTO_H
30 #define _SYS_SYSPROTO_H
31 
32 #include <sys/thread.h>
33 
34 typedef int register_t;
35 
36 #define PAD_(t) (sizeof(register_t) <= sizeof(t) ? 0 : sizeof(register_t) - sizeof(t))
37 
38 #if BYTE_ORDER == LITTLE_ENDIAN
39 #define PADL_(t) 0
40 #define PADR_(t) PAD_(t)
41 #else
42 #define PADL_(t) PAD_(t)
43 #define PADR_(t) 0
44 #endif
45 
46 //Protos
48  char name_l_[PADL_(char *)];
49  char *name;
50  char name_r_[PADR_(char *)];
51 };
52 
54  char name_l_[PADL_(char *)];
55  char *name;
56  char name_r_[PADR_(char *)];
57 };
58 
60  char name_l_[PADL_(char *)];
61  char *name;
62  char name_r_[PADR_(char *)];
63  char msg_l_[PADL_(const void *)];
64  const void * msg;
65  char msg_r_[PADR_(const void *)];
66 };
67 
69  char name_l_[PADL_(char *)];
70  char *name;
71  char name_r_[PADR_(char *)];
75  char msg_l_[PADL_(const void *)];
76  const void *msg;
77  char msg_r_[PADR_(const void *)];
78 };
79 
80 struct sys_sde_args {
87 };
88 
89 
90 //Func Defs
91 int sys_invalid(struct thread *, void *);
92 int sys_mpiCreateMbox(struct thread *, struct sys_mpiCreateMbox_args *);
93 int sys_mpiDestroyMbox(struct thread *, struct sys_mpiDestroyMbox_args *);
95 int sys_mpiPostMessage(struct thread *, struct sys_mpiPostMessage_args *);
96 
97 #endif
register_t
int register_t
Definition: sysproto.h:34
PADL_
#define PADL_(t)
Definition: sysproto.h:39
sys_mpiFetchMessage_args::msg_r_
char msg_r_[(sizeof(register_t)<=sizeof(const void *) ? 0 :sizeof(register_t) - sizeof(const void *))]
Definition: sysproto.h:65
sys_mpiCreateMbox_args::name
char * name
Definition: sysproto.h:49
sys_mpiPostMessage_args::type
uint32_t type
Definition: sysproto.h:73
sys_sde_args::cmd_l_
char cmd_l_[0]
Definition: sysproto.h:81
sys_sde_args::cmd
uint32_t cmd
Definition: sysproto.h:82
sys_mpiPostMessage_args::type_l_
char type_l_[0]
Definition: sysproto.h:72
sys_sde_args::cmd_r_
char cmd_r_[(sizeof(register_t)<=sizeof(uint32_t) ? 0 :sizeof(register_t) - sizeof(uint32_t))]
Definition: sysproto.h:83
thread
Definition: thread.h:40
sys_mpiPostMessage_args::type_r_
char type_r_[(sizeof(register_t)<=sizeof(uint32_t) ? 0 :sizeof(register_t) - sizeof(uint32_t))]
Definition: sysproto.h:74
sys_mpiFetchMessage_args::name
char * name
Definition: sysproto.h:61
sys_mpiPostMessage_args::name
char * name
Definition: sysproto.h:70
sys_mpiDestroyMbox_args::name_l_
char name_l_[0]
Definition: sysproto.h:54
sys_mpiCreateMbox_args
Definition: sysproto.h:47
sys_invalid
int sys_invalid(struct thread *, void *)
Definition: gen_calls.c:141
sys_mpiPostMessage_args::msg_l_
char msg_l_[0]
Definition: sysproto.h:75
sys_sde_args::ptr
uint32_t ptr
Definition: sysproto.h:85
sys_mpiDestroyMbox_args::name_r_
char name_r_[(sizeof(register_t)<=sizeof(char *) ? 0 :sizeof(register_t) - sizeof(char *))]
Definition: sysproto.h:56
sys_mpiDestroyMbox
int sys_mpiDestroyMbox(struct thread *, struct sys_mpiDestroyMbox_args *)
Definition: mpi_syscalls.c:9
sys_mpiFetchMessage_args::name_r_
char name_r_[(sizeof(register_t)<=sizeof(char *) ? 0 :sizeof(register_t) - sizeof(char *))]
Definition: sysproto.h:62
sys_mpiPostMessage_args::name_l_
char name_l_[0]
Definition: sysproto.h:69
sys_mpiCreateMbox
int sys_mpiCreateMbox(struct thread *, struct sys_mpiCreateMbox_args *)
Definition: mpi_syscalls.c:4
sys_sde_args::ptr_l_
char ptr_l_[0]
Definition: sysproto.h:84
sys_mpiPostMessage_args::msg_r_
char msg_r_[(sizeof(register_t)<=sizeof(const void *) ? 0 :sizeof(register_t) - sizeof(const void *))]
Definition: sysproto.h:77
sys_mpiCreateMbox_args::name_r_
char name_r_[(sizeof(register_t)<=sizeof(char *) ? 0 :sizeof(register_t) - sizeof(char *))]
Definition: sysproto.h:50
uint32_t
__uint32_t uint32_t
Definition: types.h:46
sys_mpiDestroyMbox_args::name
char * name
Definition: sysproto.h:55
sys_mpiFetchMessage
int sys_mpiFetchMessage(struct thread *, struct sys_mpiFetchMessage_args *)
Definition: mpi_syscalls.c:14
sys_sde_args::ptr_r_
char ptr_r_[(sizeof(register_t)<=sizeof(uint32_t) ? 0 :sizeof(register_t) - sizeof(uint32_t))]
Definition: sysproto.h:86
PADR_
#define PADR_(t)
Definition: sysproto.h:40
sys_mpiDestroyMbox_args
Definition: sysproto.h:53
sys_mpiPostMessage_args::msg
const void * msg
Definition: sysproto.h:76
sys_mpiCreateMbox_args::name_l_
char name_l_[0]
Definition: sysproto.h:48
sys_mpiFetchMessage_args::name_l_
char name_l_[0]
Definition: sysproto.h:60
sys_mpiPostMessage_args
Definition: sysproto.h:68
sys_mpiFetchMessage_args::msg_l_
char msg_l_[0]
Definition: sysproto.h:63
sys_sde_args
Definition: sysproto.h:80
sys_mpiPostMessage_args::name_r_
char name_r_[(sizeof(register_t)<=sizeof(char *) ? 0 :sizeof(register_t) - sizeof(char *))]
Definition: sysproto.h:71
thread.h
sys_mpiFetchMessage_args::msg
const void * msg
Definition: sysproto.h:64
sys_mpiPostMessage
int sys_mpiPostMessage(struct thread *, struct sys_mpiPostMessage_args *)
Definition: mpi_syscalls.c:19
sys_mpiFetchMessage_args
Definition: sysproto.h:59