MCPcopy Create free account
hub / github.com/apple/foundationdb / Pack

Function Pack

contrib/stacktrace/stacktrace.amalgamation.cpp:2185–2188  ·  view source on GitHub ↗

Pack a pid and two file descriptors into a 64-bit word, using 16, 24, and 24 bits for each respectively.

Source from the content-addressed store, hash-verified

2183// Pack a pid and two file descriptors into a 64-bit word,
2184// using 16, 24, and 24 bits for each respectively.
2185static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) {
2186 ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, "fd out of range");
2187 return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff);
2188}
2189
2190// Unpack x into a pid and two file descriptors, where x was created with
2191// Pack().

Callers 1

AddressIsReadableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected