* Atomically add the value of v to the integer pointed to by p and return * the previous value of *p. */
| 236 | * the previous value of *p. |
| 237 | */ |
| 238 | static __inline u_int |
| 239 | atomic_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 | |
| 252 | static __inline int |
| 253 | atomic_testandset_int(volatile u_int *p, u_int v) |
no outgoing calls
no test coverage detected