Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Unified Diff: fusl/src/thread/i386/__set_thread_area.s

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/src/thread/cnd_wait.c ('k') | fusl/src/thread/i386/__unmapself.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/thread/i386/__set_thread_area.s
diff --git a/fusl/src/thread/i386/__set_thread_area.s b/fusl/src/thread/i386/__set_thread_area.s
new file mode 100644
index 0000000000000000000000000000000000000000..3a558fb08bba03f9c63a24bb2ad2ada2495e3493
--- /dev/null
+++ b/fusl/src/thread/i386/__set_thread_area.s
@@ -0,0 +1,45 @@
+.text
+.global __set_thread_area
+.type __set_thread_area,@function
+__set_thread_area:
+ push %ebx
+ push $0x51
+ push $0xfffff
+ push 16(%esp)
+ call 1f
+1: addl $4f-1b,(%esp)
+ pop %ecx
+ mov (%ecx),%edx
+ push %edx
+ mov %esp,%ebx
+ xor %eax,%eax
+ mov $243,%al
+ int $128
+ testl %eax,%eax
+ jnz 2f
+ movl (%esp),%edx
+ movl %edx,(%ecx)
+ leal 3(,%edx,8),%edx
+3: movw %dx,%gs
+1:
+ addl $16,%esp
+ popl %ebx
+ ret
+2:
+ mov %ebx,%ecx
+ xor %ebx,%ebx
+ xor %edx,%edx
+ mov %ebx,(%esp)
+ mov $1,%bl
+ mov $16,%dl
+ mov $123,%al
+ int $128
+ testl %eax,%eax
+ jnz 1b
+ mov $7,%dl
+ inc %al
+ jmp 3b
+
+.data
+ .align 4
+4: .long -1
« no previous file with comments | « fusl/src/thread/cnd_wait.c ('k') | fusl/src/thread/i386/__unmapself.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698