haproxy/include
Willy Tarreau 5b4dd683cb MINOR: standard: provide htonll() and ntohll()
These are the 64-bit equivalent of htonl() and ntohl(). They're a bit
tricky in order to avoid expensive operations.

The principle consists in letting the compiler detect we're playing
with a union and simplify most or all operations. The asm-optimized
htonl() version involving bswap (x86) / rev (arm) / other is a single
operation on little endian, or a NOP on big-endian. In both cases,
this lets the compiler "see" that we're rebuilding a 64-bit word from
two 32-bit quantities that fit into a 32-bit register. In big endian,
the whole code is optimized out. In little endian, with a decent compiler,
a few bswap and 2 shifts are left, which is the minimum acceptable.
2015-07-21 23:50:06 +02:00
..
common MINOR: standard: provide htonll() and ntohll() 2015-07-21 23:50:06 +02:00
import MEDIUM: 51Degrees code refactoring and cleanup 2015-06-30 10:43:03 +02:00
proto MINOR: server: server_find functions: id, name, best_match 2015-07-21 23:24:16 +02:00
types MINOR: server: new server flag: SRV_F_FORCED_ID 2015-07-21 23:24:16 +02:00