Samsung Internal API reference  2.0
mqueue.h
Go to the documentation of this file.
1 
9 #ifndef __MQUEUE_H__
10 #define __MQUEUE_H__
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #include <fcntl.h>
17 #include <stdint.h>
18 #include <sys/types.h>
19 #include <driver/mq/mq.h>
20 
23 #define MQ_MAX_NAME 1024
24 
28 typedef int mqd_t;
29 
37 extern mqd_t mq_open(const char *pathname, int flags, ...);
38 
45 extern int mq_unlink(const char *pathname);
46 
53 extern int mq_close(mqd_t fd);
54 
64 extern int mq_send(mqd_t fd,
65  const char *msg_ptr,
66  size_t msg_len,
67  unsigned msg_prio);
68 
78 extern ssize_t mq_receive(mqd_t fd,
79  char *msg_ptr,
80  size_t msg_len,
81  unsigned *msg_prio);
82 
83 #ifdef __cplusplus
84 }
85 #endif
86 
87 #endif /* !__MQUEUE_H__ */
88 
mqd_t mq_open(const char *pathname, int flags,...)
Create new message queue or open an existing queue.
int mq_close(mqd_t fd)
Close a message queue descriptor.
Wrapper for kernel types.h header.
Fcntl declarations.
int mq_send(mqd_t fd, const char *msg_ptr, size_t msg_len, unsigned msg_prio)
Send a message to a message queue.
int mqd_t
Definition: mqueue.h:28
int mq_unlink(const char *pathname)
Remove specified message queue name.
ssize_t mq_receive(mqd_t fd, char *msg_ptr, size_t msg_len, unsigned *msg_prio)
Receive a message from a message queue.
intptr_t ssize_t
Definition: types.h:17