public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] kernel 2.5.69 doesn't compile for UP
Date: Wed, 14 May 2003 14:16:49 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590723705789@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705787@msgid-missing>

On Wed, May 14, 2003 at 03:31:08PM +0200, Eric Piel wrote:
> Hello,
> There is a compile error if not compiling for SMP:

> +#ifdef CONFIG_SMP
>  	if (!tasklist_lock.write_lock)
> +#endif
>  		read_lock(&tasklist_lock);

Yuck.  The right way to do this is read_trylock(&tasklist_lock);
The observant will have noted:

#define write_trylock(lock)     ({preempt_disable();_raw_write_trylock(lock) ? \
                                1 : ({preempt_enable(); 0;});})

/* Where's read_trylock? */

in include/linux/spinlock.h but that doen't justify _not writing it_
when you need it.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk


  reply	other threads:[~2003-05-14 14:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-14 13:31 [Linux-ia64] kernel 2.5.69 doesn't compile for UP Eric Piel
2003-05-14 14:16 ` Matthew Wilcox [this message]
2003-05-14 17:32 ` David Mosberger
2003-05-14 18:05 ` Matthew Wilcox
2003-05-14 18:55 ` Andreas Schwab
2003-05-14 19:30 ` David Mosberger
2003-05-14 23:31 ` David Mosberger

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=marc-linux-ia64-105590723705789@msgid-missing \
    --to=willy@debian.org \
    --cc=linux-ia64@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