Home > Back-end >  Help to have a look at this period of inline assembler code
Help to have a look at this period of inline assembler code

Time:11-24

The static ngx_inline ngx_atomic_int_t
Ngx_atomic_fetch_add (ngx_atomic_t * value, ngx_atomic_int_t add)
{
Ngx_atomic_uint_t old, res;

Old=* value;

For (;; ) {

Res=old + add;

__asm__ volatile (

NGX_CASA "[% 1] 0 x80, % 2, % 0"//important part is the period of "assembly statement template"

: "+ r" (res) : "r" (value), the "r" (old) : "memory");

If (res==old) {
return res;
}

Old=res;
}
}

CodePudding user response:

NGX_CASA may be a macro, you look at the definition of it

CodePudding user response:

IDE the right mouse button point don't understand the identifier NGX_CASA, choose to define,
  • Related