public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Martijn Sipkema <m.j.w.sipkema@student.tudelft.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: POSIX message queues should not allocate memory on send
Date: Fri, 14 May 2004 05:51:45 -0400	[thread overview]
Message-ID: <20040514095145.GC30909@devserv.devel.redhat.com> (raw)
In-Reply-To: <000701c4399e$88a3aae0$161b14ac@boromir>

On Fri, May 14, 2004 at 11:30:53AM +0100, Martijn Sipkema wrote:
> The default mq_msgsize also seems a little large to me, but
> I don't see why defaults are needed; if I understand the standard
> correctly then creating a new message queue without mq_attr
> should create an empty queue, which thus cannot be used to
> pass messages.

No idea where you found this.

"If attr is NULL, the message queue shall be created with
implementation-defined default message queue attributes."

Empty queue means a message queue which has no messages in it, not
that mq_msgsize and/or mq_maxmsg is 0.
And mq_open with mq_msgsize 0 and/or mq_maxmsg 0 must fail (with EINVAL),
so the implementation-defined defaults IMHO must be > 0 for both
limits.

"     The mq_open() function shall fail if:"
...
"     [EINVAL]
             O_CREAT was specified in oflag, the value of attr is not NULL,
	     and either mq_maxmsg or mq_msgsize was less than or equal to zero."

	Jakub

  reply	other threads:[~2004-05-14  9:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 10:30 POSIX message queues should not allocate memory on send Martijn Sipkema
2004-05-14  9:51 ` Jakub Jelinek [this message]
2004-05-14 11:09   ` Martijn Sipkema
2004-05-14 10:40     ` Jakub Jelinek
2004-05-14 12:42       ` Martijn Sipkema
2004-05-14 15:57         ` Ulrich Drepper
2004-08-15  0:12       ` Martijn Sipkema
2004-05-14 16:58     ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040514095145.GC30909@devserv.devel.redhat.com \
    --to=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.j.w.sipkema@student.tudelft.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox