Linux.com

my20050804

my20050804

  • Linux.com Member
  • Posts: 2
  • Member Since: 24 Nov 10
  • Last Logged In: 25 Nov 10

Latest Posts

Posted by
Topic
Post Preview
Posted
  • my20050804
    RE: atomic.h issue in Ubuntu 9.4
    after using __KERNEL__, 'u8' can be found, but it occurred other errors: gcc -DCONFIG_X86_32 -D__KERNEL__ -I/usr/src/linux-headers-2.6.28-11/include -I/usr/src/linux-headers-2.6.28-11/arch/x86/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test_atomic.d" -MT"src/test_atomic.d" -o"src/test_atomic.o" "../src/test_atomic.c" /usr/src/linux-headers-2.6.28-11/include/linux/log2.h:52: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘is_power_of_2’ In file included from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/system.h:10, from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/processor.h:17, from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic_32.h:5, from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic.h:2, from ../src/test_atomic.c:14: /usr/src/linux-headers-2.6.28-11/include/linux/kernel.h:236: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘printk_timed_ratelimit’ /usr/src/linux-headers-2.6.28-11/include/linux/kernel.h:303: 错误: expected declaration specifiers or ‘...’ before ‘bool’ /usr/src/linux-headers-2.6.28-11/include/linux
    Link to this post 24 Nov 10

    after using __KERNEL__, 'u8' can be found, but it occurred other errors:

    gcc -DCONFIG_X86_32 -D__KERNEL__ -I/usr/src/linux-headers-2.6.28-11/include -I/usr/src/linux-headers-2.6.28-11/arch/x86/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test_atomic.d" -MT"src/test_atomic.d" -o"src/test_atomic.o" "../src/test_atomic.c"

    /usr/src/linux-headers-2.6.28-11/include/linux/log2.h:52: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘is_power_of_2’
    In file included from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/system.h:10,
    from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/processor.h:17,
    from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic_32.h:5,
    from /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/atomic.h:2,
    from ../src/test_atomic.c:14:
    /usr/src/linux-headers-2.6.28-11/include/linux/kernel.h:236: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘printk_timed_ratelimit’
    /usr/src/linux-headers-2.6.28-11/include/linux/kernel.h:303: 错误: expected declaration specifiers or ‘...’ before ‘bool’
    /usr/src/linux-headers-2.6.28-11/include/linux

  • my20050804
    atomic.h issue in Ubuntu 9.4
    I can't compile atomic.h in Ubuntu 9.4, below is source code: #include #include #include int main(void) { puts("!!!Hello World!!!"); return EXIT_SUCCESS; } the following is the error info: /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/alternative.h:45: 错误: expected specifier-qualifier-list before ‘u8' Can anyone help me?
    Link to this post 24 Nov 10

    I can't compile atomic.h in Ubuntu 9.4, below is source code:

    #include <stdio.h>
    #include <stdlib.h>

    #include <asm/atomic.h>

    int main(void) {
    puts("!!!Hello World!!!");
    return EXIT_SUCCESS;
    }

    the following is the error info:
    /usr/src/linux-headers-2.6.28-11/arch/x86/include/asm/alternative.h:45: 错误: expected specifier-qualifier-list before ‘u8'

    Can anyone help me?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board