I am trying to write a kernel module that will call the getpid()
routine.  However, it doesn't seem to be defined in the kernel
headers--though it is defined in /usr/include.  I'm using the
following make file for kernel modules:

  obj-m += a4.o

  all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

  clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

and it keeps flagging getpid() as not defined.

Also, getpid() is supposed to need the following:

  #include <sys/types.h>
  #include <unistd.h>

but it can't find these header files in the kernel headers.

What's the story?  What do I have to do to get this to work?

TIA,  Matt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [EMAIL PROTECTED]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup
-~----------~----~----~----~------~----~------~--~---

Reply via email to