4.104.115
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 | * COPYRIGHT (c) 1989-2008. |
---|
15 | * On-Line Applications Research Corporation (OAR). |
---|
16 | * |
---|
17 | * The license and distribution terms for this file may be |
---|
18 | * found in the file LICENSE in this distribution or at |
---|
19 | * http://www.rtems.com/license/LICENSE. |
---|
20 | * |
---|
21 | * $Id$ |
---|
22 | */ |
---|
23 | |
---|
24 | #if HAVE_CONFIG_H |
---|
25 | #include "config.h" |
---|
26 | #endif |
---|
27 | |
---|
28 | #include <stdarg.h> |
---|
29 | |
---|
30 | #include <pthread.h> |
---|
31 | #include <limits.h> |
---|
32 | #include <errno.h> |
---|
33 | #include <fcntl.h> |
---|
34 | #include <mqueue.h> |
---|
35 | |
---|
36 | #include <rtems/system.h> |
---|
37 | #include <rtems/score/watchdog.h> |
---|
38 | #include <rtems/seterr.h> |
---|
39 | #include <rtems/posix/mqueue.h> |
---|
40 | #include <rtems/posix/time.h> |
---|
41 | |
---|
42 | /*PAGE |
---|
43 | * |
---|
44 | * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277 |
---|
45 | * |
---|
46 | * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend(). |
---|
47 | */ |
---|
48 | |
---|
49 | int mq_send( |
---|
50 | mqd_t mqdes, |
---|
51 | const char *msg_ptr, |
---|
52 | size_t msg_len, |
---|
53 | unsigned int msg_prio |
---|
54 | ) |
---|
55 | { |
---|
56 | return _POSIX_Message_queue_Send_support( |
---|
57 | mqdes, |
---|
58 | msg_ptr, |
---|
59 | msg_len, |
---|
60 | msg_prio, |
---|
61 | true, |
---|
62 | THREAD_QUEUE_WAIT_FOREVER |
---|
63 | ); |
---|
64 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.