source: rtems/cpukit/posix/src/mqueuesend.c @ 49d4364

4.115
Last change on this file since 49d4364 was 49d4364, checked in by Sebastian Huber <sebastian.huber@…>, on 04/22/15 at 09:35:14

score: Delete bogus THREAD_QUEUE_WAIT_FOREVER

It makes no sense to use this indirection since the type for timeout
values is Watchdog_Interval.

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @brief Adds Message Pointed by msg_ptr to Message Queue Reffered by mqdes
5 * @ingroup POSIXAPI
6 */
7
8/*
9 *  NOTE:  The structure of the routines is identical to that of POSIX
10 *         Message_queues to leave the option of having unnamed message
11 *         queues at a future date.  They are currently not part of the
12 *         POSIX standard but unnamed message_queues are.  This is also
13 *         the reason for the apparently unnecessary tracking of
14 *         the process_shared attribute.  [In addition to the fact that
15 *         it would be trivial to add pshared to the mq_attr structure
16 *         and have process private message queues.]
17 *
18 *         This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
19 *         time.
20 *
21 *  COPYRIGHT (c) 1989-2008.
22 *  On-Line Applications Research Corporation (OAR).
23 *
24 *  The license and distribution terms for this file may be
25 *  found in the file LICENSE in this distribution or at
26 *  http://www.rtems.org/license/LICENSE.
27 */
28
29#if HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33#include <stdarg.h>
34
35#include <pthread.h>
36#include <limits.h>
37#include <errno.h>
38#include <fcntl.h>
39#include <mqueue.h>
40
41#include <rtems/system.h>
42#include <rtems/score/watchdog.h>
43#include <rtems/seterr.h>
44#include <rtems/posix/mqueueimpl.h>
45#include <rtems/posix/time.h>
46
47/*
48 *  15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
49 *
50 *  NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
51 */
52
53int mq_send(
54  mqd_t         mqdes,
55  const char   *msg_ptr,
56  size_t        msg_len,
57  unsigned int  msg_prio
58)
59{
60  return _POSIX_Message_queue_Send_support(
61    mqdes,
62    msg_ptr,
63    msg_len,
64    msg_prio,
65    true,
66    WATCHDOG_NO_TIMEOUT
67  );
68}
Note: See TracBrowser for help on using the repository browser.