Is there any restriction on using #define'd functions/inline functions inside Assembly files.
I referred bsd kernel in which two different implementations are defined. One is macro and other is a normal function ( both are for same function)
In the c file splx is defined asfunction, http://ftp.hu.freebsd.org/pub/netbsd/NetBSD-release-4-0/src/sys/arch/arm/omap/omap_intr.c
Whereas in h header file splx is defined as macro, http://ftp.hu.freebsd.org/pub/netbsd/NetBSD-release-4-0/src/sys/arch/arm/omap/omap_intr.h
My understanding is c file definition is used in assembly files whereas macro definition is used in all other functions where the header file is included.
I think I m not clear why assembly is coming into picture here. Basically there are two definitions , one in the c file and another in h file for splx. When I just comment out splx definition in C fle, I get some errors in the compilation of Assembly files.(cpu.S) Thatz why I thought function definition is used(as in c file) while compiling assembly file, whereas macro definition is used for all other files include the h file.
Now my question is , why can't assembly file too cannot use the macro definition by including the header file.
Kindly clarify. Thanks