• Sábado 27 de Abril de 2024, 06:04

Autor Tema:  #define  (Leído 1156 veces)

su -

  • Moderador
  • ******
  • Mensajes: 2349
    • Ver Perfil
#define
« en: Viernes 5 de Mayo de 2006, 22:49 »
0
Bueno, el problema es que mi C es muy basico y me pregunto que es esto:
Código: Text
  1. #define __init    __attribute__ ((__section__ (".text.init")))
  2. #define __exit    __attribute__ ((unused, __section__(".text.exit")))
  3.  
  4.  
PD: no tiene ningun include.
Gracias
*******PELIGRO LEE ESTO!!*******

There is no place like 127.0.0.1

Conecto luego existo, no conecto luego insisto.

su -

  • Moderador
  • ******
  • Mensajes: 2349
    • Ver Perfil
Re: #define
« Respuesta #1 en: Sábado 6 de Mayo de 2006, 00:05 »
0
No me acorde, este es el codigo, init.h
Código: Text
  1. #ifndef _I386_INIT_H
  2. #define _I386_INIT_H
  3.  
  4. #define __init __attribute__ ((__section__ (".text.init")))
  5. #define __initdata __attribute__ ((__section__ (".data.init")))
  6. #define __initfunc(__arginit) \
  7.   __arginit __init; \
  8.   __arginit
  9. /* For assembly routines */
  10. #define __INIT    .section  ".text.init",#alloc,#execinstr
  11. #define __FINIT  .previous
  12. #define __INITDATA  .section  ".data.init",#alloc,#write
  13.  
  14. #define __cacheline_aligned __attribute__ \
  15.        ((__section__ (".data.cacheline_aligned")))
  16.  
  17. #endif
  18.  
Y, lei un poco, ahora mi pregunta es como funciona esto.
void __init (void)...?
Y que resulta de eso?
Gracias
*******PELIGRO LEE ESTO!!*******

There is no place like 127.0.0.1

Conecto luego existo, no conecto luego insisto.