* 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.
This commit is contained in:
Christopher Faylor
2004-02-09 04:04:24 +00:00
parent 733309f576
commit cec4879206
67 changed files with 116 additions and 95 deletions

View File

@@ -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