linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "D.W.Howells" <dhowells@astarte.free-online.co.uk>
To: torvalds@transmeta.com
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: [PATCH] generic rw_semaphores, compile warnings patch
Date: Fri, 20 Apr 2001 00:33:19 +0100	[thread overview]
Message-ID: <01042000331901.01311@orion.ddi.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

This patch (made against linux-2.4.4-pre4) gets rid of some warnings obtained 
when using the generic rwsem implementation.

David


[-- Attachment #2: rwsem compile warnings patch --]
[-- Type: text/plain, Size: 1369 bytes --]

diff -uNr linux-2.4.4-pre4/include/linux/rwsem.h linux/include/linux/rwsem.h
--- linux-2.4.4-pre4/include/linux/rwsem.h	Thu Apr 19 22:07:49 2001
+++ linux/include/linux/rwsem.h	Thu Apr 19 23:52:41 2001
@@ -42,20 +42,24 @@
 #include <asm/atomic.h>
 #include <linux/wait.h>
 
-#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
-#include <linux/rwsem-spinlock.h> /* use a generic implementation */
-#else
-#include <asm/rwsem.h> /* use an arch-specific implementation */
-#endif
+struct rw_semaphore;
 
 /* defined contention handler functions for the generic case
  * - these are also used for the exchange-and-add based algorithm
  */
-#if defined(CONFIG_RWSEM_GENERIC) || defined(CONFIG_RWSEM_XCHGADD_ALGORITHM)
+#if defined(CONFIG_RWSEM_GENERIC_SPINLOCK) || defined(CONFIG_RWSEM_XCHGADD_ALGORITHM)
 /* we use FASTCALL convention for the helpers */
 extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem));
 extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem));
 extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *sem));
+#endif
+
+/* access the actual implementation of the rwsems
+ */
+#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
+#include <linux/rwsem-spinlock.h> /* use a generic implementation */
+#else
+#include <asm/rwsem.h> /* use an arch-specific implementation */
 #endif
 
 #ifndef rwsemtrace

             reply	other threads:[~2001-04-19 23:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 23:33 D.W.Howells [this message]
2001-04-19 23:43 ` [PATCH] generic rw_semaphores, compile warnings patch David S. Miller
2001-04-20  7:50   ` David Howells
2001-04-20 12:04     ` Ivan Kokshaysky
2001-04-20  7:57   ` David S. Miller

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=01042000331901.01311@orion.ddi.co.uk \
    --to=dhowells@astarte.free-online.co.uk \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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;
as well as URLs for NNTP newsgroup(s).