From: Manfred Spraul <manfred@colorfullife.com>
To: "David S. Miller" <davem@redhat.com>
Cc: alan@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: Linux 2.5.40-ac1
Date: Thu, 03 Oct 2002 17:18:06 +0200 [thread overview]
Message-ID: <3D9C5FAE.60008@colorfullife.com> (raw)
In-Reply-To: 20021003.075034.12648168.davem@redhat.com
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
David S. Miller wrote:
>
> How about a 64-bit system where set_bit works on 64-bit longs
> and not 32-bit ones? That is why the current code there is broken.
>
There should bit nonatomic bit ops for every byte width.
http://marc.theaimsgroup.com/?l=linux-kernel&m=99167415926343&w=2
I even sent you the patch proposal, but never got a reply.
Patch again attached, but untested.
--
Manfred
[-- Attachment #2: patch-bitops --]
[-- Type: text/plain, Size: 620 bytes --]
--- 2.4/include/linux/bitops.h Sat Apr 28 00:48:19 2001
+++ build-2.4/include/linux/bitops.h Tue Jun 5 19:40:43 2001
@@ -68,5 +68,27 @@
#include <asm/bitops.h>
+#ifdef __KERNEL__
+#include <linux/types.h>
+#define BUILD_SET_BIT(n) \
+static inline void __set_bit_##n(int offset, u##n *data) \
+{ \
+ data[offset/n] |= (1 << (offset%n)); \
+}
+
+#ifndef _HAVE_ARCH_SET_BIT_8
+BUILD_SET_BIT(8)
+#endif
+#ifndef _HAVE_ARCH_SET_BIT_16
+BUILD_SET_BIT(16)
+#endif
+#ifndef _HAVE_ARCH_SET_BIT_32
+BUILD_SET_BIT(32)
+#endif
+#ifndef _HAVE_ARCH_SET_BIT_64
+BUILD_SET_BIT(64)
+#endif
+#undef BUILD_SET_BIT
+#endif
#endif
next prev parent reply other threads:[~2002-10-03 15:12 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-03 14:45 Linux 2.5.40-ac1 Manfred Spraul
2002-10-03 14:50 ` David S. Miller
2002-10-03 15:18 ` Manfred Spraul [this message]
2002-10-03 15:15 ` David S. Miller
2002-10-03 15:48 ` Alan Cox
2002-10-03 15:53 ` Manfred Spraul
2002-10-03 15:17 ` Alan Cox
2002-10-03 15:34 ` Manfred Spraul
-- strict thread matches above, loose matches on Subject: below --
2002-10-02 23:38 Greg Ungerer
2002-10-03 14:17 ` Christoph Hellwig
2002-10-03 14:20 ` Alan Cox
2002-10-03 14:51 ` Christoph Hellwig
2002-10-03 15:25 ` Alan Cox
2002-10-03 15:28 ` Christoph Hellwig
2002-10-03 15:31 ` Greg Ungerer
2002-10-03 19:16 ` Rik van Riel
2002-10-03 23:44 ` Greg Ungerer
2002-10-04 0:32 ` Rik van Riel
2002-10-02 22:18 Alan Cox
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=3D9C5FAE.60008@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=alan@redhat.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox