code: 9ferno

ref: 0977f294bab0345ba43fbf674449fd8e996c5719
dir: /lib9/lock-Nt-386.c/

View raw version
#include "lib9.h"

int
_tas(int *la)
{
	int v;

	_asm {
		mov eax, la
		mov ebx, 1
		xchg	ebx, [eax]
		mov	v, ebx
	}
	return v;
}