DEFINE() Macro defined in /linux/kbuild.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hi,
         There are three macro(DEFINE, BLANK, OFFSET) contained in /linux/kbuild.h in kernerl version 2.6.32.60.   All of them are inline assembly statements. I don't know what they means. Could anyone please explain them to me.
          Also I have written a test module to watch what they will print or do something, however I failed. I couldn't compile it .
Here is my code, I just steal it from arch/x86/kernel/asm-offsets_32.c:
#define PZ 4096   
static int __init test_init(void)
{
        DEFINE(PZ_asm, PZ);
        BLANK();
        OFFSET(INODE, inode, i_hash);
        return 0;
}
And here is message when I compiled it:
/home/kiongf/kernel_module_test/test/test.c: Assembler messages:
/home/kiongf/kernel_module_test/test/test.c:13: Error: junk at end of line, first unrecognized character is `-'
/home/kiongf/kernel_module_test/test/test.c:14: Error: junk at end of line, first unrecognized character is `-'
/home/kiongf/kernel_module_test/test/test.c:15: Error: junk at end of line, first unrecognized character is `-'

Did I do something wrong?

Thanks.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux