2002-01-03 04:51:12

by John Weber

[permalink] [raw]
Subject: More errors compiling kernel with GCC 3.1

I'm just trying to read the source code, and I am having trouble in a
few areas. For example, I am completely baffled by the number of macros
that get called in some places. For example, in the semaphore code...
just wondering why DECLARE_MUTEX (macro) calls DECLARE_SEMAPHORE_GENERIC
(macro) calls SEMAPHORE_INITIALIZER (macro) calls
WAIT_QUEUE_HEAD_INITIALIZER (macro) and so on, and so on...

I guess I can understand the use of a macro to deal with the overhead
introduced by calling functions all over the place, but having this
many macros that call macros isn't clear to me... I just hope that it
wasn't done to make the code easier to read or something :).

Can anyone point me to some documentation that might explain this type
of thing?


2002-01-03 04:58:53

by John Weber

[permalink] [raw]
Subject: Re: More errors compiling kernel with GCC 3.1

John Weber wrote:

> I'm just trying to read the source code, and I am having trouble in a
> few areas. For example, I am completely baffled by the number of macros
> that get called in some places. For example, in the semaphore code...
> just wondering why DECLARE_MUTEX (macro) calls DECLARE_SEMAPHORE_GENERIC
> (macro) calls SEMAPHORE_INITIALIZER (macro) calls
> WAIT_QUEUE_HEAD_INITIALIZER (macro) and so on, and so on...

I apologize, but this was mistakenly sent to the wrong mailing list...
I was complaining about some parts of the kernel that gcc 3.1 was having
trouble with, which upon reading I was having trouble with :).

Sorry for the pollution...