libtools
Main Page
Modules
Classes
Files
File List
File Members
tools
mailbox.h
Go to the documentation of this file.
1
20
#ifndef __TOOLS_MAILBOX_H
21
#define __TOOLS_MAILBOX_H
22
30
typedef
struct
mailbox *
mailbox_t
;
31
41
mailbox_t
mailbox_alloc
(
mailbox_t
*mb,
unsigned
len)
42
__attribute__((warn_unused_result));
43
50
void
mailbox_destroy
(
mailbox_t
mb);
51
61
int
mailbox_post
(
mailbox_t
mb,
void
*data);
71
int
mailbox_wait
(
mailbox_t
mb,
void
**data);
72
84
int
mailbox_timedwait
(
mailbox_t
mb,
void
**data,
unsigned
timeout);
85
88
#endif
/* __TOOLS_MAILBOX_H */
mailbox_t
struct mailbox * mailbox_t
mailbox handle
Definition:
mailbox.h:30
mailbox_destroy
void mailbox_destroy(mailbox_t mb)
destroy mailbox
mailbox_alloc
mailbox_t mailbox_alloc(mailbox_t *mb, unsigned len) __attribute__((warn_unused_result))
allocate new mailbox
mailbox_timedwait
int mailbox_timedwait(mailbox_t mb, void **data, unsigned timeout)
retrive message from mailbox with or wait for message
mailbox_wait
int mailbox_wait(mailbox_t mb, void **data)
retrive message from mailbox
mailbox_post
int mailbox_post(mailbox_t mb, void *data)
post message into mailbox
Generated by
1.8.11