All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Pending patches
Date: Tue, 27 Jan 2009 14:10:42 +0100	[thread overview]
Message-ID: <497F07D2.6080501@domain.hid> (raw)
In-Reply-To: <4975901E.7040408@domain.hid>

Philippe Gerum wrote:
> We should indeed postpone this just in case the upper layer indexes the extra
> state on the minor value. We can also simplify a few things doing so.
> 
> --- ksrc/nucleus/pipe.c	(revision 4565)
> +++ ksrc/nucleus/pipe.c	(working copy)
> @@ -77,11 +77,9 @@
> 
>  static inline void xnpipe_minor_free(int minor)
>  {
> -	if (minor < 0 || minor >= XNPIPE_NDEVS)
> -		return;
> -
> -	__clrbits(xnpipe_bitmap[minor / BITS_PER_LONG],
> -		  1UL << (minor % BITS_PER_LONG));
> +	/* May be called with nklock free. */
> +	clrbits(xnpipe_bitmap[minor / BITS_PER_LONG],
> +		1UL << (minor % BITS_PER_LONG));

Bad news: This doesn't fly as is. All modifying operations on
xnpipe_bitmap must be atomic and xnpipe_bitmap has to be
xnarch_atomic_t. But then find_first_zero_bit breaks. Is there some
version for atomic arrays? I guess we have to open-code this, at least
down to word-level...

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


  parent reply	other threads:[~2009-01-27 13:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 10:19 [Xenomai-core] Pending patches Jan Kiszka
2009-01-15 10:30 ` Gilles Chanteperdrix
2009-01-15 11:00   ` Gilles Chanteperdrix
2009-01-15 11:31     ` Jan Kiszka
2009-01-15 13:02       ` Gilles Chanteperdrix
2009-01-15 14:12         ` Jan Kiszka
2009-01-15 11:28   ` Jan Kiszka
2009-01-15 13:09     ` Gilles Chanteperdrix
2009-01-15 14:17       ` Jan Kiszka
2009-01-15 21:46         ` Jan Kiszka
2009-01-15 10:49 ` Philippe Gerum
2009-01-15 11:24   ` Jan Kiszka
2009-01-15 12:09     ` Philippe Gerum
2009-01-15 13:55       ` Jan Kiszka
2009-01-15 14:16         ` Philippe Gerum
2009-01-19 23:18           ` Philippe Gerum
2009-01-19 23:35             ` Jan Kiszka
2009-01-20  8:49               ` Philippe Gerum
2009-01-20  9:06                 ` Jan Kiszka
2009-01-20  9:18                   ` Jan Kiszka
2009-01-20  9:22                   ` Philippe Gerum
2009-01-27 13:10                 ` Jan Kiszka [this message]
2009-01-27 13:26                   ` Jan Kiszka
2009-01-27 13:28                     ` Gilles Chanteperdrix
2009-01-27 13:29                   ` Philippe Gerum
2009-01-27 13:40                     ` Gilles Chanteperdrix
2009-01-27 13:40                   ` Philippe Gerum

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=497F07D2.6080501@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.