source: rtems/cpukit/itron/src/snd_mbx.c @ ebbe119e

4.104.114.84.95
Last change on this file since ebbe119e was ebbe119e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/01/04 at 10:14:23

2004-04-01 Ralf Corsepius <ralf_corsepius@…>

  • libblock/include/rtems/bdbuf.h: Include <rtems/chain.h> instead of <chain.h>.
  • libblock/include/rtems/ide_part_table.h: Include <rtems/chain.h> instead of <chain.h>.
  • libcsupport/src/malloc.c: Include <rtems/chain.h> instead of <chain.h>.
  • libcsupport/src/mount.c: Include <rtems/chain.h> instead of <chain.h>.
  • libcsupport/src/unmount.c: Include <rtems/chain.h> instead of <chain.h>.
  • libfs/src/imfs/imfs.h: Include <rtems/chain.h> instead of <chain.h>.
  • libfs/src/imfs/imfs_directory.c: Include <rtems/chain.h> instead of <chain.h>.
  • libfs/src/imfs/imfs_load_tar.c: Include <rtems/chain.h> instead of <chain.h>.
  • sapi/include/confdefs.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
  • sapi/include/confdefs.h: Include <rtems/console.h> instead of <console.h>.
  • libfs/src/imfs/imfs_load_tar.c: Include <rtems/imfs.h> instead of <imfs.h>.
  • libmisc/shell/cmds.c: Include <rtems/imfs.h> instead of <imfs.h>.
  • libmisc/fsmount/fsmount.c: Include <rtems/imfs.h> instead of <imfs.h>.
  • sapi/include/confdefs.h: Include <rtems/imfs.h> instead of <imfs.h>.
  • itron/src/can_wup.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/chg_pri.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/cre_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/cre_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/cre_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/cre_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/del_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/del_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/del_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/del_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/dis_dsp.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ena_dsp.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/eventflags.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/exd_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ext_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/fmempool.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/frsm_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/get_tid.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/itronintr.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/itronsem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/itrontime.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/mbox.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/mboxtranslatereturncode.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/msgbuffer.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/msgbuffertranslatereturncode.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/network.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/port.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/prcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/prcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/preq_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/psnd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/rcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/rcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ref_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ref_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ref_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ref_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/rel_wai.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/rot_rdq.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/rsm_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/sig_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/slp_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/snd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/snd_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/sta_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/sus_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/sysmgmt.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/task.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/ter_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/trcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/trcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/tslp_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/tsnd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/twai_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/vmempool.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/wai_sem.c: Include <rtems/itron.h> instead of <itron.h>.
  • itron/src/wup_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
  • sapi/include/rtems/config.h: Include <rtems/itron.h> instead of <itron.h>.
  • sapi/include/confdefs.h: Include <rtems/itron.h> instead of <itron.h>.
  • sapi/src/itronapi.c: Include <rtems/itron.h> instead of <itron.h>.
  • sapi/include/confdefs.h: Include <rtems/rtc.h> instead of <rtc.h>.
  • sapi/include/confdefs.h: Include <rtems/timerdrv.h> instead of <timerdrv.h>.
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/*
2 *  ITRON 3.0 Mailbox Manager
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/itron.h>
19
20#include <rtems/itron/mbox.h>
21#include <rtems/itron/task.h>
22
23/*
24 *  snd_msg - Send Message to Mailbox
25 */
26
27ER snd_msg(
28  ID     mbxid,
29  T_MSG *pk_msg
30)
31{
32  register ITRON_Mailbox_Control *the_mailbox;
33  Objects_Locations                location;
34  uint32_t                         message_priority;
35  void                            *message_contents;
36  CORE_message_queue_Status        msg_status;
37
38  if ( !pk_msg )
39    return E_PAR;
40
41  the_mailbox = _ITRON_Mailbox_Get( mbxid, &location );
42  switch ( location ) {
43    case OBJECTS_REMOTE:
44    case OBJECTS_ERROR:
45      return _ITRON_Mailbox_Clarify_get_id_error( mbxid );
46
47    case OBJECTS_LOCAL:
48      if ( the_mailbox->do_message_priority )
49        message_priority = pk_msg->msgpri;
50      else
51        message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST;
52
53      message_contents = pk_msg;
54      msg_status = _CORE_message_queue_Submit(
55        &the_mailbox->message_queue,
56        &message_contents,
57        sizeof(T_MSG *),
58        the_mailbox->Object.id,
59        NULL,          /* multiprocessing not supported */
60        message_priority,
61        FALSE,     /* do not allow sender to block */
62        0          /* no timeout */
63     );
64     break;
65  }
66
67  _ITRON_return_errorno(
68     _ITRON_Mailbox_Translate_core_message_queue_return_code( msg_status )
69  );
70}
Note: See TracBrowser for help on using the repository browser.