This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Better POSIX compliance for mq_timedsend(), mq_timedreceived()


Rickard Westman <rickard.westman@27m.se> writes:

> Hi,
> 
> The attached patch attempts to correct a problem with mq_timedsend() and
> mq_timedreceived() when used with very short timeouts.  According to POSIX:
> 
> mq_timedsend(): "Under no circumstance shall the operation fail with a
> timeout if there is sufficient room in the queue to add the message
> immediately."
> 
> mq_timedreceive(): "Under no circumstance shall the operation fail with
> a timeout if a message can be removed from the message queue immediately."
> 
> However, the eCos implementation (2.0) seems to time out whenever it
> can, regardless of whether the operation could actually be performed at
> the time.  (I noticed this when I tried to use an abstime equivalent to
> a zero timeout, in order to achieve a one-shot non-blocking operation
> without actually changing the mode of the queue.)

I've now committed this patch.

For future reference, we like patch submitters to provide a ChangeLog
entry. I've written one for you this time, I may not be so generous in
future :-)


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]