2001-12-06 19:09:33

by Frank Cornelis

[permalink] [raw]
Subject: list_head makes me crazy

HELP,

In include/asm-i386/processor.h, struct thread_struct I can add
struct list_head *mylist;
but not
struct list_head mylist;
while in both cases
#include <linux/list.h>
is being used.

I really need this, so if anyone has the solution to my problem...

Thanks in advance, Frank.


2001-12-06 19:17:43

by Davide Libenzi

[permalink] [raw]
Subject: Re: list_head makes me crazy

On Thu, 6 Dec 2001, Frank Cornelis wrote:

> HELP,
>
> In include/asm-i386/processor.h, struct thread_struct I can add
> struct list_head *mylist;
> but not
> struct list_head mylist;
> while in both cases
> #include <linux/list.h>
> is being used.
>
> I really need this, so if anyone has the solution to my problem...
>
> Thanks in advance, Frank.

It a cross includes problem and you can declare a pointer to something
coz the pointer has a fixed size while the full struct is prohibited
because its size is unknown.




- Davide


2001-12-06 20:13:31

by Rik van Riel

[permalink] [raw]
Subject: Re: list_head makes me crazy

On Thu, 6 Dec 2001, Frank Cornelis wrote:

> In include/asm-i386/processor.h, struct thread_struct I can add
> struct list_head *mylist;
> but not
> struct list_head mylist;

A struct list_head is about twice as large as a pointer.

Rik
--
DMCA, SSSCA, W3C? Who cares? http://thefreeworld.net/

http://www.surriel.com/ http://distro.conectiva.com/

2001-12-06 23:18:38

by David Woodhouse

[permalink] [raw]
Subject: Re: list_head makes me crazy


[email protected] said:
> I really need this, so if anyone has the solution to my problem...

Unfortunately, linux/list.h includes asm/processor.h, via linux/prefetch.h.
Making them include each other is not going to work very well.

The include files need a fairly hefty shakeup in 2.5.

--
dwmw2