lkml.org 
[lkml]   [1999]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Re: bug in socket.h (and maybe many other kernel headerfiles)
Date
From
> Here's a little background: I have a program like strace, which
> monitors the system calls that *other programs* make. I need to
> #include the entire userspace-to-kernel ABI so that I can monitor
> properly.

I ran into a similar problem with the user-mode kernel, and my fix for it
might be applicable. I need to #include both user and kernel headers, the
kernel headers because I'm building a kernel, the user headers because the
lowest levels are implemented in terms of system calls.

I found out that you are asking for a world of hurt if you include both user
and kernel headers into the same file. What I did was split my sources into
"user" and "kernel" files, which include only user and kernel headers,
respectively. Communication between these two groups happens in terms of
basic C types.

So, what might work for C++ is to have little C files which include the kernel
headers, which pass their information back out to the C++ files using types
that everyone agrees on.

Jeff



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

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