mq_send(3) Library Functions Manual mq_send(3) mq_send, mq_timedsend - LIBRARY Real-time library (librt, -lrt) #include int mq_send(mqd_t mqdes, const char msg_ptr[.msg_len], size_t msg_len, unsigned int msg_prio); #include #include int mq_timedsend(mqd_t mqdes, const char msg_ptr[.msg_len], size_t msg_len, unsigned int msg_prio, const struct timespec *abs_timeout); glibc (. feature_test_macros(7)): mq_timedsend(): _POSIX_C_SOURCE >= 200112L mq_send() , msg_ptr, , mqdes. msg_len , msg_ptr; mq_msgsize. . msg_prio , . , . mq_overview(7). (. ., mq_maxmsg), mq_send() , . O_NONBLOCK, EAGAIN. mq_timedsend() behaves just like mq_send(), except that if the queue is full and the O_NONBLOCK flag is not enabled for the message queue description, then abs_timeout points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in a timespec(3) structure. , mq_timedsend() . mq_send() mq_timedsend() ; -1, errno . EAGAIN , mqdes, O_NONBLOCK. EBADF mqdes . EINTR ; signal(7). EINVAL abs_timeout , tv_sec tv_nsec 1000 . EMSGSIZE msg_len , mq_msgsize. ETIMEDOUT , . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |mq_send(), mq_timedsend() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ Linux mq_timedsend() , mq_send() -- , : POSIX.1-2008. POSIX.1-2001. . mq_close(3), mq_getattr(3), mq_notify(3), mq_open(3), mq_receive(3), mq_unlink(3), timespec(3), mq_overview(7), time(7) aereiae , Alexey , Azamat Hackimov , Dmitriy S. Seregin , Dmitry Bolkhovskikh , ITriskTI , Max Is , Yuri Kozlov , ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . mq_send(3)