MCPcopy Create free account
hub / github.com/F-Stack/f-stack / counter_u64_read_one_8b

Function counter_u64_read_one_8b

freebsd/i386/include/counter.h:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76};
77
78static uint64_t
79counter_u64_read_one_8b(uint64_t *p)
80{
81 uint32_t res_lo, res_high;
82
83 __asm __volatile(
84 "movl %%eax,%%ebx\n\t"
85 "movl %%edx,%%ecx\n\t"
86 "cmpxchg8b (%2)"
87 : "=a" (res_lo), "=d"(res_high)
88 : "SD" (p)
89 : "cc", "ebx", "ecx");
90 return (res_lo + ((uint64_t)res_high << 32));
91}
92
93static void
94counter_u64_fetch_cx8_one(void *arg1)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected