summaryrefslogtreecommitdiff
path: root/PACE/pace/win32/mqueue.h
blob: d6bf93be666ebb05d4fa0b37a38d4e15d1e1b049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* $Id$

 * ============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/posix/mqueue.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================ */

#ifndef PACE_MQUEUE_H
#define PACE_MQUEUE_H

#include <mqueue.h>

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

  PACE_INLINE int pace_mq_close (mqd_t mqdes);

  PACE_INLINE int pace_mq_getattr (mqd_t mqdes,
                                   struct mq_attr * mqstat);

  PACE_INLINE int pace_mq_notify (mqd_t mqdes,
                                  const struct sigevent * notification);

  # define pace_mq_open(X) mq_open X
  /* mqd_t mq_open (const char *name, int oflag, (*//* args *//*) ... );
   *
   * PLEASE PAY SPECIAL ATTENTION HERE!
   * This is a macro and requires an additional set of parenthesis
   * surrounding the arguments.
   */

  PACE_INLINE ssize_t pace_mq_receive (mqd_t mqdes,
                                       char * msg_ptr,
                                       size_t msg_len,
                                       unsigned int * nmsg_prio);

  PACE_INLINE int pace_mq_send (mqd_t mqdes,
                                const char * mst_ptr,
                                size_t msg_len,
                                unsigned int psg_prio);

  PACE_INLINE int pace_mq_setattr (mqd_t mqdes,
                                   const struct mq_attr * mqstat,
                                   struct mq_attr * omqstat);

  PACE_INLINE int pace_mq_unlink (const char * name);

#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */

#if defined (PACE_HAS_INLINE)
# include "pace/posix/mqueue.inl"
#endif /* PACE_HAS_INLINE */

#endif /* PACE_MQUEUE_H */