diff options
author | dg <dg@FreeBSD.org> | 1995-12-28 23:34:30 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-12-28 23:34:30 +0000 |
commit | f1d6b97db7bdec941e896a6faf5a7e81b5462977 (patch) | |
tree | b78d1fd3da77365c8d145ba9f539c70125186a02 /sys | |
parent | 102fe26c6a99225063775f2d2056e2d663becf10 (diff) | |
download | FreeBSD-src-f1d6b97db7bdec941e896a6faf5a7e81b5462977.zip FreeBSD-src-f1d6b97db7bdec941e896a6faf5a7e81b5462977.tar.gz |
Made bzero a function vector and added a 586/686 optimized version of
bzero.
Deprecated blkclr (removed it).
Removed some old cruft from cpufunc.h.
The optimized bzero was submitted by Torbjorn Granlund <tege@matematik.su.se>
The kernel adaption and other changes by me.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/include/cpufunc.h | 62 | ||||
-rw-r--r-- | sys/i386/include/cpufunc.h | 62 | ||||
-rw-r--r-- | sys/sys/bio.h | 4 | ||||
-rw-r--r-- | sys/sys/buf.h | 4 | ||||
-rw-r--r-- | sys/sys/systm.h | 5 |
5 files changed, 8 insertions, 129 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index e82b4f0..fad829f 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.42 1995/12/03 13:45:27 bde Exp $ + * $Id: cpufunc.h,v 1.43 1995/12/19 14:30:42 davidg Exp $ */ /* @@ -329,66 +329,6 @@ void bcopyb __P((const void *from, void *to, size_t len)); void bcopyw __P((const void *from, void *to, size_t len)); void bcopyx __P((const void *from, void *to, size_t len, int stride)); - -#if 0 -/* - * These functions in support.s are declared elsewhere. - */ -void bcopy __P((const void *from, void *to, size_t len)); -void blkclr __P((void *buf, size_t len)); -void bzero __P((void *buf, size_t len)); -int copyin __P((void *udaddr, void *kaddr, size_t len)); -int copyinstr __P((void *udaddr, void *kaddr, size_t len, - size_t *lencopied)); -int copyout __P((void *kaddr, void *udaddr, size_t len)); -int copystr __P((void *kfaddr, void *kdaddr, size_t len, - size_t *lencopied)); -int fubyte __P((void *base)); -int fuswintr __P((void *base)); -int fuibyte __P((void *base)); -int fuword __P((void *base)); -struct region_descriptor; -void lgdt __P((struct region_descriptor *rdp)); -void lidt __P((struct region_descriptor *rdp)); -void lldt __P((u_short sel)); -/* - * longjmp() and setjmp() are only used by ddb. They probably shouldn't - * shouldn't be supported in the kernel. - */ -#include <setjmp.h> -void longjmp __P((jmp_buf jb, int rv)); -void ovbcopy __P((const void *from, void *to, size_t len); -int setjmp __P((jmp_buf jb)); -struct soft_segment_descriptor; -union descriptor; -int ssdtosd __P((struct soft_segment_descriptor *ssdp, - union descriptor *sdp)); -int subyte __P((void *base, int byte)); -int suibyte __P((void *base, int byte)); -int suswintr __P((void *base, int word)); -int suword __P((void *base, int word)); - -/* - * These functions in support.s are declared elsewhere, but never used. - * A silly amount of effort went into copyoutstr(). It's not worth - * maintaining, since the string length is usually known so copyout - * works better, or is easy to find so copyout() can be used. - */ -int copyoutstr __P((void *kaddr, void *udaddr, size_t len, - size_t *lencopied)); -int fuiword __P((void *base)); -int suiword __P((void *base, int word)); - -/* - * These functions in support.s are also in libkern.a and are declared in - * libkern.h. - * ffs() is built in to gcc-2 and was buggy in gcc-2.4.5 so we may may the - * buggy version if we don't replace it by an inline. - */ -int bcmp __P((const void *b1, const void *b2, size_t length)); -int ffs __P((int mask)); -#endif /* 0 */ - /* * These variables and functions in support.s are used. */ diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index e82b4f0..fad829f 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cpufunc.h,v 1.42 1995/12/03 13:45:27 bde Exp $ + * $Id: cpufunc.h,v 1.43 1995/12/19 14:30:42 davidg Exp $ */ /* @@ -329,66 +329,6 @@ void bcopyb __P((const void *from, void *to, size_t len)); void bcopyw __P((const void *from, void *to, size_t len)); void bcopyx __P((const void *from, void *to, size_t len, int stride)); - -#if 0 -/* - * These functions in support.s are declared elsewhere. - */ -void bcopy __P((const void *from, void *to, size_t len)); -void blkclr __P((void *buf, size_t len)); -void bzero __P((void *buf, size_t len)); -int copyin __P((void *udaddr, void *kaddr, size_t len)); -int copyinstr __P((void *udaddr, void *kaddr, size_t len, - size_t *lencopied)); -int copyout __P((void *kaddr, void *udaddr, size_t len)); -int copystr __P((void *kfaddr, void *kdaddr, size_t len, - size_t *lencopied)); -int fubyte __P((void *base)); -int fuswintr __P((void *base)); -int fuibyte __P((void *base)); -int fuword __P((void *base)); -struct region_descriptor; -void lgdt __P((struct region_descriptor *rdp)); -void lidt __P((struct region_descriptor *rdp)); -void lldt __P((u_short sel)); -/* - * longjmp() and setjmp() are only used by ddb. They probably shouldn't - * shouldn't be supported in the kernel. - */ -#include <setjmp.h> -void longjmp __P((jmp_buf jb, int rv)); -void ovbcopy __P((const void *from, void *to, size_t len); -int setjmp __P((jmp_buf jb)); -struct soft_segment_descriptor; -union descriptor; -int ssdtosd __P((struct soft_segment_descriptor *ssdp, - union descriptor *sdp)); -int subyte __P((void *base, int byte)); -int suibyte __P((void *base, int byte)); -int suswintr __P((void *base, int word)); -int suword __P((void *base, int word)); - -/* - * These functions in support.s are declared elsewhere, but never used. - * A silly amount of effort went into copyoutstr(). It's not worth - * maintaining, since the string length is usually known so copyout - * works better, or is easy to find so copyout() can be used. - */ -int copyoutstr __P((void *kaddr, void *udaddr, size_t len, - size_t *lencopied)); -int fuiword __P((void *base)); -int suiword __P((void *base, int word)); - -/* - * These functions in support.s are also in libkern.a and are declared in - * libkern.h. - * ffs() is built in to gcc-2 and was buggy in gcc-2.4.5 so we may may the - * buggy version if we don't replace it by an inline. - */ -int bcmp __P((const void *b1, const void *b2, size_t length)); -int ffs __P((int mask)); -#endif /* 0 */ - /* * These variables and functions in support.s are used. */ diff --git a/sys/sys/bio.h b/sys/sys/bio.h index c25eb6c..e0c260a 100644 --- a/sys/sys/bio.h +++ b/sys/sys/bio.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)buf.h 8.7 (Berkeley) 1/21/94 - * $Id: buf.h,v 1.24 1995/11/20 12:35:16 phk Exp $ + * $Id: buf.h,v 1.25 1995/12/11 04:57:20 dyson Exp $ */ #ifndef _SYS_BUF_H_ @@ -179,7 +179,7 @@ extern TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES]; * Zero out the buffer's data area. */ #define clrbuf(bp) { \ - blkclr((bp)->b_data, (u_int)(bp)->b_bcount); \ + bzero((bp)->b_data, (u_int)(bp)->b_bcount); \ (bp)->b_resid = 0; \ } diff --git a/sys/sys/buf.h b/sys/sys/buf.h index c25eb6c..e0c260a 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)buf.h 8.7 (Berkeley) 1/21/94 - * $Id: buf.h,v 1.24 1995/11/20 12:35:16 phk Exp $ + * $Id: buf.h,v 1.25 1995/12/11 04:57:20 dyson Exp $ */ #ifndef _SYS_BUF_H_ @@ -179,7 +179,7 @@ extern TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES]; * Zero out the buffer's data area. */ #define clrbuf(bp) { \ - blkclr((bp)->b_data, (u_int)(bp)->b_bcount); \ + bzero((bp)->b_data, (u_int)(bp)->b_bcount); \ (bp)->b_resid = 0; \ } diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 5515a06..3d73db3 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)systm.h 8.4 (Berkeley) 2/23/94 - * $Id: systm.h,v 1.26 1995/10/08 00:06:22 swallace Exp $ + * $Id: systm.h,v 1.27 1995/11/09 09:23:05 bde Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -125,8 +125,7 @@ void kprintf __P((const char *fmt, int flags, struct tty *tp, va_list ap)); void bcopy __P((const void *from, void *to, size_t len)); void ovbcopy __P((const void *from, void *to, size_t len)); -void blkclr __P((void *buf, u_int len)); -void bzero __P((void *buf, size_t len)); +void (*bzero) __P((void *buf, size_t len)); void *memcpy __P((void *to, const void *from, size_t len)); |