2011-10-28 16 views
8

Che cosa significa GCC __attribute__(bitwise)? L'attributo non è menzionato nelle pagine informative di GCC-4.6. Ho stubled su di esso nel file open-iscsi-2.0.871/include/iscsi_proto.h in origine il progetto Open-iSCSI dove viene utilizzato comeGCC Bitwise Attribute

... 
/* 
* If running svn modules we may need to define these. 
* This should not go upstream since this is already properly defined there 
*/ 
#ifdef __CHECKER__ 
#define __bitwise__ __attribute__((bitwise)) 
#else 
#define __bitwise__ 
#endif 
#ifdef __CHECK_ENDIAN__ 
#define __bitwise __bitwise__ 
#else 
#define __bitwise 
#endif 

/*! initiator tags; opaque for target */ 
typedef uint32_t __bitwise__ itt_t; 
/*! below makes sense only for initiator that created this tag */ 
#define build_itt(itt, age) ((__force itt_t)\ 
    ((itt) | ((age) << ISCSI_AGE_SHIFT))) 
#define get_itt(itt) ((__force uint32_t)(itt_t)(itt) & ISCSI_ITT_MASK) 
#define RESERVED_ITT ((__force itt_t)0xffffffff) 
... 

Sono sospettare qualcosa che coinvolge ordine di byte ma non posso fare alcun senso della snippet dato sopra.

risposta

2

Google dice here che bit a bit non significa molto più.