base/ipc/mbx/mbx.c File Reference


Detailed Description

Mailbox functions.

Author:
Paolo Mantegazza
Note:
Copyright (C) 1999-2006 Paolo Mantegazza <mantegazza@aero.polimi.it>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file mbx.c.

Include dependency graph for mbx.c:

Go to the source code of this file.

Defines

#define _mbx_signal(mbx, blckdon)
#define MOD_SIZE(indx)   ((indx) < mbx->size ? (indx) : (indx) - mbx->size)
#define CHK_MBX_MAGIC   do { if (!mbx || mbx->magic != RT_MBX_MAGIC) return (CONFIG_RTAI_USE_NEWERR ? RTE_OBJINV : -EINVAL); } while (0)
#define MBX_RET(msg_size, retval)   (CONFIG_RTAI_USE_NEWERR ? retval : msg_size)

Functions

 MODULE_LICENSE ("GPL")
static void mbx_delete_signal (MBX *mbx)
static void mbx_signal (MBX *mbx)
static int mbx_wait (MBX *mbx, int *fravbs, RT_TASK *rt_current)
static int mbx_wait_until (MBX *mbx, int *fravbs, RTIME time, RT_TASK *rt_current)
static int mbxput (MBX *mbx, char **msg, int msg_size, int space)
static int mbxovrwrput (MBX *mbx, char **msg, int msg_size, int space)
static int mbxget (MBX *mbx, char **msg, int msg_size, int space)
static int mbxevdrp (MBX *mbx, char **msg, int msg_size, int space)
RTAI_SYSCALL_MODE int _rt_mbx_evdrp (MBX *mbx, void *msg, int msg_size, int space)
 Receives bytes as many as possible leaving the message available for another receive.
RTAI_SYSCALL_MODE int rt_typed_mbx_init (MBX *mbx, int size, int type)
 Initializes a fully typed mailbox queueing tasks according to the specified type.
int rt_mbx_init (MBX *mbx, int size)
 Initializes a mailbox.
RTAI_SYSCALL_MODE int rt_mbx_delete (MBX *mbx)
 Deletes a mailbox.
RTAI_SYSCALL_MODE int _rt_mbx_send (MBX *mbx, void *msg, int msg_size, int space)
 Sends a message unconditionally.
RTAI_SYSCALL_MODE int _rt_mbx_send_wp (MBX *mbx, void *msg, int msg_size, int space)
 Sends as many bytes as possible without blocking the calling task.
RTAI_SYSCALL_MODE int _rt_mbx_send_if (MBX *mbx, void *msg, int msg_size, int space)
 Sends a message, only if the whole message can be passed without blocking the calling task.
RTAI_SYSCALL_MODE int _rt_mbx_send_until (MBX *mbx, void *msg, int msg_size, RTIME time, int space)
 Sends a message with absolute timeout.
RTAI_SYSCALL_MODE int _rt_mbx_send_timed (MBX *mbx, void *msg, int msg_size, RTIME delay, int space)
 Sends a message with relative timeout.
RTAI_SYSCALL_MODE int _rt_mbx_receive (MBX *mbx, void *msg, int msg_size, int space)
 Receives a message unconditionally.
RTAI_SYSCALL_MODE int _rt_mbx_receive_wp (MBX *mbx, void *msg, int msg_size, int space)
 Receives bytes as many as possible, without blocking the calling task.
RTAI_SYSCALL_MODE int _rt_mbx_receive_if (MBX *mbx, void *msg, int msg_size, int space)
 Receives a message only if the whole message can be passed without blocking the calling task.
RTAI_SYSCALL_MODE int _rt_mbx_receive_until (MBX *mbx, void *msg, int msg_size, RTIME time, int space)
 Receives a message with absolute timeout.
RTAI_SYSCALL_MODE int _rt_mbx_receive_timed (MBX *mbx, void *msg, int msg_size, RTIME delay, int space)
 Receives a message with relative timeout.
RTAI_SYSCALL_MODE int _rt_mbx_ovrwr_send (MBX *mbx, void *msg, int msg_size, int space)
 Sends a message overwriting what already in the buffer if there is no place for the message.
RTAI_SYSCALL_MODE MBX_rt_typed_named_mbx_init (unsigned long mbx_name, int size, int qtype)
 Initializes a specifically typed (fifo queued, priority queued or resource queued) mailbox identified by a name.
RTAI_SYSCALL_MODE int rt_named_mbx_delete (MBX *mbx)
 Deletes a named mailbox.
int set_rt_fun_entries (struct rt_native_fun_entry *entry)
void reset_rt_fun_entries (struct rt_native_fun_entry *entry)
static int recv_blocks (void *mbx)
static int send_blocks (void *mbx)
int __rtai_mbx_init (void)
void __rtai_mbx_exit (void)
 module_init (__rtai_mbx_init)
 module_exit (__rtai_mbx_exit)
 EXPORT_SYMBOL (_rt_mbx_evdrp)
 EXPORT_SYMBOL (rt_typed_mbx_init)
 EXPORT_SYMBOL (rt_mbx_init)
 EXPORT_SYMBOL (rt_mbx_delete)
 EXPORT_SYMBOL (_rt_mbx_send)
 EXPORT_SYMBOL (_rt_mbx_send_wp)
 EXPORT_SYMBOL (_rt_mbx_send_if)
 EXPORT_SYMBOL (_rt_mbx_send_until)
 EXPORT_SYMBOL (_rt_mbx_send_timed)
 EXPORT_SYMBOL (_rt_mbx_receive)
 EXPORT_SYMBOL (_rt_mbx_receive_wp)
 EXPORT_SYMBOL (_rt_mbx_receive_if)
 EXPORT_SYMBOL (_rt_mbx_receive_until)
 EXPORT_SYMBOL (_rt_mbx_receive_timed)
 EXPORT_SYMBOL (_rt_mbx_ovrwr_send)
 EXPORT_SYMBOL (_rt_typed_named_mbx_init)
 EXPORT_SYMBOL (rt_named_mbx_delete)

Variables

rt_native_fun_entry rt_mbx_entries []


Function Documentation

EXPORT_SYMBOL ( rt_named_mbx_delete   ) 

EXPORT_SYMBOL ( _rt_typed_named_mbx_init   ) 

EXPORT_SYMBOL ( _rt_mbx_ovrwr_send   ) 

EXPORT_SYMBOL ( _rt_mbx_receive_timed   ) 

EXPORT_SYMBOL ( _rt_mbx_receive_until   ) 

EXPORT_SYMBOL ( _rt_mbx_receive_if   ) 

EXPORT_SYMBOL ( _rt_mbx_receive_wp   ) 

EXPORT_SYMBOL ( _rt_mbx_receive   ) 

EXPORT_SYMBOL ( _rt_mbx_send_timed   ) 

EXPORT_SYMBOL ( _rt_mbx_send_until   ) 

EXPORT_SYMBOL ( _rt_mbx_send_if   ) 

EXPORT_SYMBOL ( _rt_mbx_send_wp   ) 

EXPORT_SYMBOL ( _rt_mbx_send   ) 

EXPORT_SYMBOL ( rt_mbx_delete   ) 

EXPORT_SYMBOL ( rt_mbx_init   ) 

EXPORT_SYMBOL ( rt_typed_mbx_init   ) 

EXPORT_SYMBOL ( _rt_mbx_evdrp   ) 

module_exit ( __rtai_mbx_exit   ) 

module_init ( __rtai_mbx_init   ) 


Generated on Tue Feb 2 17:47:32 2010 for RTAI API by  doxygen 1.4.7