UbixOS V2  2.0
message.c
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 #include <mpi/mpi.h>
30 
31 void sysMpiCreateMbox(uInt32 *status, char *name) {
32  if (status && name)
33  *status = mpi_createMbox(name);
34  return;
35 }
36 
37 void sysMpiDestroyMbox(uInt32 *status, char *name) {
38  if (status && name)
39  *status = mpi_destroyMbox(name);
40  return;
41 }
42 
43 void sysMpiPostMessage(char *name, uInt32 *type, mpi_message_t *data) {
44  if (type && name && data)
45  *type = mpi_postMessage(name, *type, data);
46  return;
47 }
48 
49 void sysMpiFetchMessage(char *name, mpi_message_t *msg, uInt32 *status) {
50  if (status && name && msg)
51  *status = mpi_fetchMessage(name, msg);
52  return;
53 }
54 
55 void sysMpiSpam(uInt32 type, void *data, uInt32 *status) {
56  if (status && data)
57  *status = mpi_spam(type, data);
58  return;
59 }
60 
61 /***
62  $Log: message.c,v $
63  Revision 1.1.1.1 2006/06/01 12:46:16 reddawg
64  ubix2
65 
66  Revision 1.2 2005/10/12 00:13:37 reddawg
67  Removed
68 
69  Revision 1.1.1.1 2005/09/26 17:24:14 reddawg
70  no message
71 
72  Revision 1.12 2004/08/14 11:23:02 reddawg
73  Changes
74 
75  Revision 1.11 2004/07/28 17:07:25 reddawg
76  MPI: moved the syscalls
77 
78  END
79  ***/
80 
mpi_fetchMessage
int mpi_fetchMessage(char *, mpi_message_t *)
Definition: system.c:187
mpi_postMessage
int mpi_postMessage(char *, uInt32, mpi_message_t *)
uInt32
unsigned long int uInt32
Definition: objgfx30.h:49
sysMpiPostMessage
void sysMpiPostMessage(char *name, uInt32 *type, mpi_message_t *data)
Definition: message.c:43
sysMpiCreateMbox
void sysMpiCreateMbox(uInt32 *status, char *name)
Definition: message.c:31
sysMpiSpam
void sysMpiSpam(uInt32 type, void *data, uInt32 *status)
Definition: message.c:55
mpi.h
name
const char * name
Definition: pci.c:37
mpi_destroyMbox
int mpi_destroyMbox(char *)
Definition: system.c:231
mpi_spam
int mpi_spam(uInt32, void *)
Definition: system.c:107
mpi_message
Definition: mpi.h:37
sysMpiDestroyMbox
void sysMpiDestroyMbox(uInt32 *status, char *name)
Definition: message.c:37
sysMpiFetchMessage
void sysMpiFetchMessage(char *name, mpi_message_t *msg, uInt32 *status)
Definition: message.c:49
mpi_createMbox
int mpi_createMbox(char *)
Definition: system.c:68