linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Roger Larsson <roger.larsson@norran.net>
To: "Juan J. Quintela" <quintela@fi.udc.es>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	lkml <linux-kernel@vger.rutgers.edu>,
	linux-mm@kvack.org, linux-fsdevel@vger.rutgers.edu
Subject: Re: PATCH: Improvements in shrink_mmap and kswapd
Date: Sun, 18 Jun 2000 01:30:17 +0200	[thread overview]
Message-ID: <394C0A09.CD2CBF62@norran.net> (raw)
In-Reply-To: <ytt3dmcyli7.fsf@serpe.mitica>

> diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/include/asm-i386/bitops.h working/include/asm-i386/bitops.h
> --- base/include/asm-i386/bitops.h      Sat Jun 17 23:37:03 2000
> +++ working/include/asm-i386/bitops.h   Sat Jun 17 23:52:49 2000
> @@ -29,6 +29,7 @@
>  extern void change_bit(int nr, volatile void * addr);
>  extern int test_and_set_bit(int nr, volatile void * addr);
>  extern int test_and_clear_bit(int nr, volatile void * addr);
> +extern int test_and_test_and_clear_bit(int nr, volatile void * addr);
>  extern int test_and_change_bit(int nr, volatile void * addr);
>  extern int __constant_test_bit(int nr, const volatile void * addr);
>  extern int __test_bit(int nr, volatile void * addr);
> @@ -87,6 +88,13 @@
>                 :"=r" (oldbit),"=m" (ADDR)
>                 :"Ir" (nr));
>         return oldbit;
> +}
> +
> +extern __inline__ int test_and_test_and_clear_bit(int nr, volatile void *addr)
> +{
> +       if(!(((unsigned long)addr) & (1<<nr)))
> +               return 0;
> +       return test_and_clear_bit(nr,addr);
>  }


This does not look correct. It basically tests if the ADDRESS has bit
#nr set...

Shouldn't it be
+       if(!(((unsigned long)*addr) & (1<<nr)))


/RogerL

--
Home page:
  http://www.norran.net/nra02596/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

  parent reply	other threads:[~2000-06-17 23:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-17 22:45 Juan J. Quintela
2000-06-17 23:12 ` Rik van Riel
2000-06-17 23:30 ` Roger Larsson [this message]
2000-06-17 23:42   ` Philipp Rumpf
2000-06-18  0:00     ` Roger Larsson
2000-06-18  0:51 ` Roger Larsson
2000-06-18  7:57 ` Mike Galbraith
2000-06-19 23:15 ` PATCH: Improvements in shrink_mmap and kswapd (take 2) Juan J. Quintela

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=394C0A09.CD2CBF62@norran.net \
    --to=roger.larsson@norran.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-fsdevel@vger.rutgers.edu \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=quintela@fi.udc.es \
    /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