From: Brent Baccala <baccala@freesoft.org>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: enhanced spinlock debugging code for intel
Date: Thu, 02 Aug 2001 16:52:48 -0400 [thread overview]
Message-ID: <3B69BDA0.89E25CA9@freesoft.org> (raw)
In-Reply-To: <3B68FAF4.2B3C9064@freesoft.org> <8zh2vnqc.wl@nisaaru.open.nm.fujitsu.co.jp>
> Brent Baccala wrote:
> >
> > I've had to add some hideous code to get the processor ID:
> >
> > #define my_processor_id (((int *)current)[13])
> >
> > since sched.h includes spinlock.h, so task_struct isn't defined when
> > this file is parsed, so we can't just dereference current to find the
> > processor ID. Any better suggestions would be welcome.
I've been thinking more about my own problem here.
I think it could be solved by splitting the spinlock include file in
two:
spinlockdef.h - the structure definitions for spinlocks and their
initializers
spinlock.h - includes spinlockdef.h and defines the functions to
manipulate spinlocks
This would have to been done in include/linux, as well as all the
include/asm* directories.
Most stuff would include spinlock.h, get both files, and see no change.
sched.h would be changed to include spinlockdef.h, since that's all it
needs.
asm-i386/spinlock.h could then include sched.h and spinlockdef.h without
creating a self-referential loop, so smp_processor_id would work in this
file.
Comments? a new include file in all the asm dirs? think Linus would
take it?
--
-bwb
Brent Baccala
baccala@freesoft.org
==============================================================================
For news from freesoft.org, subscribe to announce@freesoft.org:
mailto:announce-request@freesoft.org?subject=subscribe&body=subscribe
==============================================================================
prev parent reply other threads:[~2001-08-02 20:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-02 7:02 Brent Baccala
2001-08-02 9:02 ` Tachino Nobuhiro
2001-08-02 17:44 ` Brent Baccala
2001-08-02 20:52 ` Brent Baccala [this message]
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=3B69BDA0.89E25CA9@freesoft.org \
--to=baccala@freesoft.org \
--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
all inboxes | Powered by JetHome®