Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-09 07:04:24 +0300
committerChristopher Faylor <me@cgf.cx>2004-02-09 07:04:24 +0300
commitcec4879206f2158d19eccdf5395b551da7c22cb3 (patch)
tree9360159e144fab21242d60375653ef2def3206ef /winsup/cygwin/gendef
parent733309f5761d777a61b8db86e734fbffc236f104 (diff)
* debug.h (console_printf): Define for non-debugging condition.
* cygtls.h (_threadinfo::lock): Remove wait argument. (_threadinfo::interrupt_setup): Remove retaddr argument. * exceptions.cc (_threadinfo::interrupt_setup): Ditto. (_threadinfo::interrupt_now): Accommodate change to interrupt_setup argument. (setup_handler): Ditto. Always lock sig stack prior to determining interrupt method. * gendef (_sigfe): Correct thinko regarding cmpxchg. (_sigbe): Ditto. (_threadinfo::lock): Ditto. (_threadinfo::pop): Eliminate left-over stack unlock. * sigproc.cc (proc_subproc): Chnage debugging output to printed warning.
Diffstat (limited to 'winsup/cygwin/gendef')
-rwxr-xr-xwinsup/cygwin/gendef29
1 files changed, 15 insertions, 14 deletions
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index 2457314b2..b391d501e 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -94,8 +94,9 @@ __sigfe:
pushl %edx
movl %fs:4,%edx
1: movl \$1,%eax
- lock cmpxchg %eax,$tls::stacklock(%edx)
- jne 2f
+ lock xchgl %eax,$tls::stacklock(%edx)
+ cmpl %eax,%eax
+ jz 2f
xorl %eax,%eax
call _low_priority_sleep
jmp 1b
@@ -103,7 +104,7 @@ __sigfe:
xadd %eax,$tls::stackptr(%edx)
decl $tls::stacklock(%edx)
leal __sigbe,%edx
- xchg %edx,8(%esp)
+ xchgl %edx,8(%esp)
movl %edx,(%eax)
popl %edx
ret
@@ -115,15 +116,17 @@ __sigbe:
pushl %eax
movl %fs:4,%edx
1: movl \$1,%eax
- lock cmpxchg %eax,$tls::stacklock(%edx)
- jne 2f
+ lock xchgl %eax,$tls::stacklock(%edx)
+ cmpl %eax,%eax
+ jz 2f
xorl %eax,%eax
call _low_priority_sleep
jmp 1b
2: movl \$-4,%eax
xadd %eax,$tls::stackptr(%edx)
- xchg %edx,-4(%eax)
- xchg %edx,4(%esp)
+ decl $tls::stacklock(%edx)
+ xchgl %edx,-4(%eax)
+ xchgl %edx,4(%esp)
popl %eax
ret
@@ -134,19 +137,17 @@ __ZN11_threadinfo3popEv:
movl \$-4,%ebx
xadd %ebx,$tls::pstackptr(%edx)
xorl %eax,%eax
- xchg %eax,-4(%ebx)
- decl $tls::pstacklock(%edx)
+ xchgl %eax,-4(%ebx)
popl %ebx
ret
- .global __ZN11_threadinfo4lockEi
-__ZN11_threadinfo4lockEi:
+ .global __ZN11_threadinfo4lockEv
+__ZN11_threadinfo4lockEv:
pushl %ebx
movl %eax,%ebx
1: movl \$1,%eax
- lock cmpxchg %eax,$tls::pstacklock(%ebx)
- jne 2f
- cmpl %edx,%edx
+ lock xchgl %eax,$tls::pstacklock(%ebx)
+ cmpl %eax,%eax
jz 2f
xorl %eax,%eax
call _low_priority_sleep