lkml.org 
[lkml]   [2002]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.4 Compile Error
Jeff Garzik wrote:
> John Weber wrote:
>
>>/usr/src/linux-2.5.4/include/asm/processor.h: In function `thread_saved_pc':
>>/usr/src/linux-2.5.4/include/asm/processor.h:444: dereferencing pointer
>>to incomplete type
>>make: *** [init/main.o] Error 1
>>
>
> since it's just for /usr/bin/ps, ie. not a fast path, I just un-inlined
> it in my alpha hacking. Same approach might work for here, too.
>
> The basic problem, I'm guessing, is that asm/processor.h wants to know
> about the internals of task struct, but it can't yet.
>
> Jeff
>

I don't know what the problem is, but un-inlining this function isn't
correcting it.

The function thread_saved_pc() is a mystery to me. It is declared with
a return type of unsigned long, and yet return this:

((unsigned long *)tsk->thread->esp)[3]

This is confusing to me in many ways:
- the "thread" member of task struct is not a pointer
- esp is of type unsigned long, so I don't understand the cast, and
I certainly don't understand the [3] here.

Can anyone explain this code to me?

I'm a kernelnewbie, so I'm inclined to return:
return (tsk->thread).esp
What is this function trying to do?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.091 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site