summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/i386/__testandset.S
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/i386/__testandset.S')
-rw-r--r--mdk-stage1/dietlibc/i386/__testandset.S8
1 files changed, 8 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/i386/__testandset.S b/mdk-stage1/dietlibc/i386/__testandset.S
new file mode 100644
index 000000000..af7b4d5a0
--- /dev/null
+++ b/mdk-stage1/dietlibc/i386/__testandset.S
@@ -0,0 +1,8 @@
+.text
+.global __testandset
+__testandset:
+ xorl %eax, %eax
+ movl 0x4(%esp),%edx
+ incl %eax
+ xchgl %eax,(%edx)
+ ret