From ebfdda377b8530c0766d41cd2710ed4a250d0663 Mon Sep 17 00:00:00 2001 From: yangjiao Date: Mon, 12 Jun 2023 20:11:27 +0800 Subject: [PATCH] sched/mqueue/mq_sndinternal.c: Update the return value in description "Message queue opened not opened for writing". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standard POSIX specification in URL “https://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_timedsend.html” requires that "EBADF" be returned when message queue not opened for writing.So i update the related descriptions in this file, no function changed. Signed-off-by: yangjiao --- sched/mqueue/mq_timedsend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sched/mqueue/mq_timedsend.c b/sched/mqueue/mq_timedsend.c index 28422425a8..8727043750 100644 --- a/sched/mqueue/mq_timedsend.c +++ b/sched/mqueue/mq_timedsend.c @@ -135,7 +135,7 @@ static void nxmq_sndtimeout(wdparm_t pid) * EAGAIN The queue was empty, and the O_NONBLOCK flag was set for the * message queue description referred to by mq. * EINVAL Either msg or mq is NULL or the value of prio is invalid. - * EPERM Message queue opened not opened for writing. + * EBADF Message queue opened not opened for writing. * EMSGSIZE 'msglen' was greater than the maxmsgsize attribute of the * message queue. * EINTR The call was interrupted by a signal handler. @@ -317,7 +317,7 @@ errout_in_critical_section: * EAGAIN The queue was empty, and the O_NONBLOCK flag was set for the * message queue description referred to by mqdes. * EINVAL Either msg or mqdes is NULL or the value of prio is invalid. - * EPERM Message queue opened not opened for writing. + * EBADF Message queue opened not opened for writing. * EMSGSIZE 'msglen' was greater than the maxmsgsize attribute of the * message queue. * EINTR The call was interrupted by a signal handler. @@ -381,7 +381,7 @@ int nxmq_timedsend(mqd_t mqdes, FAR const char *msg, size_t msglen, * EAGAIN The queue was full, and the O_NONBLOCK flag was set for the * message queue description referred to by mqdes. * EINVAL Either msg or mqdes is NULL or the value of prio is invalid. - * EPERM Message queue opened not opened for writing. + * EBADF Message queue opened not opened for writing. * EMSGSIZE 'msglen' was greater than the maxmsgsize attribute of the * message queue. * EINTR The call was interrupted by a signal handler.