您如何解释该程序集?
|
从nginx中提取:
static ngx_inline ngx_atomic_uint_t
ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old,
ngx_atomic_uint_t set)
{
u_char res;
__asm__ volatile (
NGX_SMP_LOCK
\" cmpxchgl %3, %1; \"
\" sete %0; \"
: \"=a\" (res) : \"m\" (*lock), \"a\" (old), \"r\" (set) : \"cc\", \"memory\");
return res;
}
我不理解汇编指令被组合的语法(它使用的语法与printf
使用的语法不同),它到底在做什么?
没有找到相关结果
已邀请:
1 个回复
伞腹