MCPcopy Create free account
hub / github.com/facebook/time / StoreFBClockDataRealtime

Function StoreFBClockDataRealtime

fbclock/shmem.go:272–279  ·  view source on GitHub ↗

StoreFBClockDataRealtime stores the realtime anchor section, used on hosts whose primary is MONOTONIC_RAW. It's a separate call from StoreFBClockDataV2 so the daemon can publish the primary anchor before the slower REALTIME read.

(fd uintptr, d DataV2)

Source from the content-addressed store, hash-verified

270// whose primary is MONOTONIC_RAW. It's a separate call from StoreFBClockDataV2
271// so the daemon can publish the primary anchor before the slower REALTIME read.
272func StoreFBClockDataRealtime(fd uintptr, d DataV2) error {
273 // fbclock_clockdata_store_data_realtime comes from fbclock.c
274 res := C.fbclock_clockdata_store_data_realtime(C.uint(fd), clockDataV2ToC(d))
275 if res != 0 {
276 return fmt.Errorf("failed to store realtime data: %s", strerror(res))
277 }
278 return nil
279}
280
281// ReadFBClockDataV2 reads the primary anchor section. Used in tests only.
282func ReadFBClockDataV2(shmp unsafe.Pointer) (*DataV2, error) {

Callers

nothing calls this directly

Calls 2

clockDataV2ToCFunction · 0.85
strerrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…