source: rtems/cpukit/posix/src/mqueuetimedreceive.c @ 1d572eba

5
Last change on this file since 1d572eba 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.6 KB
Line 
1/**
2 * @file
3 *
4 * @brief Receive Message from Message Queue
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
22/*
23 *  COPYRIGHT (c) 1989-2008.
24 *  On-Line Applications Research Corporation (OAR).
25 *
26 *  The license and distribution terms for this file may be
27 *  found in the file LICENSE in this distribution or at
28 *  http://www.rtems.org/license/LICENSE.
29 */
30
31#if HAVE_CONFIG_H
32#include "config.h"
33#endif
34
35#include <rtems/posix/mqueueimpl.h>
36
37/*
38 *  15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
39 *
40 *  NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
41 */
42
43ssize_t mq_timedreceive(
44  mqd_t                  mqdes,
45  char                  *__restrict msg_ptr,
46  size_t                 msg_len,
47  unsigned int          *__restrict msg_prio,
48  const struct timespec *__restrict abstime
49)
50{
51  return _POSIX_Message_queue_Receive_support(
52    mqdes,
53    msg_ptr,
54    msg_len,
55    msg_prio,
56    abstime,
57    _Thread_queue_Add_timeout_realtime_timespec
58  );
59}
Note: See TracBrowser for help on using the repository browser.