lkcd
[Top] [All Lists]

Alpha port: lcrash/current.h

To: lkcd@xxxxxxxxxxx, "Matt D. Robinson" <yakker@xxxxxxxxxxxxxx>
Subject: Alpha port: lcrash/current.h
From: Brian Hall <brianw.hall@xxxxxxxxxx>
Date: Fri, 17 Mar 2000 14:29:38 -0700 (MST)
Reply-to: Brian Hall <brianw.hall@xxxxxxxxxx>
Sender: owner-lkcd@xxxxxxxxxxx
Porting lkcd to Alpha...

After much fustration, I defined __LCRASH__ in lcrash.h, and modified current.h
to remove the "warning: call-clobbered register used for global register
variable" problem as follows:

------------------current.h------------------------
#ifndef _ALPHA_CURRENT_H
#define _ALPHA_CURRENT_H

#ifndef __LCRASH__
register struct task_struct *current __asm__("$8");
#else
struct task_struct *current;
#endif

#endif /* !(_ALPHA_CURRENT_H) */
---------------------------------------------------

This allowed compilation to proceed, but seems dangerous- will lcrash need to
access the current register during its processing? If this is wrong, what is
the correct way to fix this? Trying to #ifndef header sections out (in the
main Linux include tree) based on __LCRASH__ wasn't very productive.

-- 
http://www.bigfoot.com/~brihall
Linux Consultant

<Prev in Thread] Current Thread [Next in Thread>