Skip to contentSkip to conversation

include conventions /usr/include/linux/sys ?

DISCUSSION LA Walsh 5 participants 5 messages Nov 22, 2000 – Nov 23, 2000

lore
Share & tools
lore

LA Walsh

author
#0 lore raw

Linus has mentioned a desire to move kernel internal interfaces into a separate kernel include directory. In creating some code, I'm wondering what the name of this should/will be. Does it follow that convention would point toward a linux/sys directory?
-l

--
L A Walsh | Trust Technology, Core Linux, SGI
[email protected] | Voice/Vmail: (650) 933-5338

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 4 lines · In article <[email protected]> you wrote:

Linus has mentioned a desire to move kernel internal interfaces into a separate kernel include directory. In creating some code, I'm wondering what the name of this should/will be. Does it follow that convention would point toward a linux/sys directory?

I would vote for

include/linux - exported interfaces
include/kernel - kernel internal interfaces
include/asm - kernel internal/archspecific interfaces

Greetings,
Arjan van de Ven
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to LA Walsh
Followup to:  <[email protected]>
By author:    "LA Walsh" <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 6 lines

Linus has mentioned a desire to move kernel internal interfaces into a separate kernel include directory. In creating some code, I'm wondering what the name of this should/will be. Does it follow that convention would point toward a linux/sys directory?

I suggested include/kernel and include/arch with include/linux and include/asm being reserved for the kernel interfaces (ioctl and their structures mostly.)

-hpa

Signature · 7 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#3 lore raw
In reply to LA Walsh
Quoted 10 lines · H. Peter Anvin
Followup to:  <[email protected]>
By author:    "LA Walsh" <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 6 lines

Linus has mentioned a desire to move kernel internal interfaces into a separate kernel include directory. In creating some code, I'm wondering what the name of this should/will be. Does it follow that convention would point toward a linux/sys directory?

Quoted 3 lines

I suggested include/kernel and include/arch with include/linux and include/asm being reserved for the kernel interfaces (ioctl and their structures mostly.)

It would also be useful to put *32 structures for 32->64bit conversion in there (to prepare for a generic 32->64bit conversion layer in 2.5)

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to LA Walsh
Quoted 3 lines · H. Peter Anvin

I suggested include/kernel and include/arch with include/linux and include/asm being reserved for the kernel interfaces (ioctl and their structures mostly.)

That sounds good. One other refinement I would like to see is that architecture specific but always present header files don't get used directly in architecture-independant .c flies. Some common examples of this are <asm/io.h> and <asm/uaccess.h> The problem is that often there is some code that is identical between some or all of the archs. Then one of two things happen:
* The code gets duplicated in many *.h files with all the bad things that comde duplication causes - especially since they're all under seperate maintainership
* We have a big ugly conversion like what happened with 'asm/spinlock.h' -> 'linux/spinlock.h'

If we only have arch-independant *.c files only include things out of <kernel/*> (which may, of course, include things in <arch/*>) we can avoid these conversions in the future and promote code reuse between the architectures.

Also we should probably consider implementing a reasonalbe hierarchy to the proposed <kernel/*.h> directory - for instance <kernel/bus/pci.h>.

-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/