source: rtems/cpukit/posix/src/mqueuesend.c @ c3105894

5
Last change on this file since c3105894 was c3105894, checked in by Sebastian Huber <sebastian.huber@…>, on 10/19/17 at 11:47:57

score: Move thread queue timeout handling

Update #3117.
Update #3182.

  • 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
46/*
47 *  15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
48 *
49 *  NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
50 */
51
52int mq_send(
53  mqd_t         mqdes,
54  const char   *msg_ptr,
55  size_t        msg_len,
56  unsigned int  msg_prio
57)
58{
59  return _POSIX_Message_queue_Send_support(
60    mqdes,
61    msg_ptr,
62    msg_len,
63    msg_prio,
64    NULL,
65    _Thread_queue_Enqueue_do_nothing_extra
66  );
67}
Note: See TracBrowser for help on using the repository browser.