This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use asm/system.h from user space?

For my Linux networking application, I am referring to http://www.scaramanga.co.uk/code-fu/lincap.c to understand how to use the PACKET_MMAP method of receiving Ethernet packets via a ring buffer.

lincap.c uses the memory barrier macro mb() defined in asm/system.h. However, the code in that header file is embraced by #ifdef KERNEL. I guess that means it is a kernel header file.  How can I use mb() from a user space application (which I believe lincap.c is)?

BR

David