#include <bits/compiler.h>
Go to the source code of this file.
Defines | |
| #define | __attribute__(x) |
| #define | _C1(x, y) x ## y |
| Concatenate non-expanded arguments. | |
| #define | _C2(x, y) _C1 ( x, y ) |
| Concatenate expanded arguments. | |
| #define | _S1(x) #x |
| Stringify non-expanded argument. | |
| #define | _S2(x) _S1 ( x ) |
| Stringify expanded argument. | |
| #define | PROVIDE_SYMBOL(_sym) char _sym[0] |
| Provide a symbol within this object file. | |
| #define | REQUIRE_SYMBOL(_sym) |
| Require a symbol within this object file. | |
| #define | REQUEST_SYMBOL(_sym) __asm__ ( ".equ\t__need_" #_sym ", " #_sym ) |
| Request that a symbol be available at runtime. | |
| #define | EXPORT_SYMBOL(_sym) PROVIDE_SYMBOL ( __export_ ## _sym ) |
| Set up a symbol to be usable in another file by IMPORT_SYMBOL(). | |
| #define | IMPORT_SYMBOL(_sym, _decl) |
| Make a symbol usable to this file if available at link time. | |
| #define | PREFIX_OBJECT(_prefix) _C2 ( _prefix, OBJECT ) |
| #define | OBJECT_SYMBOL PREFIX_OBJECT ( obj_ ) |
| #define | REQUEST_EXPANDED(_sym) REQUEST_SYMBOL ( _sym ) |
| #define | CONFIG_SYMBOL PREFIX_OBJECT ( obj_config_ ) |
| #define | REQUIRE_OBJECT(_obj) REQUIRE_SYMBOL ( obj_ ## _obj ) |
| Explicitly require another object. | |
| #define | REQUEST_OBJECT(_obj) REQUEST_SYMBOL ( obj_ ## _obj ) |
| Pull in another object if it exists. | |
| #define | ERRFILE PREFIX_OBJECT ( ERRFILE_ ) |
| Select file identifier for errno.h (if used). | |
| #define | __weak_impl(name) _w_ ## name |
| Mangle name into its weakly-referenced implementation. | |
| #define | __weak_decl(ret, name, proto, args, dfl) |
| Declare a weak function with inline safety wrapper. | |
| #define | DEBUG_SYMBOL PREFIX_OBJECT ( debug_ ) |
| #define | DBGLVL_MAX 0 |
| #define | DBGLVL 0 |
| #define | DBG_DISABLE(level) do { } while ( 0 ) |
| #define | DBG_ENABLE(level) do { } while ( 0 ) |
| #define | DBGLVL_LOG 1 |
| #define | DBG_LOG ( DBGLVL & DBGLVL_LOG ) |
| #define | DBGLVL_EXTRA 2 |
| #define | DBG_EXTRA ( DBGLVL & DBGLVL_EXTRA ) |
| #define | DBGLVL_PROFILE 4 |
| #define | DBG_PROFILE ( DBGLVL & DBGLVL_PROFILE ) |
| #define | DBGLVL_IO 8 |
| #define | DBG_IO ( DBGLVL & DBGLVL_IO ) |
| #define | DBG_IF(level,...) |
| Print debugging message if we are at a certain debug level. | |
| #define | DBG_HDA_IF(level, dispaddr, data, len) |
| Print a hex dump if we are at a certain debug level. | |
| #define | DBG_HD_IF(level, data, len) |
| Print a hex dump if we are at a certain debug level. | |
| #define | DBG_AC_IF(level, id) |
| Select colour for debug messages if we are at a certain debug level. | |
| #define | DBG_DC_IF(level) |
| Revert colour for debug messages if we are at a certain debug level. | |
| #define | DBGC_IF(level, id,...) |
| #define | DBGC_HDA_IF(level, id,...) |
| #define | DBGC_HD_IF(level, id,...) |
| #define | DBG(...) DBG_IF ( LOG, __VA_ARGS__ ) |
| Print a debugging message. | |
| #define | DBG_HDA(...) DBG_HDA_IF ( LOG, __VA_ARGS__ ) |
| #define | DBG_HD(...) DBG_HD_IF ( LOG, __VA_ARGS__ ) |
| #define | DBGC(...) DBGC_IF ( LOG, __VA_ARGS__ ) |
| #define | DBGC_HDA(...) DBGC_HDA_IF ( LOG, __VA_ARGS__ ) |
| #define | DBGC_HD(...) DBGC_HD_IF ( LOG, __VA_ARGS__ ) |
| #define | DBG2(...) DBG_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBG2_HDA(...) DBG_HDA_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBG2_HD(...) DBG_HD_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBGC2(...) DBGC_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBGC2_HDA(...) DBGC_HDA_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBGC2_HD(...) DBGC_HD_IF ( EXTRA, __VA_ARGS__ ) |
| #define | DBGP(...) DBG_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGP_HDA(...) DBG_HDA_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGP_HD(...) DBG_HD_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGCP(...) DBGC_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGCP_HDA(...) DBGC_HDA_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGCP_HD(...) DBGC_HD_IF ( PROFILE, __VA_ARGS__ ) |
| #define | DBGIO(...) DBG_IF ( IO, __VA_ARGS__ ) |
| #define | DBGIO_HDA(...) DBG_HDA_IF ( IO, __VA_ARGS__ ) |
| #define | DBGIO_HD(...) DBG_HD_IF ( IO, __VA_ARGS__ ) |
| #define | DBGCIO(...) DBGC_IF ( IO, __VA_ARGS__ ) |
| #define | DBGCIO_HDA(...) DBGC_HDA_IF ( IO, __VA_ARGS__ ) |
| #define | DBGCIO_HD(...) DBGC_HD_IF ( IO, __VA_ARGS__ ) |
| #define | NDEBUG |
| #define | PACKED __attribute__ (( packed )) |
| Declare a data structure as packed. | |
| #define | __unused __attribute__ (( unused )) |
| Declare a variable or data structure as unused. | |
| #define | __pure __attribute__ (( pure )) |
| Declare a function as pure - i.e. | |
| #define | __const __attribute__ (( const )) |
| Declare a function as const - i.e. | |
| #define | __nonnull __attribute__ (( nonnull )) |
| Declare a function's pointer parameters as non-null - i.e. | |
| #define | __malloc __attribute__ (( malloc )) |
| Declare a pointer returned by a function as a unique memory address as returned by malloc-type functions. | |
| #define | __used __attribute__ (( used )) |
| Declare a function as used. | |
| #define | __aligned __attribute__ (( aligned ( 16 ) )) |
| Declare a data structure to be aligned with 16-byte alignment. | |
| #define | __always_inline __attribute__ (( always_inline )) |
| Declare a function to be always inline. | |
| #define | __shared __asm__ ( "_shared_bss" ) __aligned |
| Shared data. | |
| #define | barrier() __asm__ __volatile__ ( "" : : : "memory" ) |
| Optimisation barrier. | |
| #define | FILE_LICENCE_PUBLIC_DOMAIN PROVIDE_SYMBOL ( __licence_public_domain ) |
| Declare a file as being in the public domain. | |
| #define | FILE_LICENCE_GPL2_OR_LATER PROVIDE_SYMBOL ( __licence_gpl2_or_later ) |
| Declare a file as being under version 2 (or later) of the GNU GPL. | |
| #define | FILE_LICENCE_GPL2_ONLY PROVIDE_SYMBOL ( __licence_gpl2_only ) |
| Declare a file as being under version 2 of the GNU GPL. | |
| #define | FILE_LICENCE_GPL_ANY PROVIDE_SYMBOL ( __licence_gpl_any ) |
| Declare a file as being under any version of the GNU GPL. | |
| #define | FILE_LICENCE_BSD3 PROVIDE_SYMBOL ( __licence_bsd3 ) |
| Declare a file as being under the three-clause BSD licence. | |
| #define | FILE_LICENCE_BSD2 PROVIDE_SYMBOL ( __licence_bsd2 ) |
| Declare a file as being under the two-clause BSD licence. | |
| #define | FILE_LICENCE_MIT PROVIDE_SYMBOL ( __licence_mit ) |
| Declare a file as being under the one-clause MIT-style licence. | |
| #define | FILE_LICENCE(_licence) FILE_LICENCE_ ## _licence |
| Declare a particular licence as applying to a file. | |
Functions | |
| PROVIDE_SYMBOL (OBJECT_SYMBOL) | |
| Always provide the symbol for the current object (defined by -DOBJECT). | |
| REQUEST_EXPANDED (CONFIG_SYMBOL) | |
| Pull in an object-specific configuration file if available. | |
| int | dbg_printf (const char *fmt,...) asm("printf") |
| printf() for debugging | |
| void | dbg_autocolourise (unsigned long id) |
| Select automatic colour for debug messages. | |
| void | dbg_decolourise (void) |
| Revert to normal colour. | |
| void | dbg_hex_dump_da (unsigned long dispaddr, const void *data, unsigned long len) |
| Print hex dump with specified display address. | |
| FILE_LICENCE (GPL2_OR_LATER) | |
This file is implicitly included by every .c file in Etherboot. It defines global macros such as DBG().
We arrange for each object to export the symbol obj_OBJECT (where OBJECT is the object name, e.g. rtl8139) as a global symbol, so that the linker can drag in selected object files from the library using -u obj_OBJECT .
Definition in file compiler.h.
| #define __attribute__ | ( | x | ) |
Definition at line 10 of file compiler.h.
Referenced by find_dhcp_option_with_encap(), tls_new_alert(), tls_new_certificate(), tls_new_handshake(), tls_new_server_hello(), tls_new_server_hello_done(), tls_send_client_hello(), tls_send_client_key_exchange(), tls_send_finished(), wpa_check_pmkid(), and wpa_derive_ptk().
| #define _C1 | ( | x, | |||
| y | ) | x ## y |
| #define _C2 | ( | x, | |||
| y | ) | _C1 ( x, y ) |
| #define _S1 | ( | x | ) | #x |
| #define _S2 | ( | x | ) | _S1 ( x ) |
| #define ERRFILE PREFIX_OBJECT ( ERRFILE_ ) |
| #define barrier | ( | ) | __asm__ __volatile__ ( "" : : : "memory" ) |
Optimisation barrier.
Definition at line 534 of file compiler.h.
Referenced by arbel_cmd(), arbel_create_cq(), arbel_create_eq(), arbel_poll_cq(), arbel_poll_eq(), arbel_post_recv(), arbel_post_send(), arbel_ring_doorbell(), hermon_cmd(), hermon_create_cq(), hermon_create_eq(), hermon_post_recv(), and hermon_post_send().
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
1.5.7.1