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

Function atomic_fetchadd_int

freebsd/i386/include/atomic.h:238–250  ·  view source on GitHub ↗

* Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. */

Source from the content-addressed store, hash-verified

236 * the previous value of *p.
237 */
238static __inline u_int
239atomic_fetchadd_int(volatile u_int *p, u_int v)
240{
241
242 __asm __volatile(
243 " " MPLOCKED " "
244 " xaddl %0,%1 ; "
245 "# atomic_fetchadd_int"
246 : "+r" (v), /* 0 */
247 "+m" (*p) /* 1 */
248 : : "cc");
249 return (v);
250}
251
252static __inline int
253atomic_testandset_int(volatile u_int *p, u_int v)

Callers 15

atomic_fetchadd_longFunction · 0.70
atomic_incFunction · 0.50
atomic_decFunction · 0.50
atomic_add_returnFunction · 0.50
atomic_sub_returnFunction · 0.50
sctp_move_to_outqueueFunction · 0.50
tcp_pcap_addFunction · 0.50
udp_attachFunction · 0.50
syncache_addFunction · 0.50
tcp_log_increment_reqcntFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected