wire / wire-format / eventfd-counter
An eventfd file descriptor holds a 64-bit counter. read(2) returns the counter (and resets it to 0 unless EFD_SEMAPHORE); write(2) adds to it; poll(2) signals readability when the counter is nonzero. The on-the-wire representation is just the 8-byte little-endian counter value.
aka: eventfd 8-byte counter
spec: Linux kernel (eventfd)
An eventfd file descriptor holds a 64-bit counter. read(2) returns the counter (and resets it to 0 unless EFD_SEMAPHORE); write(2) adds to it; poll(2) signals readability when the counter is nonzero. The on-the-wire representation is just the 8-byte little-endian counter value.
| field | size | meaning |
|---|---|---|
| counter | 8 bytes (__u64) | The counter value (little-endian). read returns this and resets to 0 (or decrements by 1 with EFD_SEMAPHORE). write adds the written value to the counter. |
example:
00 00 00 00 00 00 00 00
eventfd counter = 0 (not readable)
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/eventfd-counter
or /wire-format/eventfd-counter.json