????4????????????API

struct _pulse {
uint16_t type;
uint16_t subtype;
int8_t code;
uint8_t zero [3];
union sigval value;
int32_t scoid;
};

????value???????????

union sigval {
int sival_int;
void *sival_ptr;
};
int MsgReceivePulse (int chid??
void *rmsg??
int rbytes??
struct _msg_info *info);

?????塢?????

????1??????????API

asyncmsg_channel_create()
asyncmsg_channel_destroy()
asyncmsg_connect_attach()
asyncmsg_connect_detach()
asyncmsg_flush()
asyncmsg_put()??
asyncmsg_get()
asyncmsg_free()
asyncmsg_malloc()

????2??API???

int asyncmsg_channel_create (
unsigned flags??
mode_t mode??
size_t buffer_size??
unsigned max_num_buffer??
const struct sigevent *ev??
int (*recvbuf_callback) (
size_t bufsize??
unsigned num_bufs??
void *bufs[]??
int flags??
void *handle )??
void *recvbuf_callback_handle );

????Flags:???????????????????_NTO_CHF_ASYNC?????????_NTO_CHF_ASYNC_NONBLOCK

????????????????asyncmsg_get()??????????????????????????????

????Mode:???????????

????Buff_size:????????????????С

????Max_num_buffer:?????????????????????

????Ev:NULL??????????sigevent????????????????????????????????????????????????????????

????Recvbuf_callback:NULL?????????????????????????????????NULL?????Malloc

????recvbuf_callback_handle???????Recvbuf_callback??????

?????????

??????Recvbuf_callback???NULL?????

??????????????asyncmsg_get()?????????λ??????(flags?????ASYNCMSG_RECVBUF_ALLOC??bufs??????...)???????????????????????1??????0????

???????? asyncmsg_channel_destroy()??????????????????????????????flags?????ASYNCMSG_RECVBUF_FREE??

????int asyncmsg_channel_destroy( int chid );

????chid ?????ID

???????:

??????Recvbuf_callback???NULL???????ε?????????????????free??

?????????:

???????:EOK

???????:-1 ->errno

int asyncmsg_connect_attach (
uint32_t nd??
pid_t pid??
int chid??
unsigned index??
unsigned flags??
const struct _asyncmsg_connection_attr * attr);

???????????:

????Nd/pid/chid:???????/????ID/???ID

????index?????????????ID(????)

????Flags:

????_NTO_COF_NOSHARE:??ó???????????BUFFER?????????asyncmsg_malloc()????????????asyncmsg_put()????????

????_NTO_COF_NONBLOCK:????????????????????????????