source: rtems/cpukit/posix/src/mqueuetimedreceive.c @ 412dbff6

4.104.114.84.95
Last change on this file since 412dbff6 was 412dbff6, checked in by Joel Sherrill <joel.sherrill@…>, on 04/05/07 at 21:17:27

2007-04-05 Joel Sherrill <joel@…>

  • posix/Makefile.am, posix/include/rtems/posix/time.h, posix/src/adjtime.c, posix/src/alarm.c, posix/src/clockgetres.c, posix/src/condtimedwait.c, posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c, posix/src/mutextimedlock.c, posix/src/nanosleep.c, posix/src/posixtimespecabsolutetimeout.c, posix/src/pthread.c, posix/src/pthreadcreate.c, posix/src/pthreadsetschedparam.c, posix/src/ptimer1.c, posix/src/sched.c, posix/src/semtimedwait.c, posix/src/sigtimedwait.c, posix/src/ualarm.c, rtems/src/clocktodtoseconds.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/tod.h, score/inline/rtems/score/tod.inl, score/src/coretod.c, score/src/coretodget.c, score/src/coretodgetuptime.c, score/src/coretodset.c, score/src/coretodtickle.c: Provide timespec manipulation routines in the SuperCore?. Use them everywhere possible. This lead to significant cleanup in the API routines and eliminated some of the same code from the POSIX API. At this point, the SuperCore? keeps time in POSIX timespec format properly from 1970. You just cannot set it before 1988 in keeping with RTEMS traditional behavior.
  • score/include/rtems/score/timespec.h, score/src/timespecaddto.c, score/src/timespecfromticks.c, score/src/timespecisvalid.c, score/src/timespeclessthan.c, score/src/timespecsubtract.c, score/src/timespectoticks.c: New files.
  • posix/src/posixintervaltotimespec.c, posix/src/posixtimespecsubtract.c, posix/src/posixtimespectointerval.c: Removed.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 *  NOTE:  The structure of the routines is identical to that of POSIX
3 *         Message_queues to leave the option of having unnamed message
4 *         queues at a future date.  They are currently not part of the
5 *         POSIX standard but unnamed message_queues are.  This is also
6 *         the reason for the apparently unnecessary tracking of
7 *         the process_shared attribute.  [In addition to the fact that
8 *         it would be trivial to add pshared to the mq_attr structure
9 *         and have process private message queues.]
10 *
11 *         This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
12 *         time.
13 */
14
15/*
16 *  COPYRIGHT (c) 1989-2007.
17 *  On-Line Applications Research Corporation (OAR).
18 *
19 *  The license and distribution terms for this file may be
20 *  found in the file LICENSE in this distribution or at
21 *  http://www.rtems.com/license/LICENSE.
22 *
23 *  $Id$
24 */
25
26#if HAVE_CONFIG_H
27#include "config.h"
28#endif
29
30#include <stdarg.h>
31
32#include <pthread.h>
33#include <limits.h>
34#include <errno.h>
35#include <fcntl.h>
36#include <mqueue.h>
37
38#include <rtems/system.h>
39#include <rtems/score/watchdog.h>
40#include <rtems/seterr.h>
41#include <rtems/posix/mqueue.h>
42#include <rtems/posix/time.h>
43
44/*PAGE
45 *
46 *  15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
47 *
48 *  NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
49 */
50
51ssize_t mq_timedreceive(
52  mqd_t                  mqdes,
53  char                  *msg_ptr,
54  size_t                 msg_len,
55  unsigned int          *msg_prio,
56  const struct timespec *timeout
57)
58{
59  return _POSIX_Message_queue_Receive_support(
60    mqdes,
61    msg_ptr,
62    msg_len,
63    msg_prio,
64    _Timespec_To_ticks( timeout )
65  );
66}
Note: See TracBrowser for help on using the repository browser.