diff options
author | marcel <marcel@FreeBSD.org> | 1999-09-29 15:18:46 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-09-29 15:18:46 +0000 |
commit | 5bf7ce284b3edfc7459435005d0f04edf673cb6f (patch) | |
tree | 81a2f1cf31c40a034fe5b493fc79d27fda808958 /lib/libc/amd64 | |
parent | bd000d73ad75473ad7201663ffb27c36ab130f0e (diff) | |
download | FreeBSD-src-5bf7ce284b3edfc7459435005d0f04edf673cb6f.zip FreeBSD-src-5bf7ce284b3edfc7459435005d0f04edf673cb6f.tar.gz |
sigset_t change (part 5 of 5)
-----------------------------
Most of the userland changes are in libc. For both the alpha
and the i386 setjmp has been changed to accomodate for the
new sigset_t. Internally, libc is mostly rewritten to use the
new syscalls. The exception is in compat-43/sigcompat.c
The POSIX thread library has also been rewritten to use the
new sigset_t. Except, that it currently only handles NSIG
signals instead of the maximum _SIG_MAXSIG. This should not
be a problem because current applications don't use any
signals higher than NSIG.
There are version bumps for the following libraries:
libdialog
libreadline
libc
libc_r
libedit
libftpio
libss
These libraries either a) have one of the modified structures
visible in the interface, or b) use sigset_t internally and
may cause breakage if new binaries are used against libraries
that don't have the sigset_t change. This not an immediate
issue, but will be as soon as applications start using the
new range to its fullest.
NOTE: libncurses already had an version bump and has not been
given one now.
NOTE: doscmd is a real casualty and has been disconnected for
the moment. Reconnection will eventually happen after
doscmd has been fixed. I'm aware that being the last one
to touch it, I'm automaticly promoted to being maintainer.
According to good taste this means that I will receive a
badge which either will be glued or mechanically stapled,
drilled or otherwise violently forced onto me :-)
NOTE: pcvt/vttest cannot be compiled with -traditional. The
change cause sys/types to be included along the way which
contains the const and volatile modifiers. I don't consider
this a solution, but more a workaround.
Diffstat (limited to 'lib/libc/amd64')
-rw-r--r-- | lib/libc/amd64/gen/_setjmp.S | 4 | ||||
-rw-r--r-- | lib/libc/amd64/gen/setjmp.S | 30 | ||||
-rw-r--r-- | lib/libc/amd64/gen/sigsetjmp.S | 39 | ||||
-rw-r--r-- | lib/libc/amd64/sys/Makefile.inc | 7 |
4 files changed, 46 insertions, 34 deletions
diff --git a/lib/libc/amd64/gen/_setjmp.S b/lib/libc/amd64/gen/_setjmp.S index 39ad5ac..c8a1d21 100644 --- a/lib/libc/amd64/gen/_setjmp.S +++ b/lib/libc/amd64/gen/_setjmp.S @@ -62,7 +62,7 @@ ENTRY(_setjmp) movl %ebp,12(%eax) movl %esi,16(%eax) movl %edi,20(%eax) - fnstcw 28(%eax) + fnstcw 24(%eax) xorl %eax,%eax ret @@ -76,7 +76,7 @@ ENTRY(_longjmp) movl 16(%edx),%esi movl 20(%edx),%edi fninit - fldcw 28(%edx) + fldcw 24(%edx) testl %eax,%eax jnz 1f incl %eax diff --git a/lib/libc/amd64/gen/setjmp.S b/lib/libc/amd64/gen/setjmp.S index 0dfdde9..e70879a 100644 --- a/lib/libc/amd64/gen/setjmp.S +++ b/lib/libc/amd64/gen/setjmp.S @@ -56,15 +56,19 @@ ENTRY(setjmp) PIC_PROLOGUE - pushl $0 + movl 4(%esp),%ecx + leal 28(%ecx), %eax + pushl %eax /* (sigset_t*)oset */ + pushl $0 /* (sigset_t*)set */ + pushl $1 /* SIG_BLOCK */ #ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigblock)) + call PIC_PLT(CNAME(_thread_sys_sigprocmask)) #else - call PIC_PLT(CNAME(sigblock)) + call PIC_PLT(CNAME(sigprocmask)) #endif - popl %edx + addl $12,%esp PIC_EPILOGUE - movl 4(%esp),%ecx + movl 4(%esp),%ecx movl 0(%esp),%edx movl %edx, 0(%ecx) movl %ebx, 4(%ecx) @@ -72,21 +76,23 @@ ENTRY(setjmp) movl %ebp,12(%ecx) movl %esi,16(%ecx) movl %edi,20(%ecx) - movl %eax,24(%ecx) - fnstcw 28(%ecx) + fnstcw 24(%ecx) xorl %eax,%eax ret ENTRY(longjmp) movl 4(%esp),%edx PIC_PROLOGUE - pushl 24(%edx) + pushl $0 /* (sigset_t*)oset */ + leal 28(%edx), %eax + pushl %eax /* (sigset_t*)set */ + pushl $3 /* SIG_SETMASK */ #ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigsetmask)) + call PIC_PLT(CNAME(_thread_sys_sigprocmask)) #else - call PIC_PLT(CNAME(sigsetmask)) /* XXX this is not reentrant */ + call PIC_PLT(CNAME(sigprocmask)) #endif - popl %eax + addl $12,%esp PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax @@ -97,7 +103,7 @@ ENTRY(longjmp) movl 16(%edx),%esi movl 20(%edx),%edi fninit - fldcw 28(%edx) + fldcw 24(%edx) testl %eax,%eax jnz 1f incl %eax diff --git a/lib/libc/amd64/gen/sigsetjmp.S b/lib/libc/amd64/gen/sigsetjmp.S index c3f98ff..9aa32f4 100644 --- a/lib/libc/amd64/gen/sigsetjmp.S +++ b/lib/libc/amd64/gen/sigsetjmp.S @@ -61,21 +61,23 @@ ENTRY(sigsetjmp) movl 8(%esp),%eax - movl 4(%esp),%ecx - movl %eax,32(%ecx) + movl 4(%esp),%ecx + movl %eax,44(%ecx) testl %eax,%eax jz 2f PIC_PROLOGUE - pushl $0 + leal 28(%ecx), %eax + pushl %eax /* (sigset_t*)oset */ + pushl $0 /* (sigset_t*)set */ + pushl $1 /* SIG_BLOCK */ #ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigblock)) + call PIC_PLT(CNAME(_thread_sys_sigprocmask)) #else - call PIC_PLT(CNAME(sigblock)) + call PIC_PLT(CNAME(sigprocmask)) #endif - addl $4,%esp + addl $12,%esp PIC_EPILOGUE - movl 4(%esp),%ecx - movl %eax,24(%ecx) + movl 4(%esp),%ecx 2: movl 0(%esp),%edx movl %edx, 0(%ecx) movl %ebx, 4(%ecx) @@ -83,25 +85,28 @@ ENTRY(sigsetjmp) movl %ebp,12(%ecx) movl %esi,16(%ecx) movl %edi,20(%ecx) - fnstcw 28(%ecx) + fnstcw 24(%ecx) xorl %eax,%eax ret ENTRY(siglongjmp) movl 4(%esp),%edx - cmpl $0,32(%edx) + cmpl $0,44(%edx) jz 2f PIC_PROLOGUE - pushl 24(%edx) + pushl $0 /* (sigset_t*)oset */ + leal 28(%edx), %eax + pushl %eax /* (sigset_t*)set */ + pushl $3 /* SIG_SETMASK */ #ifdef _THREAD_SAFE - call PIC_PLT(CNAME(_thread_sys_sigsetmask)) + call PIC_PLT(CNAME(_thread_sys_sigprocmask)) #else - call PIC_PLT(CNAME(sigsetmask)) + call PIC_PLT(CNAME(sigprocmask)) #endif - addl $4,%esp + addl $12,%esp PIC_EPILOGUE -2: movl 4(%esp),%edx - movl 8(%esp),%eax + movl 4(%esp),%edx +2: movl 8(%esp),%eax movl 0(%edx),%ecx movl 4(%edx),%ebx movl 8(%edx),%esp @@ -109,7 +114,7 @@ ENTRY(siglongjmp) movl 16(%edx),%esi movl 20(%edx),%edi fninit - fldcw 28(%edx) + fldcw 24(%edx) testl %eax,%eax jnz 1f incl %eax diff --git a/lib/libc/amd64/sys/Makefile.inc b/lib/libc/amd64/sys/Makefile.inc index 30081e8..734e15a 100644 --- a/lib/libc/amd64/sys/Makefile.inc +++ b/lib/libc/amd64/sys/Makefile.inc @@ -5,15 +5,16 @@ SRCS+= i386_get_ioperm.c i386_get_ldt.c i386_set_ioperm.c i386_set_ldt.c \ i386_vm86.c MDASM= Ovfork.S brk.S cerror.S exect.S fork.S pipe.S \ - ptrace.S reboot.S rfork.S sbrk.S setlogin.S sigpending.S \ - sigprocmask.S sigreturn.S sigsuspend.S syscall.S + ptrace.S reboot.S rfork.S sbrk.S setlogin.S sigreturn.S syscall.S +# sigpending.S sigprocmask.S sigsuspend.S # Don't generate default code for these syscalls: NOASM= __semctl.o break.o exit.o ftruncate.o getdomainname.o getlogin.o \ lseek.o mlockall.o mmap.o msgctl.o msgget.o msgrcv.o msgsnd.o \ munlockall.o openbsd_poll.o pread.o pwrite.o semconfig.o semget.o \ semop.o setdomainname.o shmat.o shmctl.o shmdt.o shmget.o sstk.o \ - thr_sleep.o thr_wakeup.o truncate.o uname.o vfork.o yield.o + thr_sleep.o thr_wakeup.o truncate.o uname.o vfork.o yield.o \ + osigpending.o osigprocmask.o osigsuspend.o PSEUDO= _getlogin.o |