diff options
Diffstat (limited to 'lib/libpthread/machdep')
25 files changed, 0 insertions, 2208 deletions
diff --git a/lib/libpthread/machdep/engine-alpha-netbsd-1.3.c b/lib/libpthread/machdep/engine-alpha-netbsd-1.3.c deleted file mode 100644 index 0932c421ea2..00000000000 --- a/lib/libpthread/machdep/engine-alpha-netbsd-1.3.c +++ /dev/null @@ -1,204 +0,0 @@ -/* ==== machdep.c ============================================================ - * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu - * - * Description : Machine dependent functions for NetBSD/Alpha 1.1(+) - * - * 1.00 93/08/04 proven - * -Started coding this file. - * - * 95/04/22 cgd - * -Modified to make it go with NetBSD/Alpha - */ - -#ifndef lint -static const char rcsid[] = "engine-alpha-osf1.c,v 1.4.4.1 1995/12/13 05:41:37 proven Exp"; -#endif - -#include <pthread.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/syscall.h> -#include <stdlib.h> -#include <fcntl.h> -#include <stdio.h> - -/* ========================================================================== - * machdep_save_state() - */ -int machdep_save_state(void) -{ - return __machdep_save_int_state(pthread_run->machdep_data.machdep_istate); -} - -void machdep_restore_state(void) -{ - __machdep_restore_int_state(pthread_run->machdep_data.machdep_istate); -} - -void machdep_save_float_state (void) -{ - __machdep_save_fp_state(pthread_run->machdep_data.machdep_fstate); -} - -void machdep_restore_float_state (void) -{ - __machdep_restore_fp_state(pthread_run->machdep_data.machdep_fstate); -} - -/* ========================================================================== - * machdep_set_thread_timer() - */ -void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread) -{ - if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) { - PANIC(); - } -} - -/* ========================================================================== - * machdep_unset_thread_timer() - */ -void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread) -{ - struct itimerval zeroval = { { 0, 0 }, { 0, 0} }; - - if (setitimer(ITIMER_VIRTUAL, &zeroval, NULL)) { - PANIC(); - } -} - -/* ========================================================================== - * machdep_pthread_cleanup() - */ -void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread) -{ - return(machdep_pthread->machdep_stack); -} - -/* ========================================================================== - * machdep_pthread_start() - */ -void machdep_pthread_start(void) -{ - context_switch_done(); - pthread_sched_resume (); - - /* Run current threads start routine with argument */ - pthread_exit(pthread_run->machdep_data.start_routine - (pthread_run->machdep_data.start_argument)); - - /* should never reach here */ - PANIC(); -} - -/* ========================================================================== - * __machdep_stack_free() - */ -void __machdep_stack_free(void * stack) -{ - free(stack); -} - -/* ========================================================================== - * __machdep_stack_alloc() - */ -void * __machdep_stack_alloc(size_t size) -{ - void * stack; - - return(malloc(size)); -} - -/* ========================================================================== - * __machdep_pthread_create() - */ -void __machdep_pthread_create(struct machdep_pthread *machdep_pthread, - void *(* start_routine)(), void *start_argument, - long stack_size, long nsec, long flags) -{ - machdep_pthread->start_routine = start_routine; - machdep_pthread->start_argument = start_argument; - - machdep_pthread->machdep_timer.it_value.tv_sec = 0; - machdep_pthread->machdep_timer.it_interval.tv_sec = 0; - machdep_pthread->machdep_timer.it_interval.tv_usec = 0; - machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000; - - /* Set up new stack frame so that it looks like it returned from a - longjmp() to the beginning of machdep_pthread_start(). */ - machdep_pthread->machdep_istate[8/*ISTATE_RA*/] = 0; - machdep_pthread->machdep_istate[0/*ISTATE_PC*/] = (long)machdep_pthread_start; - machdep_pthread->machdep_istate[10/*ISTATE_PV*/] = (long)machdep_pthread_start; - - /* Alpha stack starts high and builds down. */ - { - long stk_addr = (long) machdep_pthread->machdep_stack; - stk_addr += stack_size - 1024; - stk_addr &= ~15; - machdep_pthread->machdep_istate[9/*ISTATE_SP*/] = stk_addr; - } -} - -int safe_store (loc, new) - int *loc; - int new; -{ - int locked, old; - asm ("mb" : : : "memory"); - do { - asm ("ldl_l %0,%1" : "=r" (old) : "m" (*loc)); - asm ("stl_c %0,%1" : "=r" (locked), "=m" (*loc) : "0" (new)); - } while (!locked); - asm ("mb" : : : "memory"); - return old; -} - -/* ========================================================================== - * machdep_sys_creat() - */ -machdep_sys_creat(char * path, int mode) -{ - return(machdep_sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); -} - -/* ========================================================================== - * machdep_sys_wait3() - */ -machdep_sys_wait3(int * b, int c, int * d) -{ - return(machdep_sys_wait4(0, b, c, d)); -} - -/* ========================================================================== - * machdep_sys_waitpid() - */ -machdep_sys_waitpid(int a, int * b, int c) -{ - return(machdep_sys_wait4(a, b, c, NULL)); -} - -/* ========================================================================== - * machdep_sys_getdtablesize() - */ -machdep_sys_getdtablesize() -{ - return(sysconf(_SC_OPEN_MAX)); -} - -/* ========================================================================== - * machdep_sys_lseek() - */ -off_t machdep_sys_lseek(int fd, off_t offset, int whence) -{ - extern off_t __syscall(); - - return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence)); -} - -/* ========================================================================== - * machdep_sys_getdirentries() - */ -machdep_sys_getdirentries(int fd, char * buf, int len, int * seek) -{ - return(machdep_sys_getdents(fd, buf, len)); -} diff --git a/lib/libpthread/machdep/engine-alpha-netbsd-1.3.h b/lib/libpthread/machdep/engine-alpha-netbsd-1.3.h deleted file mode 100644 index 50c872da7b6..00000000000 --- a/lib/libpthread/machdep/engine-alpha-netbsd-1.3.h +++ /dev/null @@ -1,111 +0,0 @@ -/* ==== machdep.h ============================================================ - * Copyright (c) 1994 Chris Provenzano (proven@athena.mit.edu) and - * Ken Raeburn (raeburn@mit.edu). - * - * engine-alpha-osf1.h,v 1.4.4.1 1995/12/13 05:41:42 proven Exp - * - */ - -#include <unistd.h> -#include <setjmp.h> -#include <sys/time.h> -#include <sys/cdefs.h> - -/* The first machine dependent functions are the SEMAPHORES needing - the test and set instruction. - - On the Alpha, the actual values here are irrelevant; they just have - to be different. */ -#define SEMAPHORE_CLEAR 0 -#define SEMAPHORE_SET 1 - -#if 0 -#define SEMAPHORE_TEST_AND_SET(lock) \ -({ int *_sem_lock = (lock), locked, old; \ - asm ("mb" : : : "memory"); \ - do { asm ("ldl_l %0,%1" : "=r" (old) : "m" (*_sem_lock)); \ - /* ?? if (old != SEMAPHORE_CLEAR) break; */ \ - asm ("stl_c %0,%1" : "=r" (locked), "=m" (*_sem_lock) \ - : "0" (SEMAPHORE_SET)); \ - } while (!locked); \ - asm ("mb" : : : "memory"); \ - old == SEMAPHORE_CLEAR; }) - -#define SEMAPHORE_RESET(lock) \ -({ int *_sem_lock = (lock); \ - *_sem_lock = SEMAPHORE_CLEAR; \ - asm ("mb" : : : "memory"); }) -#endif - -/* - * New types - */ -typedef int semaphore; - -/* - * sigset_t macros - */ -#define SIG_ANY(sig) (sig) -#define SIGMAX 31 - -/* - * New Strutures - */ -struct machdep_pthread { - void *(*start_routine)(void *); - void *start_argument; - void *machdep_stack; - struct itimerval machdep_timer; - unsigned long machdep_istate[11]; - unsigned long machdep_fstate[9]; -}; - -/* - * Static machdep_pthread initialization values. - * For initial thread only. - */ -#define MACHDEP_PTHREAD_INIT \ - { NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } - -/* - * Minimum stack size - */ -#define PTHREAD_STACK_MIN 2048 - -/* - * Some fd flag defines that are necessary to distinguish between posix - * behavior and bsd4.3 behavior. - */ -#define __FD_NONBLOCK O_NONBLOCK - -/* - * New functions - */ - -__BEGIN_DECLS - -#if defined(PTHREAD_KERNEL) - -#define __machdep_stack_get(x) (x)->machdep_stack -#define __machdep_stack_set(x, y) (x)->machdep_stack = y -#define __machdep_stack_repl(x, y) \ -{ \ - if (stack = __machdep_stack_get(x)) { \ - __machdep_stack_free(stack); \ - } \ - __machdep_stack_set(x, y); \ -} - -void * __machdep_stack_alloc __P_((size_t)); -void __machdep_stack_free __P_((void *)); - -int machdep_save_state __P_((void)); - -int __machdep_save_int_state __P_((unsigned long *)); -void __machdep_restore_int_state __P_((unsigned long *)); -void __machdep_save_fp_state __P_((unsigned long *)); -void __machdep_restore_fp_state __P_((unsigned long *)); - -#endif - -__END_DECLS diff --git a/lib/libpthread/machdep/engine-i386-openbsd-2.0.c b/lib/libpthread/machdep/engine-i386-openbsd-2.0.c deleted file mode 100644 index 09ff0072fdc..00000000000 --- a/lib/libpthread/machdep/engine-i386-openbsd-2.0.c +++ /dev/null @@ -1,215 +0,0 @@ -/* ==== machdep.c ============================================================ - * Copyright (c) 1995 by Chris Provenzano, proven@mit.edu - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Chris Provenzano. - * 4. The name of Chris Provenzano may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Description : Machine dependent functions for NetBSD on i386 - * - * 1.00 93/08/04 proven - * -Started coding this file. - */ - -#ifndef lint -static const char rcsid[] = "engine-i386-freebsd-2.0.c,v 1.1 1995/03/01 01:21:20 proven Exp"; -#endif - -#include <pthread.h> -#include <sys/types.h> -#include <sys/socket.h> -#include <stdlib.h> -#include <fcntl.h> -#include <stdio.h> - -/* ========================================================================== - * machdep_save_state() - */ -int machdep_save_state(void) -{ - return(machdep_sys_setjmp(pthread_run->machdep_data.machdep_state)); -} - -/* ========================================================================== - * machdep_save_state() - */ -int machdep_save_float_state(struct pthread * pthread) -{ - char * fdata = (char *)pthread->machdep_data.machdep_float_state; - - __asm__ ("fsave %0"::"m" (*fdata)); -} - -/* ========================================================================== - * machdep_restore_state() - */ -void machdep_restore_state(void) -{ - machdep_sys_longjmp(pthread_run->machdep_data.machdep_state, 1); -} - -/* ========================================================================== - * machdep_restore_float_state() - */ -int machdep_restore_float_state(void) -{ - char * fdata = (char *)pthread_run->machdep_data.machdep_float_state; - - __asm__ ("frstor %0"::"m" (*fdata)); -} - -/* ========================================================================== - * machdep_set_thread_timer() - */ -void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread) -{ - if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) { - PANIC(); - } -} - -/* ========================================================================== - * machdep_unset_thread_timer() - */ -void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread) -{ - struct itimerval zeroval = { { 0, 0 }, { 0, 0 } }; - int ret; - - if (machdep_pthread) { - ret = setitimer(ITIMER_VIRTUAL, &zeroval, - &(machdep_pthread->machdep_timer)); - } else { - ret = setitimer(ITIMER_VIRTUAL, &zeroval, NULL); - } - - if (ret) { - PANIC(); - } -} - -/* ========================================================================== - * machdep_pthread_cleanup() - */ -void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread) -{ - return(machdep_pthread->machdep_stack); -} - -/* ========================================================================== - * machdep_pthread_start() - */ -void machdep_pthread_start(void) -{ - context_switch_done(); - pthread_sched_resume(); - - /* Run current threads start routine with argument */ - pthread_exit(pthread_run->machdep_data.start_routine - (pthread_run->machdep_data.start_argument)); - - /* should never reach here */ - PANIC(); -} - -/* ========================================================================== - * __machdep_stack_free() - */ -void __machdep_stack_free(void * stack) -{ - free(stack); -} - -/* ========================================================================== - * __machdep_stack_alloc() - */ -void * __machdep_stack_alloc(size_t size) -{ - void * stack; - - return(malloc(size)); -} - -/* ========================================================================== - * __machdep_pthread_create() - */ -void __machdep_pthread_create(struct machdep_pthread *machdep_pthread, - void *(* start_routine)(), void *start_argument, - long stack_size, long nsec, long flags) -{ - machdep_pthread->start_routine = start_routine; - machdep_pthread->start_argument = start_argument; - - machdep_pthread->machdep_timer.it_value.tv_sec = 0; - machdep_pthread->machdep_timer.it_interval.tv_sec = 0; - machdep_pthread->machdep_timer.it_interval.tv_usec = 0; - machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000; - - machdep_sys_setjmp(machdep_pthread->machdep_state); - /* - * Set up new stact frame so that it looks like it - * returned from a longjmp() to the beginning of - * machdep_pthread_start(). - */ - machdep_pthread->machdep_state[0] = (int)machdep_pthread_start; - - /* Stack starts high and builds down. */ - machdep_pthread->machdep_state[2] = - (int)machdep_pthread->machdep_stack + stack_size; -} - -/* ========================================================================== - * machdep_sys_creat() - */ -machdep_sys_creat(char * path, int mode) -{ - return(machdep_sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); -} - -/* ========================================================================== - * machdep_sys_wait3() - */ -machdep_sys_wait3(int * b, int c, int * d) -{ - return(machdep_sys_wait4(0, b, c, d)); -} - -/* ========================================================================== - * machdep_sys_waitpid() - */ -machdep_sys_waitpid(int a, int * b, int c) -{ - return(machdep_sys_wait4(a, b, c, NULL)); -} - -/* ========================================================================== - * machdep_sys_getdtablesize() - */ -machdep_sys_getdtablesize() -{ - return(sysconf(_SC_OPEN_MAX)); -} diff --git a/lib/libpthread/machdep/engine-i386-openbsd-2.0.h b/lib/libpthread/machdep/engine-i386-openbsd-2.0.h deleted file mode 100644 index 71ac156b20c..00000000000 --- a/lib/libpthread/machdep/engine-i386-openbsd-2.0.h +++ /dev/null @@ -1,97 +0,0 @@ -/* ==== machdep.h ============================================================ - * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu - * - * $Id: engine-i386-openbsd-2.0.h,v 1.1 1998/07/21 13:19:19 peter Exp $ - * - */ - -#include <unistd.h> -#include <setjmp.h> -#include <sys/time.h> - -/* - * The first machine dependent functions are the SEMAPHORES - * needing the test and set instruction. - */ -#define SEMAPHORE_CLEAR 0 -#define SEMAPHORE_SET 1 - -#define SEMAPHORE_TEST_AND_SET(lock) \ -({ \ -long temp = SEMAPHORE_SET; \ - \ -__asm__ volatile ("xchgl %0,(%2)" \ - :"=r" (temp) \ - :"0" (temp),"r" (lock)); \ -temp; \ -}) - -#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR - -/* - * New types - */ -typedef long semaphore; - -/* - * sigset_t macros - */ -#define SIG_ANY(sig) (sig) -#define SIGMAX 31 - -/* - * New Strutures - */ -struct machdep_pthread { - void *(*start_routine)(void *); - void *start_argument; - void *machdep_stack; - struct itimerval machdep_timer; - jmp_buf machdep_state; - char machdep_float_state[108]; -}; - -/* - * Static machdep_pthread initialization values. - * For initial thread only. - */ -#define MACHDEP_PTHREAD_INIT \ -{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } - -/* - * Minimum stack size - */ -#define PTHREAD_STACK_MIN 1024 - -/* - * Some fd flag defines that are necessary to distinguish between posix - * behavior and bsd4.3 behavior. - */ -#define __FD_NONBLOCK O_NONBLOCK - -/* - * New functions - */ - -__BEGIN_DECLS - -#if defined(PTHREAD_KERNEL) - -#define __machdep_stack_get(x) (x)->machdep_stack -#define __machdep_stack_set(x, y) (x)->machdep_stack = y -#define __machdep_stack_repl(x, y) \ -{ \ - if (stack = __machdep_stack_get(x)) { \ - __machdep_stack_free(stack); \ - } \ - __machdep_stack_set(x, y); \ -} - -void * __machdep_stack_alloc __P_((size_t)); -void __machdep_stack_free __P_((void *)); - -int machdep_save_state __P_((void)); - -#endif - -__END_DECLS diff --git a/lib/libpthread/machdep/engine-m68000-netbsd.h b/lib/libpthread/machdep/engine-m68000-netbsd.h deleted file mode 100644 index 0cf0b035d6f..00000000000 --- a/lib/libpthread/machdep/engine-m68000-netbsd.h +++ /dev/null @@ -1,77 +0,0 @@ -/* ==== machdep.h ============================================================ - * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu - * - * $Id: engine-m68000-netbsd.h,v 1.1 1998/07/21 13:19:14 peter Exp $ - * - */ - -#include <unistd.h> -#include <setjmp.h> -#include <sys/time.h> - -/* - * The first machine dependent functions are the SEMAPHORES - * needing the test and set instruction. - */ -#define SEMAPHORE_CLEAR 0 -#define SEMAPHORE_SET 0x80; - -#define SEMAPHORE_TEST_AND_SET(lock) \ -({ \ -volatile long temp = SEMAPHORE_CLEAR; \ - \ -__asm__ volatile("tas (%2); bpl 0f; movl #1,%0; 0:" \ - :"=r" (temp) \ - :"0" (temp),"r" (lock)); \ -temp; \ -}) - -#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR - -/* - * New types - */ -typedef char semaphore; - -/* - * sigset_t macros - */ -#define SIG_ANY(sig) (sig) -#define SIGMAX 31 - -/* - * New Strutures - */ -struct machdep_pthread { - void *(*start_routine)(void *); - void *start_argument; - void *machdep_stack; - struct itimerval machdep_timer; - jmp_buf machdep_state; -}; - -/* - * Min pthread stacksize - */ -#define PTHREAD_STACK_MIN 1024 - -/* - * Static machdep_pthread initialization values. - * For initial thread only. - */ -#define MACHDEP_PTHREAD_INIT \ -{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 } - -/* - * New functions - */ - -__BEGIN_DECLS - -#if defined(PTHREAD_KERNEL) - -int machdep_save_state __P_((void)); - -#endif - -__END_DECLS diff --git a/lib/libpthread/machdep/openbsd-2.0/__math.h b/lib/libpthread/machdep/openbsd-2.0/__math.h deleted file mode 100755 index 27ed0f2575d..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__math.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * ANSI/POSIX - */ -extern char __infinity[]; -#define HUGE_VAL (*(double *) __infinity) - diff --git a/lib/libpthread/machdep/openbsd-2.0/__path.h b/lib/libpthread/machdep/openbsd-2.0/__path.h deleted file mode 100755 index 3f3e8f826f5..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__path.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * from: @(#)time.h 5.12 (Berkeley) 3/9/91 - * $Id: __path.h,v 1.1 1998/07/21 13:19:42 peter Exp $ - */ - -#ifndef _SYS__PATH_H_ -#define _SYS__PATH_H_ - -#define _PATH_PTY "/dev/" -#define _PATH_TZDIR "/usr/share/zoneinfo" -#define _PATH_TZFILE "/etc/localtime" - -#endif /* !_SYS__PATH_H_ */ - diff --git a/lib/libpthread/machdep/openbsd-2.0/__signal.h b/lib/libpthread/machdep/openbsd-2.0/__signal.h deleted file mode 100755 index 918955c9948..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__signal.h +++ /dev/null @@ -1,8 +0,0 @@ -#include <sys/signal.h> - -#define __SIGEMPTYSET 0 -#define __SIGFILLSET 0xffffffff -#define __SIGADDSET(s, n) (*(s) |= 1 << ((n) - 1), 0) -#define __SIGDELSET(s, n) (*(s) &= ~(1 << ((n) - 1)), 0) -#define __SIGISMEMBER(s, n) ((*(s) & (1 << ((n) - 1))) != 0) - diff --git a/lib/libpthread/machdep/openbsd-2.0/__stdio.h b/lib/libpthread/machdep/openbsd-2.0/__stdio.h deleted file mode 100755 index d60b9df7a54..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__stdio.h +++ /dev/null @@ -1,8 +0,0 @@ - -#include <machine/ansi.h> -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -typedef pthread_fpos_t fpos_t; /* Must match off_t <sys/types.h> */ diff --git a/lib/libpthread/machdep/openbsd-2.0/__stdlib.h b/lib/libpthread/machdep/openbsd-2.0/__stdlib.h deleted file mode 100755 index 6b0730e3ef3..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__stdlib.h +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)stdlib.h 5.13 (Berkeley) 6/4/91 - * $Id: __stdlib.h,v 1.1 1998/07/21 13:19:41 peter Exp $ - */ - -#ifndef _SYS___STDLIB_H_ -#define _SYS___STDLIB_H_ - -#include <machine/ansi.h> - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#ifdef _BSD_WCHAR_T_ -typedef _BSD_WCHAR_T_ wchar_t; -#ifdef _BSD_RUNE_T_ -typedef _BSD_RUNE_T_ rune_t; -#undef _BSD_RUNE_T_ -#else -typedef _BSD_WCHAR_T_ rune_t; -#endif -#undef _BSD_WCHAR_T_ -#endif - -#ifndef __NORETURN -#define __NORETURN -#endif - -#ifndef NULL -#define NULL 0 -#endif - -#endif /* _STDLIB_H_ */ diff --git a/lib/libpthread/machdep/openbsd-2.0/__string.h b/lib/libpthread/machdep/openbsd-2.0/__string.h deleted file mode 100755 index 93d4fcf9dd2..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__string.h +++ /dev/null @@ -1,21 +0,0 @@ - -#include <machine/ansi.h> -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -/* Non-standard NetBSD string routines. */ -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) -__BEGIN_DECLS -int bcmp __P_((const void *, const void *, size_t)); -void bcopy __P_((const void *, void *, size_t)); -void bzero __P_((void *, size_t)); -char *index __P_((const char *, int)); -char *rindex __P_((const char *, int)); -char *strdup __P_((const char *)); -void strmode __P_((int, char *)); -char *strsep __P_((char **, const char *)); -__END_DECLS -#endif - diff --git a/lib/libpthread/machdep/openbsd-2.0/__time.h b/lib/libpthread/machdep/openbsd-2.0/__time.h deleted file mode 100755 index 9423e10411b..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__time.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)time.h 5.12 (Berkeley) 3/9/91 - * $Id: __time.h,v 1.1 1998/07/21 13:19:41 peter Exp $ - */ - -#ifndef _SYS__TIME_H_ -#define _SYS__TIME_H_ - -#include <machine/ansi.h> -#include <machine/limits.h> - -#ifdef _BSD_CLOCK_T_ -typedef _BSD_CLOCK_T_ clock_t; -#undef _BSD_CLOCK_T_ -#endif - -#ifdef _BSD_TIME_T_ -typedef _BSD_TIME_T_ time_t; -#undef _BSD_TIME_T_ -#endif - -#ifdef _BSD_SIZE_T_ -typedef _BSD_SIZE_T_ size_t; -#undef _BSD_SIZE_T_ -#endif - -#define CLOCKS_PER_SEC 100 - -#if !defined(CLK_TCK) -#define CLK_TCK 100 -#endif /* not CLK_TCK */ - -#endif /* !_SYS__TIME_H_ */ diff --git a/lib/libpthread/machdep/openbsd-2.0/__unistd.h b/lib/libpthread/machdep/openbsd-2.0/__unistd.h deleted file mode 100755 index 2ad0f99c8c9..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/__unistd.h +++ /dev/null @@ -1,109 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: @(#)stdlib.h 5.13 (Berkeley) 6/4/91 - * $Id: __unistd.h,v 1.1 1998/07/21 13:19:41 peter Exp $ - */ - -#ifndef _SYS___UNISTD_H_ -#define _SYS___UNISTD_H_ - -#include <sys/types.h> - -#ifndef NULL -#define NULL 0 -#endif - -#define ioctl_request_type unsigned long /* For fd.c */ - -/* compile-time symbolic constants */ -#define _POSIX_JOB_CONTROL /* implementation supports job control */ - -#ifdef _NOT_AVAILABLE -#define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ -#endif - -#define _POSIX_VERSION 198808L -#define _POSIX2_VERSION 199212L - -/* execution-time symbolic constants */ - /* chown requires appropriate privileges */ -#define _POSIX_CHOWN_RESTRICTED 1 - /* too-long path components generate errors */ -#define _POSIX_NO_TRUNC 1 - /* may disable terminal special characters */ -/* #define _POSIX_VDISABLE 0xff */ - -/* configurable pathname variables */ -#define _PC_LINK_MAX 1 -#define _PC_MAX_CANON 2 -#define _PC_MAX_INPUT 3 -#define _PC_NAME_MAX 4 -#define _PC_PATH_MAX 5 -#define _PC_PIPE_BUF 6 -#define _PC_CHOWN_RESTRICTED 7 -#define _PC_NO_TRUNC 8 -#define _PC_VDISABLE 9 - -/* configurable system variables */ -#define _SC_ARG_MAX 1 -#define _SC_CHILD_MAX 2 -#define _SC_CLK_TCK 3 -#define _SC_NGROUPS_MAX 4 -#define _SC_OPEN_MAX 5 -#define _SC_JOB_CONTROL 6 -#define _SC_SAVED_IDS 7 -#define _SC_VERSION 8 -#define _SC_BC_BASE_MAX 9 -#define _SC_BC_DIM_MAX 10 -#define _SC_BC_SCALE_MAX 11 -#define _SC_BC_STRING_MAX 12 -#define _SC_COLL_WEIGHTS_MAX 13 -#define _SC_EXPR_NEST_MAX 14 -#define _SC_LINE_MAX 15 -#define _SC_RE_DUP_MAX 16 -#define _SC_2_VERSION 17 -#define _SC_2_C_BIND 18 -#define _SC_2_C_DEV 19 -#define _SC_2_CHAR_TERM 20 -#define _SC_2_FORT_DEV 21 -#define _SC_2_FORT_RUN 22 -#define _SC_2_LOCALEDEF 23 -#define _SC_2_SW_DEV 24 -#define _SC_2_UPE 25 -#define _SC_STREAM_MAX 26 -#define _SC_TZNAME_MAX 27 - -/* configurable system strings */ -#define _CS_PATH 1 - -#endif diff --git a/lib/libpthread/machdep/openbsd-2.0/compat.h b/lib/libpthread/machdep/openbsd-2.0/compat.h deleted file mode 100755 index b85e46458a6..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/compat.h +++ /dev/null @@ -1,43 +0,0 @@ -/* ==== compat.h ============================================================ - * Copyright (c) 1994 by Chris Provenzano, proven@mit.edu - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Chris Provenzano. - * 4. The name of Chris Provenzano may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id: compat.h,v 1.1 1998/07/21 13:19:41 peter Exp $ - * - * Description : COmpat header to make socket code compile. - * - * 1.00 94/08/01 proven - * -Started coding this file. - */ - -#ifndef _SYS_COMPAT_H_ -#define _SYS_COMPAT_H_ - -#endif diff --git a/lib/libpthread/machdep/openbsd-2.0/dirent.h b/lib/libpthread/machdep/openbsd-2.0/dirent.h deleted file mode 100755 index 5226443f86b..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/dirent.h +++ /dev/null @@ -1,64 +0,0 @@ -/*- - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)dirent.h 5.18 (Berkeley) 2/23/91 - */ - -#ifndef _SYS_DIRENT_H_ -#define _SYS_DIRENT_H_ - -/* - * A directory entry has a struct dirent at the front of it, containing its - * inode number, the length of the entry, and the length of the name - * contained in the entry. These are followed by the name padded to a 4 - * byte boundary with null bytes. All names are guaranteed null terminated. - * The maximum length of a name in a directory is MAXNAMLEN. - */ - -struct dirent { - u_long d_fileno; /* file number of entry */ - u_short d_reclen; /* length of this record */ - u_short d_namlen; /* length of string in d_name */ -#ifdef _POSIX_SOURCE - char d_name[255 + 1]; /* name must be no longer than this */ -#else -#define MAXNAMLEN 255 - char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ -#endif -}; - -#define d_ino d_fileno /* backward compatibility */ - -/* definitions for library routines operating on directories. */ -#define DIRBLKSIZ 1024 - -#endif /* !_DIRENT_H_ */ diff --git a/lib/libpthread/machdep/openbsd-2.0/errno.h b/lib/libpthread/machdep/openbsd-2.0/errno.h deleted file mode 100755 index 3da61d692a3..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/errno.h +++ /dev/null @@ -1,160 +0,0 @@ -/* $NetBSD: errno.h,v 1.8 1994/06/29 06:44:02 cgd Exp $ */ - -/* - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_ERRNO_H_ -#define _SYS_ERRNO_H_ - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* Input/output error */ -#define ENXIO 6 /* Device not configured */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ -#define EDEADLK 11 /* Resource deadlock avoided */ - /* 11 was EAGAIN */ -#define ENOMEM 12 /* Cannot allocate memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#ifndef _POSIX_SOURCE -#define ENOTBLK 15 /* Block device required */ -#endif -#define EBUSY 16 /* Device busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* Operation not supported by device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate ioctl for device */ -#ifndef _POSIX_SOURCE -#define ETXTBSY 26 /* Text file busy */ -#endif -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ - -/* math software */ -#define EDOM 33 /* Numerical argument out of domain */ -#define ERANGE 34 /* Result too large */ - -/* non-blocking and interrupt i/o */ -#define EAGAIN 35 /* Resource temporarily unavailable */ -#ifndef _POSIX_SOURCE -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define EINPROGRESS 36 /* Operation now in progress */ -#define EALREADY 37 /* Operation already in progress */ - -/* ipc/network software -- argument errors */ -#define ENOTSOCK 38 /* Socket operation on non-socket */ -#define EDESTADDRREQ 39 /* Destination address required */ -#define EMSGSIZE 40 /* Message too long */ -#define EPROTOTYPE 41 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 42 /* Protocol not available */ -#define EPROTONOSUPPORT 43 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ -#define EOPNOTSUPP 45 /* Operation not supported */ -#define EPFNOSUPPORT 46 /* Protocol family not supported */ -#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ -#define EADDRINUSE 48 /* Address already in use */ -#define EADDRNOTAVAIL 49 /* Can't assign requested address */ - -/* ipc/network software -- operational errors */ -#define ENETDOWN 50 /* Network is down */ -#define ENETUNREACH 51 /* Network is unreachable */ -#define ENETRESET 52 /* Network dropped connection on reset */ -#define ECONNABORTED 53 /* Software caused connection abort */ -#define ECONNRESET 54 /* Connection reset by peer */ -#define ENOBUFS 55 /* No buffer space available */ -#define EISCONN 56 /* Socket is already connected */ -#define ENOTCONN 57 /* Socket is not connected */ -#define ESHUTDOWN 58 /* Can't send after socket shutdown */ -#define ETOOMANYREFS 59 /* Too many references: can't splice */ -#define ETIMEDOUT 60 /* Operation timed out */ -#define ECONNREFUSED 61 /* Connection refused */ - -#define ELOOP 62 /* Too many levels of symbolic links */ -#endif /* _POSIX_SOURCE */ -#define ENAMETOOLONG 63 /* File name too long */ - -/* should be rearranged */ -#ifndef _POSIX_SOURCE -#define EHOSTDOWN 64 /* Host is down */ -#define EHOSTUNREACH 65 /* No route to host */ -#endif /* _POSIX_SOURCE */ -#define ENOTEMPTY 66 /* Directory not empty */ - -/* quotas & mush */ -#ifndef _POSIX_SOURCE -#define EPROCLIM 67 /* Too many processes */ -#define EUSERS 68 /* Too many users */ -#define EDQUOT 69 /* Disc quota exceeded */ - -/* Network File System */ -#define ESTALE 70 /* Stale NFS file handle */ -#define EREMOTE 71 /* Too many levels of remote in path */ -#define EBADRPC 72 /* RPC struct is bad */ -#define ERPCMISMATCH 73 /* RPC version wrong */ -#define EPROGUNAVAIL 74 /* RPC prog. not avail */ -#define EPROGMISMATCH 75 /* Program version wrong */ -#define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif /* _POSIX_SOURCE */ - -#define ENOLCK 77 /* No locks available */ -#define ENOSYS 78 /* Function not implemented */ - -#ifndef _POSIX_SOURCE -#define EFTYPE 79 /* Inappropriate file type or format */ -#define EAUTH 80 /* Authentication error */ -#define ENEEDAUTH 81 /* Need authenticator */ -#define ELAST 81 /* Must be equal largest errno */ -#endif /* _POSIX_SOURCE */ - -#endif diff --git a/lib/libpthread/machdep/openbsd-2.0/timers.h b/lib/libpthread/machdep/openbsd-2.0/timers.h deleted file mode 100755 index a4e39867166..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/timers.h +++ /dev/null @@ -1,45 +0,0 @@ -/* ==== timers.h ============================================================ - * Copyright (c) 1994 by Chris Provenzano, proven@mit.edu - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Chris Provenzano. - * 4. The name of Chris Provenzano may not be used to endorse or promote - * products derived from this software without specific prior written - * permission. - * - * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CHRIS PROVENZANO BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id: timers.h,v 1.1 1998/07/21 13:19:41 peter Exp $ - * - * Description : Basic timers header. - * - * 1.00 94/06/13 proven - * -Started coding this file. - */ - -#ifndef _SYS_TIMERS_H_ -#define _SYS_TIMERS_H_ - -#include <sys/time.h> - -#endif diff --git a/lib/libpthread/machdep/openbsd-2.0/wait.h b/lib/libpthread/machdep/openbsd-2.0/wait.h deleted file mode 100755 index b68a8a38c35..00000000000 --- a/lib/libpthread/machdep/openbsd-2.0/wait.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)wait.h 8.1 (Berkeley) 6/2/93 - * $Id: wait.h,v 1.1 1998/07/21 13:19:42 peter Exp $ - */ - -#ifndef _SYS_WAIT_H_ -#define _SYS_WAIT_H_ - -/* - * This file holds definitions relevent to the wait4 system call - * and the alternate interfaces that use it (wait, wait3, waitpid). - */ - -/* - * Macros to test the exit status returned by wait - * and extract the relevant values. - */ -#ifdef _POSIX_SOURCE -#define _W_INT(i) (i) -#else -#define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */ -#define WCOREFLAG 0200 -#endif - -#define _WSTATUS(x) (_W_INT(x) & 0177) -#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ -#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED) -#define WSTOPSIG(x) (_W_INT(x) >> 8) -#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) -#define WTERMSIG(x) (_WSTATUS(x)) -#define WIFEXITED(x) (_WSTATUS(x) == 0) -#define WEXITSTATUS(x) (_W_INT(x) >> 8) -#ifndef _POSIX_SOURCE -#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) - -#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) -#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) -#endif - -/* - * Option bits for the third argument of wait4. WNOHANG causes the - * wait to not hang if there are no stopped or terminated processes, rather - * returning an error indication in this case (pid==0). WUNTRACED - * indicates that the caller should receive status about untraced children - * which stop due to signals. If children are stopped and a wait without - * this option is done, it is as though they were still running... nothing - * about them is returned. - */ -#define WNOHANG 1 /* dont hang in wait */ -#define WUNTRACED 2 /* tell about stopped, untraced children */ - -#ifndef _POSIX_SOURCE -/* POSIX extensions and 4.2/4.3 compatability: */ - -/* - * Tokens for special values of the "pid" parameter to wait4. - */ -#define WAIT_ANY (-1) /* any process */ -#define WAIT_MYPGRP 0 /* any process in my process group */ - -#include <machine/endian.h> - -/* - * Deprecated: - * Structure of the information in the status word returned by wait4. - * If w_stopval==WSTOPPED, then the second structure describes - * the information returned, else the first. - */ -union wait { - int w_status; /* used in syscall */ - /* - * Terminated process status. - */ - struct { -#if BYTE_ORDER == LITTLE_ENDIAN - unsigned int w_Termsig:7, /* termination signal */ - w_Coredump:1, /* core dump indicator */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Filler:16; /* upper bits filler */ -#endif -#if BYTE_ORDER == BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Retcode:8, /* exit code if w_termsig==0 */ - w_Coredump:1, /* core dump indicator */ - w_Termsig:7; /* termination signal */ -#endif - } w_T; - /* - * Stopped process status. Returned - * only for traced children unless requested - * with the WUNTRACED option bit. - */ - struct { -#if BYTE_ORDER == LITTLE_ENDIAN - unsigned int w_Stopval:8, /* == W_STOPPED if stopped */ - w_Stopsig:8, /* signal that stopped us */ - w_Filler:16; /* upper bits filler */ -#endif -#if BYTE_ORDER == BIG_ENDIAN - unsigned int w_Filler:16, /* upper bits filler */ - w_Stopsig:8, /* signal that stopped us */ - w_Stopval:8; /* == W_STOPPED if stopped */ -#endif - } w_S; -}; -#define w_termsig w_T.w_Termsig -#define w_coredump w_T.w_Coredump -#define w_retcode w_T.w_Retcode -#define w_stopval w_S.w_Stopval -#define w_stopsig w_S.w_Stopsig - -#define WSTOPPED _WSTOPPED -#endif /* _POSIX_SOURCE */ - -#ifndef KERNEL -#include <sys/types.h> -#include <sys/cdefs.h> - -__BEGIN_DECLS -struct rusage; /* forward declaration */ - -pid_t wait __P_((int *)); -pid_t waitpid __P_((pid_t, int *, int)); -#ifndef _POSIX_SOURCE -pid_t wait3 __P_((int *, int, void *)); -pid_t wait4 __P_((pid_t, int *, int, void *)); -#endif -__END_DECLS -#endif - -#endif diff --git a/lib/libpthread/machdep/posix-openbsd-2.0.h b/lib/libpthread/machdep/posix-openbsd-2.0.h deleted file mode 100644 index 55c127e8136..00000000000 --- a/lib/libpthread/machdep/posix-openbsd-2.0.h +++ /dev/null @@ -1,31 +0,0 @@ -/* ==== posix.h ============================================================ - * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu - * - * Description : Convert an Ultrix-4.2 system to a more or less POSIX system. - * - * $Id: posix-openbsd-2.0.h,v 1.1 1998/07/21 13:19:19 peter Exp $ - * - * 1.00 93/07/20 proven - * -Started coding this file. - */ - -#ifndef _PTHREAD_POSIX_H_ -#define _PTHREAD_POSIX_H_ - -#include <sys/cdefs.h> - -/* More stuff for compiling */ -#if defined(__GNUC__) -#define __INLINE extern inline -#else -#define __INLINE static -#endif - -/* Make sure we have size_t defined */ -#include <pthread/types.h> - -#ifndef __WAIT_STATUS -#define __WAIT_STATUS int * -#endif - -#endif diff --git a/lib/libpthread/machdep/syscall-alpha-netbsd-1.3.S b/lib/libpthread/machdep/syscall-alpha-netbsd-1.3.S deleted file mode 100644 index eda44311281..00000000000 --- a/lib/libpthread/machdep/syscall-alpha-netbsd-1.3.S +++ /dev/null @@ -1,224 +0,0 @@ -#include <machine/asm.h> -#define CHMK() call_pal 0x83 -#define COMPAT_43 -#include <sys/syscall.h> -#ifndef __CONCAT -#include <sys/cdefs.h> -#endif -#define CONCAT __CONCAT - -#undef SYSCALL - -/* Kernel syscall interface: - Input: - v0 - system call number - a* - arguments, as in C - Output: - a3 - zero iff successful - v0 - errno value on failure, else result - - This macro is similar to SYSCALL in asm.h, but not completely. - There's room for optimization, if we assume this will continue to - be assembled as one file. - - This macro expansions does not include the return instruction. - If there's no other work to be done, use something like: - SYSCALL(foo) ; ret - If there is other work to do (in fork, maybe?), do it after the - SYSCALL invocation. */ - -#define SYSCALL(x) \ - .align 4 ;\ - .globl CONCAT(machdep_sys_,x) ;\ - .ent CONCAT(machdep_sys_,x), 0 ;\ -CONCAT(machdep_sys_,x): ;\ - .frame sp,0,ra ;\ - ldiq v0, CONCAT(SYS_,x) ;\ - CHMK() ;\ - beq a3, CONCAT(Lsys_noerr_,x) ;\ - br gp, CONCAT(Lsys_err_,x) ;\ -CONCAT(Lsys_err_,x): ;\ - /* Load gp so we can find cerror to jump to. */;\ - ldgp gp, 0(gp) ;\ - jmp zero, machdep_cerror ;\ -CONCAT(Lsys_noerr_,x): - -#define XSYSCALL(x) SYSCALL(x) ; RET ; .end CONCAT(machdep_sys_,x) - - .globl machdep_cerror -machdep_cerror: - br t0, Lmachdep_cerror_setgp -Lmachdep_cerror_setgp: - ldgp gp, 0(t0) - stl v0, errno -#if 0 - ldiq v0, -1 -#else - subq zero, v0, v0 -#endif - RET - -/* The fork system call is special... */ -SYSCALL(fork) - cmovne a4, 0, v0 - RET - .end machdep_sys_fork - -/* The pipe system call is special... */ -SYSCALL(pipe) - stl v0, 0(a0) - stl a4, 4(a0) - mov zero, v0 - RET - .end machdep_sys_pipe - -/* The sigsuspend system call is special... */ - .align 4 - .globl machdep_sys_sigsuspend - .ent machdep_sys_sigsuspend, 0 -machdep_sys_sigsuspend: - ldl a0, 0(a0) /* pass *mask instead of mask */ - ldiq v0, SYS_sigsuspend - CHMK() - mov zero, v0 /* shouldn't need; just in case... */ - RET - .end machdep_sys_sigsuspend - -/* The sigprocmask system call is special... */ - .align 4 - .globl machdep_sys_sigprocmask - .ent machdep_sys_sigprocmask, 0 -machdep_sys_sigprocmask: - mov a2, a5 /* safe */ - cmoveq a1, 1, a0 /* if set == NULL, how = SIG_BLOCK */ - beq a1, Ldoit /* and set = 0, and do it. */ - ldl a1, 0(a1) /* load the set from *set */ -Ldoit: ldiq v0, SYS_sigprocmask - CHMK() - beq a5, Lret /* if they don't want old mask, done */ - stl v0, 0(a5) /* otherwise, give it to them. */ -Lret: mov zero, v0 - RET - .end machdep_sys_sigprocmask - -/* More stuff ... */ - .align 4 - .global __machdep_save_int_state - .ent __machdep_save_int_state, 0 -__machdep_save_int_state: - .frame sp, 16, ra - ldgp gp, 0(t12) - lda sp, -16(sp) - stq ra, 0(sp) - - /* save integer registers */ - stq ra, ( 0 * 8)(a0) /* return address */ - stq s0, ( 1 * 8)(a0) /* callee-saved registers */ - stq s1, ( 2 * 8)(a0) - stq s2, ( 3 * 8)(a0) - stq s3, ( 4 * 8)(a0) - stq s4, ( 5 * 8)(a0) - stq s5, ( 6 * 8)(a0) - stq s6, ( 7 * 8)(a0) - stq sp, ( 9 * 8)(a0) - stq ra, ( 8 * 8)(a0) /* RA on return */ - stq pv, (10 * 8)(a0) /* and PV; we restore it */ - - mov zero, v0 - lda sp, 16(sp) - RET - .end __machdep_save_int_state - - .align 4 - .global __machdep_restore_int_state - .ent __machdep_restore_int_state, 0 -__machdep_restore_int_state: - .frame sp, 16, ra - ldgp gp, 0(t12) - lda sp, -16(sp) - stq ra, 0(sp) - - /* restore integer registers */ - ldq t0, ( 0 * 8)(a0) /* return address */ - ldq s0, ( 1 * 8)(a0) /* callee-saved registers */ - ldq s1, ( 2 * 8)(a0) - ldq s2, ( 3 * 8)(a0) - ldq s3, ( 4 * 8)(a0) - ldq s4, ( 5 * 8)(a0) - ldq s5, ( 6 * 8)(a0) - ldq s6, ( 7 * 8)(a0) - ldq ra, ( 8 * 8)(a0) /* RA after return */ - ldq sp, ( 9 * 8)(a0) - ldq pv, (10 * 8)(a0) /* and PV; we restore it */ - - ldiq v0, 1 - ret zero,(t0),1 - .end __machdep_restore_int_state - - .align 4 - .global __machdep_save_fp_state - .ent __machdep_save_fp_state, 0 -__machdep_save_fp_state: - .frame sp, 16, ra - ldgp gp, 0(t12) - lda sp, -16(sp) - stq ra, 0(sp) - - /* save FP registers */ - stt fs0, (0 * 8)(a0) /* callee-saved registers */ - stt fs1, (1 * 8)(a0) - stt fs2, (2 * 8)(a0) - stt fs3, (3 * 8)(a0) - stt fs4, (4 * 8)(a0) - stt fs5, (5 * 8)(a0) - stt fs6, (6 * 8)(a0) - stt fs7, (7 * 8)(a0) - mf_fpcr ft0 /* and FP control reg */ - stt ft0, (8 * 8)(a0) - - lda sp, 16(sp) - RET - .end __machdep_save_fp_state - - .align 4 - .global __machdep_restore_fp_state - .ent __machdep_restore_fp_state, 0 -__machdep_restore_fp_state: - .frame sp, 16, ra - ldgp gp, 0(t12) - lda sp, -16(sp) - stq ra, 0(sp) - - /* restore FP registers */ - ldt fs0, (0 * 8)(a0) /* callee-saved registers */ - ldt fs1, (1 * 8)(a0) - ldt fs2, (2 * 8)(a0) - ldt fs3, (3 * 8)(a0) - ldt fs4, (4 * 8)(a0) - ldt fs5, (5 * 8)(a0) - ldt fs6, (6 * 8)(a0) - ldt fs7, (7 * 8)(a0) - ldt ft0, (8 * 8)(a0) - mt_fpcr ft0 /* and FP control reg */ - - lda sp, 16(sp) - RET - .end __machdep_restore_fp_state - -/* For fstat() we actually syscall fstat13. */ - .align 4 - .globl machdep_sys_fstat - .ent machdep_sys_fstat, 0 -machdep_sys_fstat: - .frame sp,0,ra - ldiq v0, SYS___fstat13 - CHMK() - beq a3, Lsys_noerr_fstat - br gp, Lsys_err_fstat -Lsys_err_fstat: - /* Load gp so we can find cerror to jump to. */ - ldgp gp, 0(gp) - jmp zero, machdep_cerror -Lsys_noerr_fstat: - RET - .end machdep_sys_fstat diff --git a/lib/libpthread/machdep/syscall-i386-openbsd-2.0.S b/lib/libpthread/machdep/syscall-i386-openbsd-2.0.S deleted file mode 100644 index cfdbbc77f73..00000000000 --- a/lib/libpthread/machdep/syscall-i386-openbsd-2.0.S +++ /dev/null @@ -1,237 +0,0 @@ -/* ==== syscall.S ============================================================ - * Copyright (c) 1990 The Regents of the University of California. - * Copyright (c) 1995 Chris Provenzano, proven@mit.edu - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Description : Machine dependent syscalls for i386/i486/i586 - * - */ - -#ifndef lint - .text - .asciz "syscall-i386-freebsd-2.0.S,v 1.2 1995/05/26 07:44:29 proven Exp"; -#endif - -#if defined(SYSLIBC_SCCS) && !defined(lint) - .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90" -#endif /* SYSLIBC_SCCS and not lint */ - -#include <sys/syscall.h> - -#ifdef __STDC__ - -#define SYSCALL(x) \ - .globl _machdep_sys_##x##; \ - \ -_machdep_sys_##x##:; \ - \ - movl $(SYS_##x##), %eax; \ - .byte 0x9a; .long 0; .word 7; \ - jb 1b; \ - ret; - -#else - -#define SYSCALL(x) \ - .globl _machdep_sys_/**/x; \ - \ -_machdep_sys_/**/x:; \ - \ - movl $(SYS_/**/x), %eax; \ - .byte 0x9a; .long 0; .word 7; \ - jb 1b; \ - ret; - -#endif - - -/* - * Initial asm stuff for all functions. - */ - .text - .align 2 - - -/* ========================================================================== - * error code for all syscalls. The error value is returned as the negative - * of the errno value. - */ - -1: - neg %eax - ret - -/* ========================================================================== - * machdep_sys_fork() - */ - .globl _machdep_sys_fork; - -_machdep_sys_fork:; - - movl $(SYS_fork), %eax; - .byte 0x9a; .long 0; .word 7; - cmpl $0, %edx - je 2f - movl $0, %eax -2: - ret; - -/* ========================================================================== - * machdep_sys___syscall() - */ - -_machdep_sys___syscall:; - - movl $(SYS___syscall), %eax; - .byte 0x9a; .long 0; .word 7; - jb 3f; - ret - -/* ========================================================================== - * machdep_sys_sigsuspend() - */ - .globl _machdep_sys_sigsuspend; - -_machdep_sys_sigsuspend:; - - movl 4(%esp),%eax # fetch mask arg - movl (%eax),%eax # indirect to mask arg - movl %eax,4(%esp) - movl $(SYS_sigsuspend), %eax; - .byte 0x9a; .long 0; .word 7; - jb 3f; - ret - -3: - - neg %eax - movl $0xffffffff,%edx - ret - -/* ========================================================================== - * machdep_sys_sigprocmask() - */ - .globl _machdep_sys_sigprocmask; - -_machdep_sys_sigprocmask:; - - movl 8(%esp),%ecx - movl (%ecx),%ecx - movl %ecx,8(%esp) - movl $ SYS_sigprocmask , %eax - .byte 0x9a; .long 0; .word 7; - jb 4f; - ret - -4: - neg %eax - movl $0xffffffff,%edx - ret - -/* ========================================================================== - * machdep_sys_lseek() - */ - .globl _machdep_sys_lseek; - -_machdep_sys_lseek:; - - pushl %ebp; - movl %esp,%ebp; - pushl 0x14(%ebp); - pushl 0x10(%ebp); - pushl 0xc(%ebp); - pushl $0x0; - pushl 0x8(%ebp); - pushl $0x0; - pushl $(SYS_lseek); - call _machdep_sys___syscall; - leave - ret - -/* ========================================================================== - * machdep_sys_ftruncate() ; Added by Monty - */ - .globl _machdep_sys_ftruncate; - -_machdep_sys_ftruncate:; - - pushl %ebp; - movl %esp,%ebp; - pushl 0x10(%ebp); - pushl 0xc(%ebp); - pushl $0x0; # Why this? - pushl 0x8(%ebp); - pushl $0x0; # And this? - pushl $(SYS_ftruncate); - call _machdep_sys___syscall; - leave - ret - -/* ========================================================================== - * machdep_sys_setjmp() - */ - .globl _machdep_sys_setjmp; - -_machdep_sys_setjmp:; - movl 4(%esp),%eax - movl 0(%esp),%edx - movl %edx, 0(%eax) /* rta */ - movl %ebx, 4(%eax) - movl %esp, 8(%eax) - movl %ebp,12(%eax) - movl %esi,16(%eax) - movl %edi,20(%eax) - xorl %eax,%eax - ret - -/* ========================================================================== - * machdep_sys_longjmp() - */ - .globl _machdep_sys_longjmp; - -_machdep_sys_longjmp:; - movl 4(%esp),%edx - movl 8(%esp),%eax - movl 0(%edx),%ecx - movl 4(%edx),%ebx - movl 8(%edx),%esp - movl 12(%edx),%ebp - movl 16(%edx),%esi - movl 20(%edx),%edi - testl %eax,%eax - jnz 1f - incl %eax -1: movl %ecx,0(%esp) - ret - diff --git a/lib/libpthread/machdep/syscall-sparc-netbsd-1.1.S b/lib/libpthread/machdep/syscall-sparc-netbsd-1.1.S deleted file mode 100644 index 78df3bd8c8a..00000000000 --- a/lib/libpthread/machdep/syscall-sparc-netbsd-1.1.S +++ /dev/null @@ -1,102 +0,0 @@ -/* ==== syscall.S ============================================================ - * Copyright (c) 1994 Chris Provenzano, proven@mit.edu - * All rights reserved. - * - */ - -#ifndef lint - .text - .asciz "$Id: syscall-sparc-netbsd-1.1.S,v 1.1 1998/07/21 13:19:17 peter Exp $"; -#endif - -#include <sys/syscall.h> - -#define SYSCALL(x) \ - .globl _machdep_sys_##x; \ - \ -_machdep_sys_##x:; \ - \ - mov SYS_##x, %g1; \ - ta 0; \ - bcs,a 2b; \ - sub %r0,%o0,%o0; \ - retl - - -/* - * Initial asm stuff for all functions. - */ - .text - .align 4 - -/* ========================================================================== - * error code for all syscalls. The error value is returned as the negative - * of the errno value. - */ - -1: - sub %r0, %o0, %o0 -2: - retl - nop - -/* ========================================================================== - * machdep_sys_pipe() - */ - .globl _machdep_sys_pipe - -_machdep_sys_pipe: - mov %o0, %o2 - mov SYS_pipe, %g1 - ta 0 - bcs 1b - nop - st %o0, [ %o2 ] - st %o1, [ %o2 + 4 ] - retl - mov %g0, %o0 - -/* ========================================================================== - * machdep_sys_fork() - */ - .globl _machdep_sys_fork; - -_machdep_sys_fork:; - - mov SYS_fork, %g1; - ta 0; - bcs 1b; - nop; - dec %o1; - retl; - and %o0, %o1, %o0; ! return 0 in child, pid in parent - -/* ========================================================================== - * machdep_sys_sigprocmask() - */ - .globl _machdep_sys_sigprocmask; - -_machdep_sys_sigprocmask:; - - ld [%o1], %o1; - mov SYS_sigprocmask, %g1; - ta 0; - bcs 1b; - nop; - retl - nop - -/* ========================================================================== - * machdep_sys_sigsuspend() - */ - .globl _machdep_sys_sigsuspend; - -_machdep_sys_sigsuspend:; - - ld [%o0], %o0; - mov SYS_sigsuspend, %g1; - ta 0; - bcs 1b; - nop; - retl - nop diff --git a/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.3.S b/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.3.S deleted file mode 100644 index a2941ece7c9..00000000000 --- a/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.3.S +++ /dev/null @@ -1,46 +0,0 @@ -#include <machine/asm.h> -#define COMPAT_43 -#include <sys/syscall.h> -#define CHMK() call_pal 0x83 - -#undef SYSCALL - -/* Kernel syscall interface: - Input: - v0 - system call number - a* - arguments, as in C - Output: - a3 - zero iff successful - v0 - errno value on failure, else result - - This macro is similar to SYSCALL in asm.h, but not completely. - There's room for optimization, if we assume this will continue to - be assembled as one file. - - This macro expansions does not include the return instruction. - If there's no other work to be done, use something like: - SYSCALL(foo) ; ret - If there is other work to do (in fork, maybe?), do it after the - SYSCALL invocation. */ - -#define SYSCALL(x) \ - .align 4 ;\ - .globl machdep_sys_##x ;\ - .ent machdep_sys_##x, 0 ;\ -machdep_sys_##x: ;\ - .frame sp,0,ra ;\ - ldiq v0, SYS_##x ;\ - CHMK() ;\ - beq a3, Lsys_noerr_##x ;\ - br gp, Lsys_err_##x ;\ -Lsys_err_##x: ;\ - /* Load gp so we can find cerror to jump to. */;\ - ldgp gp, 0(gp) ;\ - jmp zero, machdep_cerror ;\ -Lsys_noerr_##x: - -#define SIMPLE_SYSCALL(x) SYSCALL(x) ; ret ; .end machdep_sys_##x - -#define XSYSCALL(x) SIMPLE_SYSCALL(x) - -XSYSCALL(SYSCALL_NAME) diff --git a/lib/libpthread/machdep/syscall-template-i386-openbsd-2.0.S b/lib/libpthread/machdep/syscall-template-i386-openbsd-2.0.S deleted file mode 100644 index 34fb5caaa43..00000000000 --- a/lib/libpthread/machdep/syscall-template-i386-openbsd-2.0.S +++ /dev/null @@ -1,48 +0,0 @@ -#include <sys/syscall.h> - -#ifdef __STDC__ - -#define SYSCALL(x) \ - .globl _machdep_sys_##x##; \ - \ -_machdep_sys_##x:##; \ - \ - movl $(SYS_##x##), %eax; \ - .byte 0x9a; .long 0; .word 7; \ - jb 1b; \ - ret; - -#else - -#define SYSCALL(x) \ - .globl _machdep_sys_/**/x; \ - \ -_machdep_sys_/**/x:; \ - \ - movl $(SYS_/**/x), %eax; \ - .byte 0x9a; .long 0; .word 7; \ - jb 1b; \ - ret; - -#endif - - -/* - * Initial asm stuff for all functions. - */ - .text - .align 2 - - -/* ========================================================================== - * error code for all syscalls. The error value is returned as the negative - * of the errno value. - */ - -1: - neg %eax - ret - -#define XSYSCALL(NAME) SYSCALL(NAME) - -XSYSCALL(SYSCALL_NAME) diff --git a/lib/libpthread/machdep/syscall-template-sparc-netbsd-1.1.S b/lib/libpthread/machdep/syscall-template-sparc-netbsd-1.1.S deleted file mode 100644 index 2d07892a315..00000000000 --- a/lib/libpthread/machdep/syscall-template-sparc-netbsd-1.1.S +++ /dev/null @@ -1,40 +0,0 @@ -/* ==== syscall.S ============================================================ - * Copyright (c) 1994 Chris Provenzano, proven@mit.edu - * All rights reserved. - * - */ - -#include <sys/syscall.h> - -#define SYSCALL(x) \ - .globl _machdep_sys_##x; \ - \ -_machdep_sys_##x:; \ - \ - mov SYS_##x, %g1; \ - ta 0; \ - bcs,a 2b; \ - sub %r0,%o0,%o0; \ - retl; \ - nop - -/* - * Initial asm stuff for all functions. - */ - .text - .align 4 - -/* ========================================================================== - * error code for all syscalls. The error value is returned as the negative - * of the errno value. - */ - -1: - sub %r0, %o0, %o0 -2: - retl - nop - -#define XSYSCALL(NAME) SYSCALL(NAME) - -XSYSCALL(SYSCALL_NAME) |