GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > PBI / V0-0-6

Constituent: test_alias     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

Alias.h.sx-xxx-gcc File Reference

Defines a set of macros used to create function aliases for Solaris under the GCC compiler. More...


Defines

#define ALIAS_BEG(_container)
 Introduces a group of aliases.

#define ALIAS_FNC(_name, _alias)
 Defines an alias for a function.

#define ALIAS_END(_container)
 Closes a group of aliases.


Detailed Description

Defines a set of macros used to create function aliases for Solaris under the GCC compiler.

Author:
JJRussell - russell@slac.stanford.edu
  CVS $Id

Define Documentation

#define ALIAS_BEG _container   ) 
 

Introduces a group of aliases.

Parameters:
_container A completely arbitrary, but unique name
The container name is completely arbitrary. On some compilers (scc on SOLARIS) aliases can only be defined within the context of a routine. The parameter _container is the name of the encapsulating routine. This is one of those interesting features that seemingly has no real reason, but...

#define ALIAS_END _container   ) 
 

Closes a group of aliases.

Parameters:
_container A completely arbitrary, but unique name.
The container name is completely arbitrary. As explained in ALIAS_BEG, on some compilers (scc on SOLARIS) aliases can only be defined within the context of a routine. The parameter _container is the name of the encapsulating routine. The name is not actually used by this macro for any real purpose, but it cleanly highlights the declaration of a block of aliases.

#define ALIAS_FNC _name,
_alias   ) 
 

Value:

asm (".global " # _alias "\n"            \
         ".type "  # _alias  ",#function \n" \
         # _alias " = " # _name);
Defines an alias for a function.

Parameters:
_name The original name of the symbol
_alias The aliased name for the symbol
This macro is self-explanatory. For those curious about the calling convention (i.e. why isn't it ALIAS_FNC(_alias, _name)), the thought was that if one introduced a macro that defined multiple aliases for a single symbol the natural extension would be ALIAS_FNC2(_name, alias1, alias2). Just want to make sure you know there is a method to my madness.


Generated on Sun Dec 12 07:11:44 2004 by doxygen 1.3.3