On Wed, Jun 30, 1999 at 11:53:46AM -0700, Gengsheng Zhang wrote:
> I am new on real time linux so I can only ask some very basic questions.
>
> In a makefile someone created long time ago, the following two options
> were used for gcc:
>
> _D__KERNEL__
> _D__RT__
>
> what is the option meaning and where can I fine the information?
>
__KERNEL__ means that whatever you are compiling is kernel code, like
the Linux kernel (surprise!), modules, or an RTLinux program. Many of
the Linux header files have #ifdef __KERNEL__ in them, to avoid conflicts
with standard header files. One of the side effects of having to use
__KERNEL__ is that you can't include standard header files, which you
shouldn't be doing anyway.
__MODULE__ is similar. The header file linux/include/linux/module.h
is parsed differently if __MODULE__ is defined -- it defines some global
variables to allow insmod to install it correctly. You can only define
this for one source file per module.
__RTL__ is different. The newer versions appear to be migrating to
CONFIG_RTL, which is more appropriate. Defining __RTL__ doesn't change
the way that header files are parsed. It also doesn't separate namespaces,
like between user space and kernel space, since the kernel and RT modules
share the same namespace.
Basically, for a RT module, you should define __KERNEL__, and for your
main source file, also define __MODULE__.
dave...
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/