I’m using a Linux 2.6.36 on a embedded system. I try to program something with semaphores. For this I need a function from the jiffies.h library. So good so far. When I include the Lib
either this way
#include <jiffies.h>
or this way
#include <linux/jiffies.h>
works.
But the strange thing is if I go to open declaration (eclipse comand) it opens an new editor window with the library. Does anyone have a clue what to do?
You are probably not building your module correctly. A kernel module Makefile is extremely simple, and should look something like this, in its entirety:
The kernel build system will do the rest. For more details, see the chapter on building modules at http://lwn.net/Kernel/LDD3/
Editing:
Now it appears maybe you aren’t trying to write a kernel module after all. In that case, you don’t want any include files that are part of the kernel source. jiffies.h is not a userland include; it is a part of the kernel, used in writing parts of the kernel. For userland semaphores, try POSIX semaphores. Start with
man sem_overview, and/or Google “POSIX semaphore”.