Rizin
unix-like reverse engineering framework and cli tools
atomicops-inl.h File Reference
#include "uv.h"
#include "internal.h"

Go to the source code of this file.

Functions

static char uv__atomic_exchange_set (char volatile *target)
 

Function Documentation

◆ uv__atomic_exchange_set()

static char uv__atomic_exchange_set ( char volatile target)
inlinestatic

Definition at line 45 of file atomicops-inl.h.

45  {
46  const char one = 1;
47  char old_value;
48  __asm__ __volatile__ ("lock xchgb %0, %1\n\t"
49  : "=r"(old_value), "=m"(*target)
50  : "0"(one), "m"(*target)
51  : "memory");
52  return old_value;
53 }

Referenced by uv_async_send().