summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Galbavy <peter@cvs.openbsd.org>1998-07-21 15:36:23 +0000
committerPeter Galbavy <peter@cvs.openbsd.org>1998-07-21 15:36:23 +0000
commita07ab1f7619bb5c4f60d11114c0865d849f21ecf (patch)
tree339ed78f8b4db640e9ed1a172db0b76f012d3caf /lib
parent957e9d4bea632a32d15f143b891ef5f5457bbc72 (diff)
remove irrelevant files
retained some netbsd files to act as templates for openbsd
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/machdep/engine-alpha-netbsd-1.1.c196
-rw-r--r--lib/libpthread/machdep/engine-alpha-netbsd-1.1.h111
-rw-r--r--lib/libpthread/machdep/engine-alpha-osf1.c207
-rw-r--r--lib/libpthread/machdep/engine-alpha-osf1.h110
-rw-r--r--lib/libpthread/machdep/engine-hppa-hpux-10.20.c169
-rw-r--r--lib/libpthread/machdep/engine-hppa-hpux-10.20.h143
-rw-r--r--lib/libpthread/machdep/engine-hppa-hpux-9.03.c153
-rw-r--r--lib/libpthread/machdep/engine-hppa-hpux-9.03.h141
-rw-r--r--lib/libpthread/machdep/engine-i386-bsdi-1.1.c180
-rw-r--r--lib/libpthread/machdep/engine-i386-bsdi-1.1.h84
-rw-r--r--lib/libpthread/machdep/engine-i386-bsdi-2.0.c210
-rw-r--r--lib/libpthread/machdep/engine-i386-bsdi-2.0.h98
-rw-r--r--lib/libpthread/machdep/engine-i386-freebsd-1.1.c179
-rw-r--r--lib/libpthread/machdep/engine-i386-freebsd-1.1.h83
-rw-r--r--lib/libpthread/machdep/engine-i386-freebsd-2.0.c208
-rw-r--r--lib/libpthread/machdep/engine-i386-freebsd-2.0.h97
-rw-r--r--lib/libpthread/machdep/engine-i386-linux-1.0.c503
-rw-r--r--lib/libpthread/machdep/engine-i386-linux-1.0.h98
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-0.9.c155
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-0.9.h83
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-1.0.c218
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-1.0.h97
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-1.3.c225
-rw-r--r--lib/libpthread/machdep/engine-i386-netbsd-1.3.h97
-rwxr-xr-xlib/libpthread/machdep/engine-i386-sco-3.2v5.c1072
-rw-r--r--lib/libpthread/machdep/engine-i386-sco-3.2v5.h104
-rw-r--r--lib/libpthread/machdep/engine-ip22-irix-5.2.c225
-rw-r--r--lib/libpthread/machdep/engine-ip22-irix-5.2.h108
-rw-r--r--lib/libpthread/machdep/engine-r2000-ultrix-4.2.c209
-rw-r--r--lib/libpthread/machdep/engine-r2000-ultrix-4.2.h107
-rw-r--r--lib/libpthread/machdep/engine-romp-bsd.c99
-rw-r--r--lib/libpthread/machdep/engine-romp-bsd.h100
-rw-r--r--lib/libpthread/machdep/engine-sparc-sunos-4.1.3.c227
-rw-r--r--lib/libpthread/machdep/engine-sparc-sunos-4.1.3.h105
-rw-r--r--lib/libpthread/machdep/engine-sparc-sunos-5.3.c308
-rw-r--r--lib/libpthread/machdep/engine-sparc-sunos-5.3.h129
-rw-r--r--lib/libpthread/machdep/posix-alpha-osf1.h7
-rw-r--r--lib/libpthread/machdep/posix-bsdi-1.1.h34
-rw-r--r--lib/libpthread/machdep/posix-bsdi-2.0.h34
-rw-r--r--lib/libpthread/machdep/posix-freebsd-1.1.h33
-rw-r--r--lib/libpthread/machdep/posix-freebsd-2.0.h31
-rw-r--r--lib/libpthread/machdep/posix-hpux-10.20.h23
-rw-r--r--lib/libpthread/machdep/posix-hpux-9.03.h23
-rw-r--r--lib/libpthread/machdep/posix-i386-sco-3.2v5.h35
-rw-r--r--lib/libpthread/machdep/posix-irix-5.2.h31
-rw-r--r--lib/libpthread/machdep/posix-linux-1.0.h31
-rw-r--r--lib/libpthread/machdep/posix-netbsd-0.9.h22
-rw-r--r--lib/libpthread/machdep/posix-netbsd-1.0.h31
-rw-r--r--lib/libpthread/machdep/posix-netbsd-1.1.h31
-rw-r--r--lib/libpthread/machdep/posix-romp-bsd.h33
-rw-r--r--lib/libpthread/machdep/posix-sco-3.2v5.h35
-rw-r--r--lib/libpthread/machdep/posix-sunos-4.1.3.h27
-rw-r--r--lib/libpthread/machdep/posix-sunos-5.3.h22
-rw-r--r--lib/libpthread/machdep/posix-sunos-5.5.h22
-rw-r--r--lib/libpthread/machdep/posix-ultrix-4.2.h24
-rw-r--r--lib/libpthread/machdep/syscall-alpha-netbsd-1.1.S206
-rw-r--r--lib/libpthread/machdep/syscall-alpha-osf1.S97
-rw-r--r--lib/libpthread/machdep/syscall-hppa-hpux-10.20.S23
-rw-r--r--lib/libpthread/machdep/syscall-hppa-hpux-9.03.S23
-rw-r--r--lib/libpthread/machdep/syscall-i386-bsdi-1.1.S288
-rw-r--r--lib/libpthread/machdep/syscall-i386-bsdi-2.0.S294
-rw-r--r--lib/libpthread/machdep/syscall-i386-freebsd-1.1.S293
-rw-r--r--lib/libpthread/machdep/syscall-i386-freebsd-2.0.S237
-rw-r--r--lib/libpthread/machdep/syscall-i386-linux-1.0.S406
-rw-r--r--lib/libpthread/machdep/syscall-i386-netbsd-0.9.S229
-rw-r--r--lib/libpthread/machdep/syscall-i386-netbsd-1.0.S158
-rw-r--r--lib/libpthread/machdep/syscall-i386-netbsd-1.1.S181
-rw-r--r--lib/libpthread/machdep/syscall-i386-netbsd-1.3.S196
-rw-r--r--lib/libpthread/machdep/syscall-i386-sco-3.2v5.S442
-rw-r--r--lib/libpthread/machdep/syscall-ip22-irix-5.2.S106
-rw-r--r--lib/libpthread/machdep/syscall-r2000-ultrix-4.2.S166
-rw-r--r--lib/libpthread/machdep/syscall-romp-bsd.S327
-rw-r--r--lib/libpthread/machdep/syscall-sparc-sunos-4.1.3.S113
-rw-r--r--lib/libpthread/machdep/syscall-sparc-sunos-5.3.S65
-rw-r--r--lib/libpthread/machdep/syscall-sparc-sunos4.S113
-rw-r--r--lib/libpthread/machdep/syscall-template-alpha-netbsd-1.1.S46
-rw-r--r--lib/libpthread/machdep/syscall-template-alpha-osf1.S46
-rw-r--r--lib/libpthread/machdep/syscall-template-hppa-hpux-10.20.S27
-rw-r--r--lib/libpthread/machdep/syscall-template-hppa-hpux-9.03.S27
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-bsdi-2.0.S48
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-freebsd-2.0.S48
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-netbsd-1.1.S49
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-netbsd-1.3.S49
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-netbsd1.0.S49
-rw-r--r--lib/libpthread/machdep/syscall-template-i386-sco-3.2v5.S67
-rw-r--r--lib/libpthread/machdep/syscall-template-ip22-irix-5.2.S51
-rw-r--r--lib/libpthread/machdep/syscall-template-r2000-ultrix-4.2.S77
-rw-r--r--lib/libpthread/machdep/syscall-template-sparc-sunos-5.3.S45
-rw-r--r--lib/libpthread/machdep/syscall-template-sparc-sunos4.S40
-rw-r--r--lib/libpthread/machdep/unistd-i386-freebsd-1.1.h178
-rw-r--r--lib/libpthread/machdep/unistd-i386-linux-1.0.h59
-rw-r--r--lib/libpthread/machdep/unistd-sparc-sunos-4.1.3.h215
92 files changed, 0 insertions, 12251 deletions
diff --git a/lib/libpthread/machdep/engine-alpha-netbsd-1.1.c b/lib/libpthread/machdep/engine-alpha-netbsd-1.1.c
deleted file mode 100644
index c1ff04db16d..00000000000
--- a/lib/libpthread/machdep/engine-alpha-netbsd-1.1.c
+++ /dev/null
@@ -1,196 +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));
-}
diff --git a/lib/libpthread/machdep/engine-alpha-netbsd-1.1.h b/lib/libpthread/machdep/engine-alpha-netbsd-1.1.h
deleted file mode 100644
index 50c872da7b6..00000000000
--- a/lib/libpthread/machdep/engine-alpha-netbsd-1.1.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-alpha-osf1.c b/lib/libpthread/machdep/engine-alpha-osf1.c
deleted file mode 100644
index 0e970b6c0d1..00000000000
--- a/lib/libpthread/machdep/engine-alpha-osf1.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for SunOS-4.1.3 on sparc
- *
- * 1.00 93/08/04 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-alpha-osf1.c,v 1.1 1998/07/21 13:19:13 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <stdlib.h>
-
-/* These would be defined in setjmp.h, if _POSIX_SOURCE and _XOPEN_SOURCE
- were both undefined. But we've already included it, and lost the
- opportunity. */
-#define JB_PC 2
-#define JB_RA 30
-#define JB_PV 31
-#define JB_SP 34
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return setjmp (pthread_run->machdep_data.machdep_state);
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-extern void machdep_restore_from_setjmp (jmp_buf, long);
-void machdep_restore_state(void)
-{
- machdep_restore_from_setjmp (pthread_run->machdep_data.machdep_state, 1);
-}
-
-void machdep_save_float_state (void) { }
-void machdep_restore_float_state (void) { }
-
-/* ==========================================================================
- * 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;
-
- setjmp(machdep_pthread->machdep_state);
-
- /* 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_state[JB_RA] = 0;
- machdep_pthread->machdep_state[JB_PC] = (long)machdep_pthread_start;
- machdep_pthread->machdep_state[JB_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_state[JB_SP] = stk_addr;
- }
-}
-
-/* ==========================================================================
- * 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 pid, int * statusp, int options)
-{
- return machdep_sys_wait4 (pid, statusp, options, NULL);
-}
-
-/* These are found in flsbuf.o in the Alpha libc. I don't know what
- they're for, precisely. */
-static xxx;
-_bufsync (p)
- char *p;
-{
- long a1 = *(long *)(p+48);
- long t0 = *(long *)(p+8);
- long v0 = a1 - t0;
- long t1, t2;
-
- abort ();
-
- v0 += xxx;
- if (v0 < 0)
- {
- *(char**)(p + 8) = p;
- return v0;
- }
- t1 = *(int*)p;
- t2 = v0 - t1;
- if (t2 < 0)
- *(int*)p = (int) v0;
- return v0;
-}
-
-_findbuf () { abort (); }
-_wrtchk () { abort (); }
-_xflsbuf () { abort (); }
-_flsbuf () { abort (); }
-
-void __xxx_never_called () {
- /* Force other stuff to get dragged in. */
- _cleanup ();
- fflush (NULL);
- fclose (NULL);
-}
-
-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;
-}
diff --git a/lib/libpthread/machdep/engine-alpha-osf1.h b/lib/libpthread/machdep/engine-alpha-osf1.h
deleted file mode 100644
index 993d8d370d5..00000000000
--- a/lib/libpthread/machdep/engine-alpha-osf1.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1994 Chris Provenzano (proven@athena.mit.edu) and
- * Ken Raeburn (raeburn@mit.edu).
- *
- * $Id: engine-alpha-osf1.h,v 1.1 1998/07/21 13:19:13 peter Exp $
- *
- */
-
-#ifndef sigwait
-#define sigwait __bogus_osf1_sigwait
-#endif
-
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/time.h>
-#include <sys/cdefs.h>
-
-#undef sigwait
-
-/* 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)
-
-/*
- * New Strutures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
-};
-
-/*
- * 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));
-
-#endif
-
-__END_DECLS
diff --git a/lib/libpthread/machdep/engine-hppa-hpux-10.20.c b/lib/libpthread/machdep/engine-hppa-hpux-10.20.c
deleted file mode 100644
index f6f0b2e0f1d..00000000000
--- a/lib/libpthread/machdep/engine-hppa-hpux-10.20.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for HP-UX 9.03 on hppa
- *
- * 1.00 93/12/14 proven
- * -Started coding this file.
- */
-
-#include <pthread.h>
-#include <setjmp.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-volatile int setupStack = 0;
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * machdep_save_float_state()
- */
-void machdep_save_float_state(struct pthread * pthread)
-{
- return;
-}
-
-/* ==========================================================================
- * machdep_restore_float_state()
- */
-void machdep_restore_float_state()
-{
- return;
-}
-
-/* ==========================================================================
- * 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(jmp_buf j)
-{
- setjmp(j);
- if( setupStack )
- return;
-
- 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)
-{
- jmp_buf tmp_jmp_buf;
-
- 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().
- */
- setjmp(machdep_pthread->machdep_state);
-
- /* get the stack frame from the real machdep_pthread_start */
- setupStack = 1;
-/* machdep_pthread_start(machdep_pthread->machdep_state); */
- machdep_pthread_start(tmp_jmp_buf);
- setupStack = 0;
-
- /* copy over the interesting part of the frame */
- ((int *)machdep_pthread->machdep_state)[44] = ((int *)tmp_jmp_buf)[44];
-
- /* Stack starts low and builds up, but needs two start frames */
- ((int *)machdep_pthread->machdep_state)[1] =
- (int)machdep_pthread->machdep_stack + (64 * 2);
-}
-
-int machdep_sys_getdtablesize()
-{
- return sysconf(_SC_OPEN_MAX);
-}
-
-void sig_check_and_resume()
-{
- return;
-}
-
-void ___exit(int status)
-{
- exit(status);
- PANIC();
-}
diff --git a/lib/libpthread/machdep/engine-hppa-hpux-10.20.h b/lib/libpthread/machdep/engine-hppa-hpux-10.20.h
deleted file mode 100644
index 9cbe3349a3d..00000000000
--- a/lib/libpthread/machdep/engine-hppa-hpux-10.20.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- */
-
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/time.h>
-
-/*
- * Stuff for compiling
- */
-#if defined(__GNUC__)
-#if defined(__cplusplus)
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS };
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#if !defined(__STDC__)
-#define const __const
-#define inline __inline
-#define signed __signed
-#define volatile __volatile
-#endif
-#endif
-#else /* !__GNUC__ */
-#define __BEGIN_DECLS
-#define __END_DECLS
-#if !defined(__STDC__)
-#define const
-#endif
-#define inline
-#define signed
-#define volatile
-#endif
-
-/*
- * The first machine dependent functions are the SEMAPHORES
- * needing the test and set instruction.
- *
- * Note: The set and clear defines are backwards.
- */
-#define SEMAPHORE_CLEAR { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
-#define SEMAPHORE_SET 0
-
-#define SEMAPHORE_TEST_AND_SET(lock) \
-({ \
-long real_addr; \
-long temp; \
- \
-real_addr = ((long)((*lock) + 15) & ~15); \
- \
-__asm__ volatile("ldcwx %%r0(%2),%0" \
- :"=r" (temp) \
- :"0" (temp),"r" (real_addr)); \
-temp ? 0 : 1; \
-})
-
-#define SEMAPHORE_RESET(lock) \
-({ \
-char *real_addr; \
- \
-real_addr = (char*)((long)((*lock) + 15) & ~15); \
-*real_addr = 0xff; \
-})
-
-/*
- * New types
- * The semaphore is really 16 bytes but must be aligened on a 16 byte
- * boundary. By specifing 31 bytes the macros can frob it correctly.
- */
-typedef char semaphore[31];
-
-/*
- * Macros for sigset_t
- */
-#define SIGMAX 30
-/* see hpux-9.03/__signal.h for SIG_ANY */
-
-/*
- * New Strutures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
- /* long machdep_state[_JBLEN]; */
-};
-
-/*
- * 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 4096
-
-/*
- * Some fd flag defines that are necessary to distinguish between posix
- * behavior and bsd4.3 behavior.
- */
-#define __FD_NONBLOCK O_NONBLOCK
-
-/*
- * page size
- */
-#define getpagesize() 4096
-
-/*
- * 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-hppa-hpux-9.03.c b/lib/libpthread/machdep/engine-hppa-hpux-9.03.c
deleted file mode 100644
index 3770a2e106a..00000000000
--- a/lib/libpthread/machdep/engine-hppa-hpux-9.03.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for HP-UX 9.03 on hppa
- *
- * 1.00 93/12/14 proven
- * -Started coding this file.
- */
-
-#include <pthread.h>
-#include <setjmp.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * machdep_save_float_state()
- */
-void machdep_save_float_state(struct pthread * pthread)
-{
- return;
-}
-
-/* ==========================================================================
- * machdep_restore_float_state()
- */
-void machdep_restore_float_state()
-{
- return;
-}
-
-/* ==========================================================================
- * 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;
-
- 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().
- */
- ((int *)machdep_pthread->machdep_state)[0] = (int)machdep_pthread_start;
-
- /* Stack starts low and builds up, but needs two start frames */
- ((int *)machdep_pthread->machdep_state)[1] =
- (int)machdep_pthread->machdep_stack + (64 * 2);
-}
-
-int machdep_sys_getdtablesize()
-{
- return sysconf(_SC_OPEN_MAX);
-}
-
-void sig_check_and_resume()
-{
- return;
-}
-
-void ___exit(int status)
-{
- exit(status);
- PANIC();
-}
diff --git a/lib/libpthread/machdep/engine-hppa-hpux-9.03.h b/lib/libpthread/machdep/engine-hppa-hpux-9.03.h
deleted file mode 100644
index 7c599400e3e..00000000000
--- a/lib/libpthread/machdep/engine-hppa-hpux-9.03.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- */
-
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/time.h>
-
-/*
- * Stuff for compiling
- */
-#if defined(__GNUC__)
-#if defined(__cplusplus)
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS };
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#if !defined(__STDC__)
-#define const __const
-#define inline __inline
-#define signed __signed
-#define volatile __volatile
-#endif
-#endif
-#else /* !__GNUC__ */
-#define __BEGIN_DECLS
-#define __END_DECLS
-#define const
-#define inline
-#define signed
-#define volatile
-#endif
-
-/*
- * The first machine dependent functions are the SEMAPHORES
- * needing the test and set instruction.
- *
- * Note: The set and clear defines are backwards.
- */
-#define SEMAPHORE_CLEAR { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, \
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
-#define SEMAPHORE_SET 0
-
-#define SEMAPHORE_TEST_AND_SET(lock) \
-({ \
-long real_addr; \
-long temp; \
- \
-real_addr = ((long)((*lock) + 15) & ~15); \
- \
-__asm__ volatile("ldcwx %%r0(%2),%0" \
- :"=r" (temp) \
- :"0" (temp),"r" (real_addr)); \
-temp ? 0 : 1; \
-})
-
-#define SEMAPHORE_RESET(lock) \
-({ \
-char *real_addr; \
- \
-real_addr = (char*)((long)((*lock) + 15) & ~15); \
-*real_addr = 0xff; \
-})
-
-/*
- * New types
- * The semaphore is really 16 bytes but must be aligened on a 16 byte
- * boundary. By specifing 31 bytes the macros can frob it correctly.
- */
-typedef char semaphore[31];
-
-/*
- * Macros for sigset_t
- */
-#define SIGMAX 30
-/* see hpux-9.03/__signal.h for SIG_ANY */
-
-/*
- * New Strutures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
- /* long machdep_state[_JBLEN]; */
-};
-
-/*
- * 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 4096
-
-/*
- * Some fd flag defines that are necessary to distinguish between posix
- * behavior and bsd4.3 behavior.
- */
-#define __FD_NONBLOCK O_NONBLOCK
-
-/*
- * page size
- */
-#define getpagesize() 4096
-
-/*
- * 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-i386-bsdi-1.1.c b/lib/libpthread/machdep/engine-i386-bsdi-1.1.c
deleted file mode 100644
index 0a58c03c448..00000000000
--- a/lib/libpthread/machdep/engine-i386-bsdi-1.1.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-bsdi-1.1.c,v 1.1 1998/07/21 13:19:13 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(_setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- _longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * 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();
- sig_check_and_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_pthread_create()
- */
-void machdep_pthread_create(struct machdep_pthread *machdep_pthread,
- void *(* start_routine)(), void *start_argument, long stack_size,
- void *stack_start, long nsec)
-{
- machdep_pthread->machdep_stack = stack_start;
-
- 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;
-
- _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_send()
- */
-machdep_sys_send(int s, const void *buf, int len, int flags)
-{
- return(machdep_sys_sendto(s, buf, len, flags, (struct sockaddr*)NULL, 0));
-}
-
-/* ==========================================================================
- * machdep_sys_recv()
- */
-machdep_sys_recv(int s, void *buf, int len, int flags)
-{
- return(machdep_sys_recvfrom(s, buf, len, flags, (struct sockaddr*)NULL, 0));
-}
diff --git a/lib/libpthread/machdep/engine-i386-bsdi-1.1.h b/lib/libpthread/machdep/engine-i386-bsdi-1.1.h
deleted file mode 100644
index 538c0e5195e..00000000000
--- a/lib/libpthread/machdep/engine-i386-bsdi-1.1.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-bsdi-1.1.h,v 1.1 1998/07/21 13:19:13 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;
-};
-
-/*
- * 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)
-
-int machdep_save_state __P_((void));
-
-#endif
-
-__END_DECLS
-
diff --git a/lib/libpthread/machdep/engine-i386-bsdi-2.0.c b/lib/libpthread/machdep/engine-i386-bsdi-2.0.c
deleted file mode 100644
index a35ca4e59a7..00000000000
--- a/lib/libpthread/machdep/engine-i386-bsdi-2.0.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-bsdi-2.0.c,v 1.1 1998/07/21 13:19:13 peter 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(_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)
-{
- _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;
-
- _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));
-}
-
diff --git a/lib/libpthread/machdep/engine-i386-bsdi-2.0.h b/lib/libpthread/machdep/engine-i386-bsdi-2.0.h
deleted file mode 100644
index 3be254b4090..00000000000
--- a/lib/libpthread/machdep/engine-i386-bsdi-2.0.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * engine-i386-netbsd-1.0.h,v 1.53 1994/12/13 07:17:23 proven 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|O_NDELAY)
-
-/*
- * 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-i386-freebsd-1.1.c b/lib/libpthread/machdep/engine-i386-freebsd-1.1.c
deleted file mode 100644
index 125603dfbdb..00000000000
--- a/lib/libpthread/machdep/engine-i386-freebsd-1.1.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-freebsd-1.1.c,v 1.1 1998/07/21 13:19:13 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdio.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(_setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- _longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * 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();
- sig_check_and_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_pthread_create()
- */
-void machdep_pthread_create(struct machdep_pthread *machdep_pthread,
- void *(* start_routine)(), void *start_argument, long stack_size,
- void *stack_start, long nsec)
-{
- machdep_pthread->machdep_stack = stack_start;
-
- 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;
-
- _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_send()
- */
-machdep_sys_send(int s, const void *buf, int len, int flags)
-{
- return(machdep_sys_sendto(s, buf, len, flags, NULL, 0));
-}
-
-/* ==========================================================================
- * machdep_sys_recv()
- */
-machdep_sys_recv(int s, void *buf, int len, int flags)
-{
- return(machdep_sys_recvfrom(s, buf, len, flags, NULL, 0));
-}
diff --git a/lib/libpthread/machdep/engine-i386-freebsd-1.1.h b/lib/libpthread/machdep/engine-i386-freebsd-1.1.h
deleted file mode 100644
index 4585440e814..00000000000
--- a/lib/libpthread/machdep/engine-i386-freebsd-1.1.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-freebsd-1.1.h,v 1.1 1998/07/21 13:19:13 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;
-};
-
-/*
- * 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)
-
-int machdep_save_state __P_((void));
-
-#endif
-
-__END_DECLS
diff --git a/lib/libpthread/machdep/engine-i386-freebsd-2.0.c b/lib/libpthread/machdep/engine-i386-freebsd-2.0.c
deleted file mode 100644
index 3b6b8f31ae0..00000000000
--- a/lib/libpthread/machdep/engine-i386-freebsd-2.0.c
+++ /dev/null
@@ -1,208 +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->_jb[0] = (int)machdep_pthread_start;
-
- /* Stack starts high and builds down. */
- machdep_pthread->machdep_state->_jb[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));
-}
-
diff --git a/lib/libpthread/machdep/engine-i386-freebsd-2.0.h b/lib/libpthread/machdep/engine-i386-freebsd-2.0.h
deleted file mode 100644
index a98219939de..00000000000
--- a/lib/libpthread/machdep/engine-i386-freebsd-2.0.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-freebsd-2.0.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 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-i386-linux-1.0.c b/lib/libpthread/machdep/engine-i386-linux-1.0.c
deleted file mode 100644
index b3ab3ba7dce..00000000000
--- a/lib/libpthread/machdep/engine-i386-linux-1.0.c
+++ /dev/null
@@ -1,503 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for Linux-1.0 on i386
- *
- * 1.00 93/08/04 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-i386-linux-1.0.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/uio.h>
-#include <sys/types.h>
-#include <sys/param.h> /* for OPEN_MAX */
-#include <sys/socket.h>
-#include <sys/socketcall.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(_setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * machdep_save_float_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_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} };
-
- 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 flag)
-{
- 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;
-
- 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->__pc = (char *)machdep_pthread_start;
- machdep_pthread->machdep_state->__bp = (char *)0;/* So the backtrace
- * is sensible (mevans) *
-
- /* Stack starts high and builds down. */
- machdep_pthread->machdep_state->__sp =
- (char *)machdep_pthread->machdep_stack + stack_size;
-}
-
-
-/* ==========================================================================
- * Linux Socket calls are a bit different
- * ==========================================================================
- * machdep_sys_socket()
- */
-int machdep_sys_socket(int a, int b, int c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_SOCKET, array));
-}
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
-int machdep_sys_accept(int a, struct sockaddr * b, int * c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_ACCEPT, array));
-}
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
-int machdep_sys_bind(int a, const struct sockaddr * b, int c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_BIND, array));
-}
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
-int machdep_sys_connect(int a, const struct sockaddr * b, int c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_CONNECT, array));
-}
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
-int machdep_sys_listen(int a, const struct sockaddr * b, int c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_LISTEN, array));
-}
-
-/* ==========================================================================
- * machdep_sys_shutdown()
- */
-int machdep_sys_shutdown(int a, int b)
-{
- int array[2];
-
- array[0] = (int)a;
- array[1] = (int)b;
-
- return(machdep_sys_socketcall(SYS_SHUTDOWN, array));
-}
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
-int machdep_sys_getsockopt(int a, int b, int c, char *d, int *e)
-{
- int array[5];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
- array[4] = (int)e;
-
- return(machdep_sys_socketcall(SYS_GETSOCKOPT, array));
-}
-
-/* ==========================================================================
- * machdep_sys_setsockopt()
- */
-int machdep_sys_setsockopt(int a, int b, int c, char *d, int e)
-{
- int array[5];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
- array[4] = (int)e;
-
- return(machdep_sys_socketcall(SYS_SETSOCKOPT, array));
-}
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
-int machdep_sys_getpeername(int a, struct sockaddr *b, int *c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_GETPEERNAME, array));
-}
-
-/* ==========================================================================
- * machdep_sys_send()
- */
-int machdep_sys_send(int a, char *b, int c, int d)
-{
- int array[4];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
-
- return(machdep_sys_socketcall(SYS_SEND, array));
-}
-
-/* ==========================================================================
- * machdep_sys_sendto()
- */
-int machdep_sys_sendto(int a, char *b, int c, int d,
- struct sockaddr *e, int f)
-{
- int array[6];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
- array[4] = (int)e;
- array[5] = (int)f;
-
- return(machdep_sys_socketcall(SYS_SENDTO, array));
-}
-
-/* ==========================================================================
- * machdep_sys_recv()
- */
-int machdep_sys_recv(int a, char *b, int c, int d)
-{
- int array[4];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
-
- return(machdep_sys_socketcall(SYS_RECV, array));
-}
-
-/* ==========================================================================
- * machdep_sys_recvfrom()
- */
-int machdep_sys_recvfrom(int a, char *b, int c, int d,
- struct sockaddr *e, int *f)
-{
- int array[6];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
- array[4] = (int)e;
- array[5] = (int)f;
-
- return(machdep_sys_socketcall(SYS_RECVFROM, array));
-}
-
-/* ==========================================================================
- * machdep_sys_socketpair()
- */
-int machdep_sys_socketpair(int a, int b, int c, int d[2])
-{
- int array[4];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
- array[3] = (int)d;
-
- return(machdep_sys_socketcall(SYS_SOCKETPAIR, array));
-}
-
-/* ==========================================================================
- * machdep_sys_getsockname()
- */
-int machdep_sys_getsockname(int a, char * b, int * c)
-{
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_GETSOCKNAME, array));
-}
-
-/* ==========================================================================
- * machdep_sys_sendmsg()
- */
-int machdep_sys_sendmsg(int a, char * b, int c)
-{
-#ifdef SYS_SENDMSG
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_SENDMSG, array));
-#else
- return(-ENOSYS);
-#endif
-}
-
-/* ==========================================================================
- * machdep_sys_recvmsg()
- */
-int machdep_sys_recvmsg(int a, char * b, int c)
-{
-#ifdef SYS_RECVMSG
- int array[3];
-
- array[0] = (int)a;
- array[1] = (int)b;
- array[2] = (int)c;
-
- return(machdep_sys_socketcall(SYS_RECVMSG, array));
-#else
- return(-ENOSYS);
-#endif
-}
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
-{
- int ret;
-
- if ((ret = machdep_sys_readdir(fd, buf, 1)) > 0) {
- return(1);
- }
- return(ret);
-}
-
-/* ==========================================================================
- * 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));
-}
-
-/* getdtablesize */
-machdep_sys_getdtablesize ()
-{
- return OPEN_MAX;
-}
-
-struct stat;
-
-/* ==========================================================================
- * _fxstat()
- */
-int _fxstat(int __ver, int fd, struct stat *buf)
-{
- int ret;
-
- if ((ret = fd_lock(fd, FD_READ, NULL)) == OK) {
- ret = machdep_sys_fstat(fd_table[fd]->fd.i, buf);
- fd_unlock(fd, FD_READ);
- }
- return(ret);
-}
-
-/* ==========================================================================
- * _lxstat()
- */
-int _lxstat(int __ver, const char * path, struct stat * buf)
-{
- int ret;
-
- if ((ret = machdep_sys_lstat(path, buf)) < OK) {
- SET_ERRNO(-ret);
- }
- return(ret);
-
-}
-
-/* ==========================================================================
- * _xstat()
- */
-int _xstat(int __ver, const char * path, struct stat * buf)
-{
- int ret;
-
- if ((ret = machdep_sys_stat(path, buf)) < OK) {
- SET_ERRNO(-ret);
- }
- return(ret);
-
-}
-
-/* ==========================================================================
- * strtol()
- */
-__strtol_internal(char * a, char ** b, int c)
-{
- return(strtol(a, b, c));
-}
-
-
diff --git a/lib/libpthread/machdep/engine-i386-linux-1.0.h b/lib/libpthread/machdep/engine-i386-linux-1.0.h
deleted file mode 100644
index 3794af34a82..00000000000
--- a/lib/libpthread/machdep/engine-i386-linux-1.0.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-linux-1.0.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 1
-
-#define SEMAPHORE_TEST_AND_SET(lock) \
-({ \
-volatile long temp = SEMAPHORE_SET; \
- \
-__asm__("xchgl %0,(%2)" \
- :"=r" (temp) \
- :"0" (temp),"r" (lock)); \
-temp; \
-})
-
-#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR
-
-/*
- * New types
- */
-typedef long semaphore;
-
-#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
-
-/*
- * sigset_t macros
- */
-#define SIG_ANY(sig) (sig)
-
-/*
- * 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-i386-netbsd-0.9.c b/lib/libpthread/machdep/engine-i386-netbsd-0.9.c
deleted file mode 100644
index f9bc2e0947a..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-0.9.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-netbsd-0.9.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <stdio.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(_setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- _longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * 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();
- sig_check_and_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_pthread_create()
- */
-void machdep_pthread_create(struct machdep_pthread *machdep_pthread,
- void *(* start_routine)(), void *start_argument, long stack_size,
- void *stack_start, long nsec)
-{
- machdep_pthread->machdep_stack = stack_start;
-
- 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;
-
- _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_send()
- */
-machdep_sys_send(int s, const void *buf, int len, int flags)
-{
- return(machdep_sys_sendto(s, buf, len, flags, (struct sockaddr*)NULL, 0));
-}
-
-/* ==========================================================================
- * machdep_sys_recv()
- */
-machdep_sys_recv(int s, void *buf, int len, int flags)
-{
- return(machdep_sys_recvfrom(s, buf, len, flags, (struct sockaddr*)NULL, 0));
-}
diff --git a/lib/libpthread/machdep/engine-i386-netbsd-0.9.h b/lib/libpthread/machdep/engine-i386-netbsd-0.9.h
deleted file mode 100644
index abdf63dd5d0..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-0.9.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-netbsd-0.9.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 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;
-};
-
-/*
- * 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)
-
-int machdep_save_state __P_((void));
-
-#endif
-
-__END_DECLS
diff --git a/lib/libpthread/machdep/engine-i386-netbsd-1.0.c b/lib/libpthread/machdep/engine-i386-netbsd-1.0.c
deleted file mode 100644
index ab4d62f3118..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-1.0.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-netbsd-1.0.c,v 1.1 1998/07/21 13:19:14 peter 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(_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)
-{
- _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;
-
- _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-netbsd-1.0.h b/lib/libpthread/machdep/engine-i386-netbsd-1.0.h
deleted file mode 100644
index 2015daabf84..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-1.0.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-netbsd-1.0.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 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-i386-netbsd-1.3.c b/lib/libpthread/machdep/engine-i386-netbsd-1.3.c
deleted file mode 100644
index 5e00303f301..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-1.3.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Copyright (c) 1993 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[] = "$Id: engine-i386-netbsd-1.3.c,v 1.1 1998/07/21 13:19:19 peter 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(_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)
-{
- _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;
-
- _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));
-}
-
-/* ==========================================================================
- * 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-i386-netbsd-1.3.h b/lib/libpthread/machdep/engine-i386-netbsd-1.3.h
deleted file mode 100644
index 2959b3ca841..00000000000
--- a/lib/libpthread/machdep/engine-i386-netbsd-1.3.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-i386-netbsd-1.3.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-i386-sco-3.2v5.c b/lib/libpthread/machdep/engine-i386-sco-3.2v5.c
deleted file mode 100755
index 95f0d757585..00000000000
--- a/lib/libpthread/machdep/engine-i386-sco-3.2v5.c
+++ /dev/null
@@ -1,1072 +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 SCO3.2v5 on i386
- *
- * 1.00 96/11/21 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/timeb.h>
-#include <sys/stat.h>
-#include <stropts.h>
-#include <sys/socket.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <errno.h>
-#include <sys/unistd.h>
-#include <sys/utsname.h>
-#include <sys/sysi86.h>
-
-void machdep_sys_abort(char*fname,int lineno)
-
-{
- char buf[128];
-
- sprintf(buf,"panic: %s => %d\n", fname, lineno);
- machdep_sys_write(1, buf, strlen(buf));
- abort();
-}
-
-#if 0
-int setitimer(int which, struct itimerval* value, struct itimerval* ovalue)
-
-{
- register int ret;
- if ((ret = machdep_sys_setitimer(which,value,ovalue))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-#endif
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(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)
-{
- 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 (machdep_sys_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 = machdep_sys_setitimer(ITIMER_VIRTUAL, &zeroval,
- &(machdep_pthread->machdep_timer));
- } else {
- ret = machdep_sys_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;
-
- 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[JB_PC] = (int)machdep_pthread_start;
-
- /* Stack starts high and builds down. */
- machdep_pthread->machdep_state[JB_SP] =
- (int)machdep_pthread->machdep_stack + stack_size;
-}
-
-/* ==========================================================================
- * machdep_sys_wait3()
- */
-machdep_sys_wait3(int * b, int c, int * d)
-{
-#if 0
- return(machdep_sys_wait4(0, b, c, d));
-#else
- return -ENOSYS;
-#endif
-}
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
-machdep_sys_fstat(int f, struct stat* b)
-{
- return machdep_sys_fxstat(0x33, f, b);
-}
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-machdep_sys_dup2(int a, int b)
-{
- machdep_sys_close(b);
- return machdep_sys_fcntl(a, F_DUPFD, b);
-}
-
-/* ==========================================================================
- * machdep_sys_getdtablesize()
- */
-machdep_sys_getdtablesize()
-
-{
- register int ret;
- if ((ret = machdep_sys_sysconf(_SC_OPEN_MAX))<0)
- PANIC();
- return ret;
-}
-
-/* ==========================================================================
- * machdep_sys_fchown()
- */
-machdep_sys_fchown(int fd,uid_t owner,gid_t group)
-
-{
- return -ENOSYS;
-}
-
-/* ==========================================================================
- * machdep_sys_fchmod()
- */
-machdep_sys_fchmod(int fd,mode_t mode)
-
-{
- return -ENOSYS;
-}
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
-{
- return(machdep_sys_getdents(fd, buf, len));
-}
-
-/* ==========================================================================
- * SCO Socket calls are a bit different
- * ==========================================================================
- * machdep_sys_socket()
- */
-int machdep_sys_socket(int domain, int type, int protocol)
-{
- register int s, fd, ret;
- struct socksysreq req;
-
- if ((s = machdep_sys_open("/dev/socksys", 0))<0)
- return s;
-
- req.args[0] = SO_SOCKET;
- req.args[1] = (int)domain;
- req.args[2] = (int)type;
- req.args[3] = (int)protocol;
- if ((fd = machdep_sys_ioctl(s, SIOCSOCKSYS, &req))<0) {
- machdep_sys_close(s);
- return fd;
- }
-
- if ((ret=machdep_sys_dup2(fd, s))<0) {
- machdep_sys_close(fd);
- return ret;
- }
-
- machdep_sys_close(fd);
- return s;
-
-}
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
-int machdep_sys_accept(int s, struct sockaddr * b, int * c)
-{
- struct socksysreq req;
-
- req.args[0] = SO_ACCEPT;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
-int machdep_sys_bind(int s, const struct sockaddr * b, int c)
-{
- struct socksysreq req;
-
- req.args[0] = SO_BIND;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
-int machdep_sys_connect(int s, const struct sockaddr * b, int c)
-{
- struct socksysreq req;
-
- req.args[0] = SO_CONNECT;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
-int machdep_sys_listen(int s, int backlog)
-{
- struct socksysreq req;
-
- req.args[0] = SO_LISTEN;
- req.args[1] = (int)s;
- req.args[2] = (int)backlog;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_shutdown()
- */
-int machdep_sys_shutdown(int s, int b)
-{
- struct socksysreq req;
-
- req.args[0] = SO_SHUTDOWN;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
-int machdep_sys_getsockopt(int s, int b, int c, char *d, int *e)
-{
- struct socksysreq req;
-
- req.args[0] = SO_GETSOCKOPT;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
- req.args[4] = (int)d;
- req.args[5] = (int)e;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_setsockopt()
- */
-int machdep_sys_setsockopt(int s, int b, int c, char *d, int e)
-{
- struct socksysreq req;
-
- req.args[0] = SO_SETSOCKOPT;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
- req.args[4] = (int)d;
- req.args[5] = (int)e;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
-int machdep_sys_getpeername(int s, struct sockaddr *b, int *c)
-{
- struct socksysreq req;
-
- req.args[0] = SO_GETPEERNAME;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_send()
- */
-int machdep_sys_send(int s, char *b, int c, int d)
-{
- struct socksysreq req;
-
- req.args[0] = SO_SEND;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
- req.args[4] = (int)d;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_sendto()
- */
-int machdep_sys_sendto(int s, char *b, int c, int d,
- struct sockaddr *e, int f)
-{
- struct socksysreq req;
-
- req.args[0] = SO_SENDTO;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
- req.args[4] = (int)d;
- req.args[5] = (int)e;
- req.args[6] = (int)f;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_recv()
- */
-int machdep_sys_recv(int s, char *b, int c, int d)
-{
- struct socksysreq req;
-
- req.args[0] = SO_RECV;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
- req.args[4] = (int)d;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_recvfrom()
- */
-int machdep_sys_recvfrom(int s, char *buf, int len, int flags,
- struct sockaddr *from, int *fromlen)
-{
- struct socksysreq req;
-
- req.args[0] = SO_RECVFROM;
- req.args[1] = (int)s;
- req.args[2] = (int)buf;
- req.args[3] = (int)len;
- req.args[4] = (int)flags;
- req.args[5] = (int)from;
- req.args[6] = (int)fromlen;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-/* ==========================================================================
- * machdep_sys_socketpair()
- */
-int machdep_sys_socketpair(int d, int type, int protocol, int sv[2])
-
-{
- register int s1, s2;
- register int ret;
- struct socksysreq req;
-
- if (d != AF_UNIX)
- return -EPROTONOSUPPORT;
- if ((s1=machdep_sys_socket(d,type,protocol))<0) {
- return s1;
- }
- if ((s2=machdep_sys_socket(d,type,protocol))<0) {
- machdep_sys_close(s1);
- return s2;
- }
- req.args[0] = SO_SOCKPAIR;
- req.args[1] = s1;
- req.args[2] = s2;
- if ((ret=machdep_sys_ioctl(s1,SIOCSOCKSYS,&req))<0) {
- machdep_sys_close(s1);
- machdep_sys_close(s2);
- return ret;
- }
- sv[0] = s1;
- sv[1] = s2;
- return 0;
-}
-
-/* ==========================================================================
- * machdep_sys_getsockname()
- */
-int machdep_sys_getsockname(int s, char * b, int * c)
-{
- struct socksysreq req;
-
- req.args[0] = SO_GETSOCKNAME;
- req.args[1] = (int)s;
- req.args[2] = (int)b;
- req.args[3] = (int)c;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-int machdep_sys_sendmsg(int s, const struct msghdr *msg, int flags)
-
-{
- struct socksysreq req;
-
- req.args[0] = SO_SENDMSG;
- req.args[1] = (int)s;
- req.args[2] = (int)msg;
- req.args[3] = (int)flags;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-int machdep_sys_recvmsg(int s, struct msghdr *msg, int flags)
-
-{
- struct socksysreq req;
-
- req.args[0] = SO_RECVMSG;
- req.args[1] = (int)s;
- req.args[2] = (int)msg;
- req.args[3] = (int)flags;
-
- return(machdep_sys_ioctl(s, SIOCSOCKSYS, &req));
-}
-
-u_short ntohs(u_short n)
-
-{
- union {
- unsigned char u_nc[4];
- u_short u_ns;
- } ns;
- register unsigned char* p = &ns.u_nc[0];
-
- ns.u_ns = n;
- return (p[0]<<8)|p[1];
-}
-
-u_short htons(u_short h)
-
-{
- union {
- unsigned char u_nc[2];
- u_short u_ns;
- } ns;
- register unsigned char* p = &ns.u_nc[0];
- p[0] = (h>>8)&0xFF;
- p[1] = (h&0xFF);
- return ns.u_ns;
-}
-
-
-u_long ntohl(u_long n)
-
-{
- union {
- unsigned char u_nc[4];
- u_long u_nl;
- } nl;
- register unsigned char* p = &nl.u_nc[0];
-
- nl.u_nl = n;
- return (p[0]<<24)|(p[1]<<16)|(p[2]<<8)|p[3];
-}
-
-u_long htonl(u_long h)
-
-{
- union {
- unsigned char u_nc[4];
- u_long u_nl;
- } nl;
- register unsigned char* p = &nl.u_nc[0];
- p[0] = (h>>24)&0xFF;
- p[1] = (h>>16)&0xFF;
- p[2] = (h>>8)&0xFF;
- p[3] = (h&0xFF);
- return nl.u_nl;
-}
-
-int getdomainname(char* domain,int len)
-
-{
- /* edi = len */
- struct socksysreq req;
- register int ret, fd;
- if (len>MAXHOSTNAMELEN)
- len = MAXHOSTNAMELEN;
-
- if ((fd = machdep_sys_open("/dev/socksys", 0)) < 0)
- return fd;
-
- req.args[0] = SO_GETIPDOMAIN;
- req.args[1] = (int)domain;
- req.args[2] = (int)len;
- if((ret=machdep_sys_ioctl(fd, SIOCSOCKSYS, &req))<0) {
- machdep_sys_close(fd);
- return ret;
- }
-
- machdep_sys_close(fd);
- domain[len-1] = '\0';
- return 0;
-}
-
-int gethostname(char* name, int namelen)
-
-{
- struct utsname uts;
- register int ret, len;
- char domain[MAXHOSTNAMELEN+1];
-
- if (name==NULL)
- return -EFAULT;
- if ((ret=machdep_sys_uname(&uts))<0)
- return ret;
- if (namelen<(len=strlen(uts.nodename)))
- return -EFAULT;
- strncpy(name,uts.nodename,len);
- if (namelen>len)
- name[len] = '\0';
- if ((ret=getdomainname(domain, namelen - len))<0)
- return ret;
- if (domain[0]=='\0')
- return 0;
- if (len + strlen(domain) + 2 > namelen)
- return -EFAULT;
- strcat(name, ".");
- strcat(name, domain);
- return 0;
-}
-
-int gettimeofday(struct timeval* tp, struct timezone* tz)
-
-{
- register int ret;
- if ((ret = machdep_sys_gettimeofday(tp, NULL))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-
-int kill(pid_t pid, int signo)
-
-{
- register int ret;
- if ((ret = machdep_sys_kill(pid,signo))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-
-typedef void (*signal_t(int signo, void (*func)(int)))(int);
-
-signal_t* _libc_signal = NULL;
-
-void (*signal(int signo, void (*func)(int)))(int)
-
-{
- int ret;
- void (*oldfunc)(int);
- extern void (*machdep_sys_signal(int signo, void (*func)(int),int* r))(int);
- if (_libc_signal!=NULL)
- return (*_libc_signal)(signo, func);
-
- oldfunc = machdep_sys_signal(signo, func, &ret);
- if (ret!=0) {
- errno = ret;
- return SIG_ERR;
- }
- else {
- return oldfunc;
- }
-}
-
-int (*_libc_sigaction)(int ,const struct sigaction *, struct sigaction *) = NULL;
-int sigaction(int sig,const struct sigaction *act, struct sigaction *oact)
-
-{
- register int ret;
- if (_libc_sigaction!=NULL)
- return (*_libc_sigaction)(sig,act,oact);
- if ((ret = machdep_sys_sigaction(sig,act,oact))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-
-int (*_libc_sigprocmask)(int, const sigset_t *, sigset_t *) = NULL;
-
-int sigprocmask(int how, const sigset_t *set, sigset_t * oset)
-
-{
- register int ret;
- if (_libc_sigprocmask!=NULL)
- return (*_libc_sigprocmask)(how,set,oset);
- if ((ret = machdep_sys_sigprocmask(how,set,oset))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-
-int (*_libc_sigsuspend)(const sigset_t *) = NULL;
-
-int sigsuspend(const sigset_t *set)
-{
- register int ret;
- if (_libc_sigsuspend!=NULL)
- return (*_libc_sigsuspend)(set);
- if ((ret = machdep_sys_sigsuspend(set))<0) {
- errno = -ret;
- return -1;
- }
- else {
- return 0;
- }
-}
-
-int _sigrelse(sig)
-int sig;
-
-{
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, sig);
- return sigprocmask(SIG_UNBLOCK,&mask,NULL);
-}
-
-int _sighold(sig)
-int sig;
-
-{
- sigset_t mask;
- sigemptyset(&mask);
- sigaddset(&mask, sig);
- return sigprocmask(SIG_BLOCK,&mask,NULL);
-}
-
-void (*sigset(int sig, void (*func)(int)))(int)
-{
- return signal(sig, func);
-}
-
-
-int (*_libc_getmsg)(int , struct strbuf *, struct strbuf *, int *) = NULL;
-
-int getmsg(int fd, struct strbuf * ctlptr, struct strbuf * dataptr,
- int * flags)
-{
- register int ret;
- if (_libc_getmsg != NULL)
- return (*_libc_getmsg)(fd,ctlptr,dataptr,flags);
- else if ((ret=machdep_sys_getmsg(fd,ctlptr,dataptr,flags))<0) {
- errno = -ret;
- return -1;
- }
- else
- return ret;
-}
-
-int (*_libc_putmsg)(int , const struct strbuf *, const struct strbuf *, int) = NULL;
-
-int putmsg(int fd, const struct strbuf * ctlptr, const struct strbuf * dataptr,
- int flags)
-{
- register int ret;
- if (_libc_putmsg != NULL)
- return (*_libc_putmsg)(fd,ctlptr,dataptr,flags);
- else if ((ret=machdep_sys_putmsg(fd,ctlptr,dataptr,flags))<0) {
- errno = -ret;
- return -1;
- }
- else
- return ret;
-}
-
-int ftime(struct timeb* tp)
-
-{
- register int ret;
- if ((ret=machdep_sys_ftime(tp))<0) {
- errno = -ret;
- return NOTOK;
- }
- return 0;
-}
-
-int getpagesize()
-
-{
- register int ret;
-#if 0
- if ((ret = machdep_sys_sysconf(_SC_PAGE_SIZE))<0) {
- PANIC();
- SET_ERRNO(-ret);
- return -1;
- }
- else {
- return 0;
- }
-#else
- return PAGESIZE;
-#endif
-}
-
-static pthread_mutex_t machdep_mutex =
-{ MUTEX_TYPE_COUNTING_FAST, PTHREAD_QUEUE_INITIALIZER, \
- NULL, SEMAPHORE_CLEAR, { NULL }, MUTEX_FLAGS_INITED };
-
-static pthread_mutex_t malloc_mutex =
-{ MUTEX_TYPE_COUNTING_FAST, PTHREAD_QUEUE_INITIALIZER, \
- NULL, SEMAPHORE_CLEAR, { NULL }, MUTEX_FLAGS_INITED };
-
-struct stdlock {
- volatile long init;
- pthread_mutex_t* mutex;
-};
-
-static void machdep_stdinitlock(struct stdlock* lock)
-
-{
- if (lock==0) PANIC();
- pthread_mutex_lock(&machdep_mutex);
- if (!lock->init) {
- register pthread_mutex_t* mutex;
- pthread_mutexattr_t attr;
-
- lock->init = 1;
- lock->mutex = &machdep_mutex;
- mutex = (pthread_mutex_t*) malloc(sizeof(pthread_mutex_t));
- pthread_mutexattr_init (&attr);
- pthread_mutexattr_settype (&attr, MUTEX_TYPE_COUNTING_FAST);
- pthread_mutex_init(mutex, &attr);
- lock->mutex = mutex;
- }
- pthread_mutex_unlock(&machdep_mutex);
-}
-
-void machdep_stdlock(struct stdlock* lock)
-
-{
- if (lock==0) PANIC();
- if (!lock->init)
- machdep_stdinitlock(lock);
- pthread_mutex_lock(lock->mutex);
-}
-
-void machdep_stdunlock(struct stdlock* lock)
-
-{
- if (lock==0) PANIC();
- if (!lock->init)
- machdep_stdinitlock(lock);
- pthread_mutex_unlock(lock->mutex);
-}
-
-int machdep_stdtrylock(struct stdlock* lock)
-
-{
- if (lock==0) PANIC();
- if (!lock->init)
- machdep_stdinitlock(lock);
- return pthread_mutex_trylock(lock->mutex);
-}
-
-int machdep_stdtryunlock(struct stdlock* lock)
-
-{
- if (lock==0) PANIC();
- if (!lock->init)
- machdep_stdinitlock(lock);
- if (pthread_mutex_trylock(lock->mutex))
- return pthread_mutex_unlock(lock->mutex);
- return 0;
-}
-
-extern void (*_libc_stdlock)(struct stdlock* lock);
-extern void (*_libc_stdunlock)(struct stdlock* lock);
-extern int (*_libc_stdtrylock)(struct stdlock* lock);
-extern int (*_libc_stdtryunlock)(struct stdlock* lock);
-
-int machdep_sys_init()
-
-{
- typedef void (*voidfunc_t)();
- extern voidfunc_t _libc_read;
- extern voidfunc_t _libc_write;
- extern voidfunc_t _libc_readv;
- extern voidfunc_t _libc_writev;
- extern voidfunc_t _libc_open;
- extern voidfunc_t _libc_close;
- extern voidfunc_t _libc_fork;
- extern voidfunc_t _libc_fcntl;
- extern voidfunc_t _libc_dup;
- extern voidfunc_t _libc_pipe;
- extern voidfunc_t _libc_select;
- extern voidfunc_t _libc_malloc;
- extern voidfunc_t _libc_realloc;
- extern voidfunc_t _libc_free;
- extern ssize_t pthread_read (int , char*, int );
- extern ssize_t pthread_write (int , char*, int );
- extern int pthread_close (int);
- extern int pthread_dup (int);
- extern int pthread_fork ();
- extern int pthread_pipe (int*);
- extern int pthread_fcntl(int, int, ...);
- extern int pthread_open(const char *, int, ...);
- extern ssize_t pthread_readv (int , const struct iovec *, int );
- extern ssize_t pthread_writev (int , const struct iovec *, int );
- extern int pthread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
- extern int pthread_getmsg(int , struct strbuf *, struct strbuf *,int*);
- extern int pthread_putmsg(int , const struct strbuf *, const struct strbuf *,int);
- extern void (*pthread_signal(int , void (*)(int)))(int);
- extern int pthread_sigaction(int,const struct sigaction *, struct sigaction *);
- extern int pthread_sigprocmask(int, const sigset_t *, sigset_t *);
- extern int pthread_sigsuspend(const sigset_t *);
-
-
- static struct {
- voidfunc_t *p;
- voidfunc_t f;
- } maptable[] = {
- {(voidfunc_t*)&_libc_read, (voidfunc_t) pthread_read},
- {(voidfunc_t*)&_libc_write, (voidfunc_t) pthread_write},
- {(voidfunc_t*)&_libc_readv, (voidfunc_t) pthread_readv},
- {(voidfunc_t*)&_libc_writev, (voidfunc_t) pthread_writev},
- {(voidfunc_t*)&_libc_open, (voidfunc_t) pthread_open},
- {(voidfunc_t*)&_libc_close, (voidfunc_t) pthread_close},
- {(voidfunc_t*)&_libc_fork, (voidfunc_t) pthread_fork},
- {(voidfunc_t*)&_libc_fcntl, (voidfunc_t) pthread_fcntl},
- {(voidfunc_t*)&_libc_dup, (voidfunc_t) pthread_dup},
- {(voidfunc_t*)&_libc_pipe, (voidfunc_t) pthread_pipe},
- {(voidfunc_t*)&_libc_select, (voidfunc_t) pthread_select},
- {(voidfunc_t*)&_libc_getmsg, (voidfunc_t) pthread_getmsg},
- {(voidfunc_t*)&_libc_putmsg, (voidfunc_t) pthread_putmsg},
- {(voidfunc_t*)&_libc_signal, (voidfunc_t) pthread_signal},
- {(voidfunc_t*)&_libc_sigaction, (voidfunc_t) pthread_sigaction},
- {(voidfunc_t*)&_libc_sigprocmask, (voidfunc_t) pthread_sigprocmask},
- {(voidfunc_t*)&_libc_sigsuspend, (voidfunc_t) pthread_sigsuspend},
- {(voidfunc_t*) 0, (voidfunc_t) 0}
- };
- register int i;
-
- for (i=0; maptable[i].p; i++)
- *maptable[i].p = maptable[i].f;
-
- _libc_stdlock = machdep_stdlock;
- _libc_stdunlock = machdep_stdunlock;
- _libc_stdtrylock = machdep_stdtrylock;
- _libc_stdtryunlock = machdep_stdtryunlock;
- return 0;
-}
-
-#if 0
-extern end;
-char* nd = (char*) &end;
-char* brk(const char* endds)
-
-{
- register int ret;
-
- if ((ret = machdep_sys_brk((char*)endds))<0) {
- SET_ERRNO(-ret);
- return (char*) -1;
- }
- else {
- nd = (char*) endds;
- return 0;
- }
-}
-
-char *sbrk(int incr)
-
-{
- register char* ret;
- if (incr!=0 && (ret=brk(nd + incr))!=0)
- return ret;
- else
- return nd - incr;
-}
-#endif
-
-sigset_t sigmask(int sig)
-
-{
- sigset_t oset;
- sigemptyset(&oset);
- sigaddset(&oset, sig);
- return oset;
-}
-
-sigset_t sigsetmask(sigset_t set)
-
-{
- sigset_t oset;
- sigprocmask(SIG_SETMASK,&set,&oset);
- return oset;
-}
-
-sigset_t sigblock(sigset_t set)
-
-{
- sigset_t oset;
- sigprocmask(SIG_BLOCK,&set,&oset);
- return oset;
-}
diff --git a/lib/libpthread/machdep/engine-i386-sco-3.2v5.h b/lib/libpthread/machdep/engine-i386-sco-3.2v5.h
deleted file mode 100644
index 8b2aa362f06..00000000000
--- a/lib/libpthread/machdep/engine-i386-sco-3.2v5.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * engine-i386-freebsd-2.0.h,v 1.1.4.1 1995/12/13 05:41:52 proven Exp
- *
- */
-
-#include <unistd.h>
-#include <setjmp.h>
-#include <sys/time.h>
-
-#ifndef __NORETURN
-#define __NORETURN
-#endif
-
-/*
- * 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;
-#define JB_BP 3
-#define JB_SP 4
-#define JB_PC 5
- 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 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));
-
-#endif
-
-__END_DECLS
diff --git a/lib/libpthread/machdep/engine-ip22-irix-5.2.c b/lib/libpthread/machdep/engine-ip22-irix-5.2.c
deleted file mode 100644
index e673e9502f0..00000000000
--- a/lib/libpthread/machdep/engine-ip22-irix-5.2.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1995 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for IRIX-5.2 on the IP22
- *
- * 1.00 95/04/26 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-ip22-irix-5.2.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * 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)
-{
- int i;
-
- 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;
-
- if (setjmp(machdep_pthread->machdep_state)) {
- machdep_pthread_start();
- }
-
- /*
- * Set up new stact frame so that it looks like it
- * returned from a longjmp() to the beginning of
- * machdep_pthread_start().
- */
-
- /* IP22 stack starts high and builds down. */
- machdep_pthread->machdep_state[JB_SP] =
- (int)machdep_pthread->machdep_stack + stack_size - 1024;
- machdep_pthread->machdep_state[JB_SP] &= ~7;
-
- memcpy((void *)machdep_pthread->machdep_state[JB_SP],
- (char *)(((int)&i) - 24), 32);
-
-}
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-machdep_sys_dup2(int a, int b)
-{
- machdep_sys_close(b);
- machdep_sys_fcntl(a, F_DUPFD, b);
-}
-
-/* ==========================================================================
- * machdep_sys_wait3()
- */
-machdep_sys_wait3(int * b, int c, int * d)
-{
- return(machdep_sys_waitsys(0, b, c, d));
-}
-
-/* ==========================================================================
- * machdep_sys_waitpid()
- */
-machdep_sys_waitpid(int a, int * b, int c)
-{
- return(machdep_sys_waitsys(a, b, c, NULL));
-}
-
-struct stat;
-
-/* ==========================================================================
- * _fxstat()
- */
-int _fxstat(int __ver, int fd, struct stat *buf)
-{
- int ret;
-
- if ((ret = fd_lock(fd, FD_READ, NULL)) == OK) {
- if ((ret = machdep_sys_fstat(fd_table[fd]->fd.i, buf)) < OK) {
- SET_ERRNO(-ret);
- }
- fd_unlock(fd, FD_READ);
- }
- return(ret);
-}
-
-/* ==========================================================================
- * _lxstat()
- */
-int _lxstat(int __ver, const char * path, struct stat * buf)
-{
- int ret;
-
- if ((ret = machdep_sys_lstat(path, buf)) < OK) {
- SET_ERRNO(-ret);
- }
- return(ret);
-
-}
-
-/* ==========================================================================
- * _xstat()
- */
-int _xstat(int __ver, const char * path, struct stat * buf)
-{
- int ret;
-
- if ((ret = machdep_sys_stat(path, buf)) < OK) {
- SET_ERRNO(-ret);
- }
- return(ret);
-
-}
-
-/* ==========================================================================
- * getdtablesize()
- */
-machdep_sys_getdtablesize()
-{
- return(sysconf(_SC_OPEN_MAX));
-}
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
-{
- int i;
-
- i = machdep_sys_getdents(fd, buf, len);
- return i;
-}
diff --git a/lib/libpthread/machdep/engine-ip22-irix-5.2.h b/lib/libpthread/machdep/engine-ip22-irix-5.2.h
deleted file mode 100644
index 5440808733d..00000000000
--- a/lib/libpthread/machdep/engine-ip22-irix-5.2.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-ip22-irix-5.2.h,v 1.1 1998/07/21 13:19:14 peter 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.
- */
-#define SEMAPHORE_CLEAR 0
-#define SEMAPHORE_SET 0xff
-
-/*
- * More machine dependent macros
- */
-#ifdef PTHREAD_KERNEL
-
-#define machdep_save_float_state(x)
-#define machdep_restore_float_state()
-
-#endif
-
-/*
- * New types
- */
-typedef char semaphore;
-
-/*
- * sigset_t macros
- */
-#define SIGMAX 32
-#define SIG_ANY(sig) \
-({ \
- sigset_t *sig_addr = (sigset_t *)&sig; \
- int ret = 0; \
- int i; \
- \
- for (i = 1; i <= SIGMAX; i++) { \
- if (sigismember(sig_addr, i)) { \
- ret = 1; \
- break; \
- } \
- } \
- ret; \
-})
-
-/*
- * New Strutures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
-};
-
-/*
- * 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-r2000-ultrix-4.2.c b/lib/libpthread/machdep/engine-r2000-ultrix-4.2.c
deleted file mode 100644
index 5abca177515..00000000000
--- a/lib/libpthread/machdep/engine-r2000-ultrix-4.2.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for decstation with r2000/r3000
- *
- * 1.00 93/07/21 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-r2000-ultrix-4.2.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-
-/*
- * The r2000/r3000 processors do not have a test and set instruction, so
- * the semaphore TEST_AND_SET macro is linked very closely to the interrupt
- * handelling of the pthreads package.
- */
-
-/* ==========================================================================
- * semaphore_test_and_set()
- *
- * SEMAPHORE_TEST_AND_SET prevents interrupts, tests the lock and then
- * turns interrupts back on, checking to see if any interrupts have occured
- * between the prevent and resume.
- */
-int semaphore_test_and_set(semaphore *lock)
-{
- int rval;
-
-/* None of this should be necessary
- sig_prevent();
- if (!(rval = (*lock))) {
- *lock = SEMAPHORE_SET;
- }
- sig_check_and_resume();
- return(rval);
-*/
-}
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_save_float_state()
- */
-void machdep_save_float_state(struct pthread * pthread)
-{
- return;
-}
-
-/* ==========================================================================
- * fake_longjmp()
- */
-void fake_longjmp(jmp_buf env)
-{
- asm("li $5,1; sw $5, 20($4); li $2,103; syscall");
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- *
- * When I redo machdep_save_state, I'll put the asm in machdep_save_state()
- * and machdep_restore_state() and I won't have to do an additional function
- * call.
- */
-void machdep_restore_state(void)
-{
- fake_longjmp(pthread_run->machdep_data.machdep_state);
- /* longjmp(pthread_run->machdep_data.machdep_state, 1); */
-}
-
-/* ==========================================================================
- * machdep_restore_float_state()
- */
-void machdep_restore_float_state(void)
-{
- return;
-}
-
-/* ==========================================================================
- * 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;
-
- 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[JB_RA] = (int)machdep_pthread_start;
- machdep_pthread->machdep_state[JB_PC] = (int)machdep_pthread_start;
-
- /* Stack starts high and builds down. */
- machdep_pthread->machdep_state[JB_SP] =
- (int)machdep_pthread->machdep_stack + stack_size;
-
- /* This is the real global pointer */
- /* machdep_pthread->machdep_state[JB_GP] = 0; */
-}
-
-/* ==========================================================================
- * machdep_sys_sigprocmask()
- * This isn't a real implementation; we can make the assumption that the
- * pthreads library is not using oset, and that it is always blocking or
- * unblocking all signals at once.
- */
-int machdep_sys_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
-{
- switch(how) {
- case SIG_BLOCK:
- sigblock(*set);
- break;
- case SIG_UNBLOCK:
- sigsetmask(~*set);
- break;
- case SIG_SETMASK:
- sigsetmask(*set);
- break;
- default:
- return -EINVAL;
- }
- return(OK);
-}
-
diff --git a/lib/libpthread/machdep/engine-r2000-ultrix-4.2.h b/lib/libpthread/machdep/engine-r2000-ultrix-4.2.h
deleted file mode 100644
index 0a3d537b6dc..00000000000
--- a/lib/libpthread/machdep/engine-r2000-ultrix-4.2.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-r2000-ultrix-4.2.h,v 1.1 1998/07/21 13:19:14 peter Exp $
- *
- * Description : Machine dependent header for decstation with r2000/r3000
- * running Ultrix-4.2
- *
- * 1.00 93/07/21 proven
- * -Started coding this file.
- */
-
-#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.
- */
-#define SEMAPHORE_CLEAR 0
-#define SEMAPHORE_SET 1
-
-#define SEMAPHORE_TEST_AND_SET(lock) semaphore_test_and_set(lock)
-#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR
-
-/*
- * New types
- */
-typedef long semaphore;
-
-#if !defined(_POSIX_SOURCE)
-
-/* typedef int ssize_t; */
-
-#if !defined(__GNUC__)
-
-/*
- * sigset_t macros
- */
-typedef int sigset_t;
-#define sigaddset(set, num) ((*set) |= (1 << (num - 1)))
-#define sigemptyset(set) (*set = 0)
-
-#endif
-#endif
-
-#define SIG_ANY(sig) (sig)
-#define SIGMAX 31
-
-/*
- * New Structures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
-};
-
-/*
- * Static machdep_pthread initialization values.
- * For initial thread only.
- */
-#define MACHDEP_PTHREAD_INIT \
-{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 }
-
-
-/*
- * Min stacksize, arch dependent
- */
-#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 | O_NDELAY)
-
-/*
- * 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 semaphore_test_and_set __P_((semaphore *));
-int machdep_save_state __P_((void));
-
-#endif
-
-__END_DECLS
diff --git a/lib/libpthread/machdep/engine-romp-bsd.c b/lib/libpthread/machdep/engine-romp-bsd.c
deleted file mode 100644
index ef362aa0dc1..00000000000
--- a/lib/libpthread/machdep/engine-romp-bsd.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for NetBSD on i386
- *
- * 1.00 93/08/04 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-romp-bsd.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <pthread.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- return(_pthread_save(pthread_run->machdep_data.machdep_state, 0, 0));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- _pthread_restore(pthread_run->machdep_data.machdep_state);
-}
-
-/* ==========================================================================
- * 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();
- sig_check_and_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_pthread_create()
- */
-void machdep_pthread_create(struct machdep_pthread *machdep_pthread,
- void *(* start_routine)(), void *start_argument, long stack_size,
- void *stack_start, long nsec)
-{
- machdep_pthread->machdep_stack = stack_start;
-
- 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;
-
- _pthread_save(machdep_pthread->machdep_state,
- (void *)((int)machdep_pthread->machdep_stack + stack_size),
- machdep_pthread_start);
-}
-
diff --git a/lib/libpthread/machdep/engine-romp-bsd.h b/lib/libpthread/machdep/engine-romp-bsd.h
deleted file mode 100644
index 3a6b7a5f3e7..00000000000
--- a/lib/libpthread/machdep/engine-romp-bsd.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1993 John F. Carr, jfc@athena.mit.edu
- *
- * Description : Machine dependent header for IBM/RT
- *
- * 1.00 93/09/xx jfc
- * -Coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-romp-bsd.h,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include <setjmp.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-/*
- * Stuff for compiling
- */
-#if defined(__GNUC__)
-#if defined(__cplusplus)
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS };
-#else
-#define __BEGIN_DECLS
-#define __END_DECLS
-#if !defined(__STDC__)
-#define const __const
-#define inline __inline
-#define signed __signed
-#define volatile __volatile
-#endif
-#endif
-#else /* !__GNUC__ */
-#define __BEGIN_DECLS
-#define __END_DECLS
-#define const
-#define inline
-#define signed
-#define volatile
-#endif
-
-#define SEMAPHORE_CLEAR 0x0000
-#define SEMAPHORE_SET 0xff00
-#define SEMAPHORE_TEST_AND_SET(lock) _tsh(lock)
-#define SEMAPHORE_RESET(lock) *(lock) = SEMAPHORE_CLEAR
-extern unsigned short _tsh(volatile unsigned short *);
-
-typedef unsigned short semaphore;
-
-/*
- * sigset_t macros
- */
-#define SIG_ANY(sig) (sig)
-#define SIGMAX 31
-
-
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
-};
-
-/*
- * Static machdep_pthread initialization values.
- * For initial thread only.
- */
-#define MACHDEP_PTHREAD_INIT \
-{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 }
-
-/*
- * Min pthread stacksize
- */
-#define PTHREAD_STACK_MIN 1024
-
-/*
- * Some fd defines that are necessary to distinguish between posix
- * behavior and bsd4.3 behavior.
- */
-#define __FD_NONBLOCK O_NONBLOCK
-
-#if defined(PTHREAD_KERNEL)
-
-int machdep_save_state __P_((void));
-
-/* save(jmp_buf, stack pointer, restart proc) */
-extern int _pthread_save(jmp_buf, void *, void (*)());
-extern void _pthread_restore(jmp_buf);
-
-typedef int ssize_t;
-typedef unsigned int sigset_t;
-#define sigemptyset(sp) *(sp) = 0
-#define sigprocmask(op, nssp, ossp) if (ossp) *(int *)ossp = sigsetmask(*nssp); else sigsetmask(*nssp)
-#define sigdelset(sp, i) *(sp) &= ~(1 << (i))
-#define sigaddset(sp, i) *(sp) |= (1 << (i))
-#define sigismember(sp, i) (*(sp) & (1 << (i)))
-#endif
diff --git a/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.c b/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.c
deleted file mode 100644
index b42311be44c..00000000000
--- a/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for SunOS-4.1.3 on sparc
- *
- * 1.00 93/08/04 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-sparc-sunos-4.1.3.c,v 1.1 1998/07/21 13:19:14 peter Exp $";
-#endif
-
-#include "config.h"
-#include <pthread.h>
-#include <stdlib.h>
-#include <errno.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- /* Save register windows onto stackframe */
- __asm__ ("ta 3");
-
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-/* ==========================================================================
- * machdep_save_float_state()
- */
-void machdep_save_float_state(struct pthread * pthread)
-{
- return;
-}
-
-/* ==========================================================================
- * machdep_restore_float_state()
- */
-void machdep_restore_float_state(void)
-{
- return;
-}
-
-/* ==========================================================================
- * 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;
-
- /* Save register windows onto stackframe */
- __asm__ ("ta 3");
-
- 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[3] = (int)machdep_pthread_start;
- machdep_pthread->machdep_state[4] = (int)machdep_pthread_start;
-
- /* Sparc stack starts high and builds down. */
- machdep_pthread->machdep_state[2] =
- (int)machdep_pthread->machdep_stack + stack_size - 1024;
- machdep_pthread->machdep_state[2] &= ~7;
-
-}
-
-#if defined(HAVE_SYSCALL_GETDENTS)
-/* ==========================================================================
- * machdep_sys_getdirentries()
- *
- * Always use getdents in place of getdirentries if possible --proven
- */
-int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
-{
- return(machdep_sys_getdents(fd, buf, len));
-}
-#endif
-
-/* ==========================================================================
- * 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 pid, int * statusp, int options)
-{
- if (pid == -1)
- pid = 0;
- else if (pid == 0)
- pid = - getpgrp ();
- return machdep_sys_wait4 (pid, statusp, options, NULL);
-}
-
-#if !defined(HAVE_SYSCALL_SIGPROCMASK)
-/* ==========================================================================
- * machdep_sys_sigprocmask()
- * This isn't a real implementation; we can make the assumption that the
- * pthreads library is not using oset, and that it is always blocking or
- * unblocking all signals at once.
- */
-int machdep_sys_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
-{
- switch(how) {
- case SIG_BLOCK:
- sigblock(*set);
- break;
- case SIG_UNBLOCK:
- sigsetmask(~*set);
- break;
- case SIG_SETMASK:
- sigsetmask(*set);
- break;
- default:
- return -EINVAL;
- }
- return(OK);
-}
-
-/* ==========================================================================
- * sigaction()
- *
- * Temporary until I do machdep_sys_sigaction()
- */
-int sigaction(int sig, const struct sigaction *act, struct sigaction *oldact)
-{
- return(sigvec(sig, (struct sigvec *)act, (struct sigvec *)oldact));
-}
-#endif
-
-#if !defined(HAVE_SYSCALL_GETDTABLESIZE)
-/* ==========================================================================
- * machdep_sys_getdtablesize()
- */
-machdep_sys_getdtablesize()
-{
- return(sysconf(_SC_OPEN_MAX));
-}
-#endif
diff --git a/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.h b/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.h
deleted file mode 100644
index ecc311194e5..00000000000
--- a/lib/libpthread/machdep/engine-sparc-sunos-4.1.3.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-sparc-sunos-4.1.3.h,v 1.1 1998/07/21 13:19:15 peter 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.
- */
-#define SEMAPHORE_CLEAR 0
-#define SEMAPHORE_SET 0xff
-
-#define SEMAPHORE_TEST_AND_SET(lock) \
-({ \
-char *p = lock; \
-long temp; \
- \
-__asm__ volatile("ldstub %1,%0" \
- :"=r" (temp) \
- :"m" (*p) \
- :"memory"); \
-temp; \
-})
-
-#define SEMAPHORE_RESET(lock) \
-{ \
-__asm__ volatile("stb %1, %0" \
- :"=m" (*lock) \
- :"r" (SEMAPHORE_CLEAR) \
- :"memory"); \
-}
-
-/*
- * 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;
-};
-
-/*
- * 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 | O_NDELAY)
-
-/*
- * 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-sparc-sunos-5.3.c b/lib/libpthread/machdep/engine-sparc-sunos-5.3.c
deleted file mode 100644
index 924f3279141..00000000000
--- a/lib/libpthread/machdep/engine-sparc-sunos-5.3.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* ==== machdep.c ============================================================
- * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Machine dependent functions for SunOS-4.1.3 on sparc
- *
- * 1.00 93/08/04 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: engine-sparc-sunos-5.3.c,v 1.1 1998/07/21 13:19:15 peter Exp $";
-#endif
-
-#include <pthread.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <sys/procset.h>
-#include <sys/systeminfo.h>
-#include <poll.h>
-
-/* ==========================================================================
- * machdep_save_state()
- */
-int machdep_save_state(void)
-{
- /* Save register windows onto stackframe */
- __asm__ ("ta 3");
-
- return(setjmp(pthread_run->machdep_data.machdep_state));
-}
-
-/* ==========================================================================
- * machdep_restore_state()
- */
-void machdep_restore_state(void)
-{
- longjmp(pthread_run->machdep_data.machdep_state, 1);
-}
-
-/* ==========================================================================
- * 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;
-
- /* Save register windows onto stackframe */
- __asm__ ("ta 3");
-
- if (setjmp(machdep_pthread->machdep_state)) {
- machdep_pthread_start();
- }
-
- /*
- * Set up new stact frame so that it looks like it
- * returned from a longjmp() to the beginning of
- * machdep_pthread_start().
- */
-
- /* Sparc stack starts high and builds down. */
- machdep_pthread->machdep_state[1] =
- (int)machdep_pthread->machdep_stack + stack_size - 1024;
- machdep_pthread->machdep_state[1] &= ~7;
-
-}
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-int machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
-{
- return(machdep_sys_getdents(fd, buf, len));
-}
-
-/* ==========================================================================
- * machdep_sys_wait3()
- */
-machdep_sys_wait3(int * b, int c, int * d)
-{
- return(-ENOSYS);
- /* return(machdep_sys_wait4(0, b, c, d)); */
-}
-
-/* ==========================================================================
- * machdep_sys_waitpid()
- */
-machdep_sys_waitpid(int a, int * b, int c)
-{
- idtype_t id;
-
- switch (a) {
- case -1:
- id = P_ALL;
- break;
- case 0:
- a = machdep_sys_pgrpsys(0);
- id = P_PGID;
- break;
- default:
- if (a < 0) {
- id = P_PGID;
- a = -a;
- } else {
- id = P_PID;
- }
- break;
- }
-
- return(machdep_sys_waitsys(id, a, b, c));
-}
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-machdep_sys_dup2(int a, int b)
-{
- machdep_sys_close(b);
- machdep_sys_fcntl(a, F_DUPFD, b);
-}
-
-/* ==========================================================================
- * machdep_sys_ftruncate()
- */
-machdep_sys_ftruncate(int a, off_t b)
-{
- flock_t c;
-
- c.l_len = 0;
- c.l_start = b;
- c.l_whence = 0;
- return(machdep_sys_fcntl(a, F_FREESP, c));
-}
-
-/* ==========================================================================
- * machdep_sys_select()
- * Recoded to be quicker by Monty
- */
-static fd_set bogus_fds; /* Always zero, never changed */
-
-machdep_sys_select(int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, struct timeval *timeout)
-{
- struct pollfd fds[64],*ptr;
- int i, fds_count, time_out, found;
-
- /* Make sure each arg has a valid pointer */
- if ((readfds == NULL) || (writefds == NULL) || (exceptfds == NULL)) {
- if (exceptfds == NULL) {
- exceptfds = &bogus_fds;
- }
- if (writefds == NULL) {
- writefds = &bogus_fds;
- }
- if (readfds == NULL) {
- readfds = &bogus_fds;
- }
- }
-
- ptr=fds;
- for (i = 0 ; i < nfds; i++)
- {
- if (FD_ISSET(i, readfds))
- {
- if (FD_ISSET(i, writefds))
- ptr->events= POLLIN | POLLOUT;
- else
- ptr->events= POLLIN;
- (ptr++)->fd=i;
- }
- else if (FD_ISSET(i, writefds))
- {
- ptr->events=POLLOUT;
- (ptr++)->fd=i;
- }
- }
- FD_ZERO(readfds);
- FD_ZERO(writefds);
- FD_ZERO(exceptfds);
- time_out = timeout->tv_usec / 1000 + timeout->tv_sec * 1000;
- fds_count=(int) (ptr-fds);
- while ((found = machdep_sys_poll(fds, fds_count, time_out)) <= 0)
- {
- if (found != -ERESTART) /* Try again if restartable */
- return(found); /* Usually 0 ; Cant read or write */
- }
-
- while (ptr-- != fds)
- {
- if (ptr->revents & POLLIN)
- FD_SET(ptr->fd, readfds);
- if (ptr->revents & POLLOUT)
- FD_SET(ptr->fd,writefds);
- }
- return(found);
-}
-
-/* ==========================================================================
- * machdep_sys_getdtablesize()
- */
-machdep_sys_getdtablesize()
-{
- return(sysconf(_SC_OPEN_MAX));
-}
-
-/* ==========================================================================
- * getpagesize()
- */
-getpagesize()
-{
- return(sysconf(_SC_PAGESIZE));
-}
-
-/* ==========================================================================
- * gethostname()
- */
-int gethostname(char * name, int namelen)
-{
- if (sysinfo(SI_HOSTNAME, name, namelen) == NOTOK) {
- return(NOTOK);
- } else {
- return(OK);
- }
-}
-
-/* ==========================================================================
- * machdep_sys_sigaction()
- *
- * This is VERY temporary.
- */
-int machdep_sys_sigaction(int a, void * b, void * c)
-{
- return(sigaction(a, b, c));
-}
diff --git a/lib/libpthread/machdep/engine-sparc-sunos-5.3.h b/lib/libpthread/machdep/engine-sparc-sunos-5.3.h
deleted file mode 100644
index 8a569f7b92e..00000000000
--- a/lib/libpthread/machdep/engine-sparc-sunos-5.3.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* ==== machdep.h ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: engine-sparc-sunos-5.3.h,v 1.1 1998/07/21 13:19:15 peter 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.
- */
-#define SEMAPHORE_CLEAR 0
-#define SEMAPHORE_SET 0xff
-
-#define SEMAPHORE_TEST_AND_SET(lock) \
-({ \
-char *p = lock; \
-long temp; \
- \
-__asm__ volatile("ldstub %1,%0" \
- :"=r" (temp) \
- :"m" (*p) \
- :"memory"); \
-temp; \
-})
-
-#define SEMAPHORE_RESET(lock) \
-{ \
-__asm__ volatile("stb %1, %0" \
- :"=m" (*lock) \
- :"r" (SEMAPHORE_CLEAR) \
- :"memory"); \
-}
-
-/*
- * More machine dependent macros
- */
-#ifdef PTHREAD_KERNEL
-
-#define machdep_save_float_state(x)
-#define machdep_restore_float_state()
-
-#endif
-
-/*
- * New types
- */
-typedef char semaphore;
-
-/*
- * sigset_t macros
- */
-#define SIGMAX 31
-#define SIG_ANY(sig) \
-({ \
- sigset_t *sig_addr = (sigset_t *)&sig; \
- int ret = 0; \
- int i; \
- \
- for (i = 1; i <= SIGMAX; i++) { \
- if (sigismember(sig_addr, i)) { \
- ret = 1; \
- break; \
- } \
- } \
- ret; \
-})
-
-/*
- * New Strutures
- */
-struct machdep_pthread {
- void *(*start_routine)(void *);
- void *start_argument;
- void *machdep_stack;
- struct itimerval machdep_timer;
- jmp_buf machdep_state;
-};
-
-/*
- * Static machdep_pthread initialization values.
- * For initial thread only.
- */
-#define MACHDEP_PTHREAD_INIT \
-{ NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, 0 }
-
-/*
- * Minimum stack size
- */
-#undef PTHREAD_STACK_MIN /* Defined in limits.h */
-#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 | O_NDELAY)
-
-/*
- * 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/posix-alpha-osf1.h b/lib/libpthread/machdep/posix-alpha-osf1.h
deleted file mode 100644
index 1d8bb6c5c4b..00000000000
--- a/lib/libpthread/machdep/posix-alpha-osf1.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-#define __WAIT_STATUS int *
-#include <pthread/types.h>
-
-#endif
diff --git a/lib/libpthread/machdep/posix-bsdi-1.1.h b/lib/libpthread/machdep/posix-bsdi-1.1.h
deleted file mode 100644
index 0a2d3d874af..00000000000
--- a/lib/libpthread/machdep/posix-bsdi-1.1.h
+++ /dev/null
@@ -1,34 +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-bsdi-1.1.h,v 1.1 1998/07/21 13:19:15 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>
-
-#define __NORETURN
-
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#endif
-
diff --git a/lib/libpthread/machdep/posix-bsdi-2.0.h b/lib/libpthread/machdep/posix-bsdi-2.0.h
deleted file mode 100644
index f5f286d2a13..00000000000
--- a/lib/libpthread/machdep/posix-bsdi-2.0.h
+++ /dev/null
@@ -1,34 +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-bsdi-2.0.h,v 1.1 1998/07/21 13:19:15 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>
-
-#define __NORETURN
-
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#endif
-
diff --git a/lib/libpthread/machdep/posix-freebsd-1.1.h b/lib/libpthread/machdep/posix-freebsd-1.1.h
deleted file mode 100644
index 419fce5c0f6..00000000000
--- a/lib/libpthread/machdep/posix-freebsd-1.1.h
+++ /dev/null
@@ -1,33 +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-freebsd-1.1.h,v 1.1 1998/07/21 13:19:15 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>
-
-#define __NORETURN
-
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#endif
diff --git a/lib/libpthread/machdep/posix-freebsd-2.0.h b/lib/libpthread/machdep/posix-freebsd-2.0.h
deleted file mode 100644
index 6a615cc51bc..00000000000
--- a/lib/libpthread/machdep/posix-freebsd-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-freebsd-2.0.h,v 1.1 1998/07/21 13:19:15 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/posix-hpux-10.20.h b/lib/libpthread/machdep/posix-hpux-10.20.h
deleted file mode 100644
index ba896868287..00000000000
--- a/lib/libpthread/machdep/posix-hpux-10.20.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-hpux-10.20.h,v 1.1 1998/07/21 13:19:18 peter Exp $
- *
- * Description : Convert an Ultrix-4.2 system to a more or less POSIX system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-/* 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/posix-hpux-9.03.h b/lib/libpthread/machdep/posix-hpux-9.03.h
deleted file mode 100644
index 731d03b423a..00000000000
--- a/lib/libpthread/machdep/posix-hpux-9.03.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-hpux-9.03.h,v 1.1 1998/07/21 13:19:15 peter Exp $
- *
- * Description : Convert an Ultrix-4.2 system to a more or less POSIX system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-/* 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/posix-i386-sco-3.2v5.h b/lib/libpthread/machdep/posix-i386-sco-3.2v5.h
deleted file mode 100644
index ab91311612d..00000000000
--- a/lib/libpthread/machdep/posix-i386-sco-3.2v5.h
+++ /dev/null
@@ -1,35 +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.
- *
- * posix-freebsd-2.0.h,v 1.1 1995/03/01 01:21:30 proven 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 __NORETURN
-#define __NORETURN
-#endif
-
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#endif
diff --git a/lib/libpthread/machdep/posix-irix-5.2.h b/lib/libpthread/machdep/posix-irix-5.2.h
deleted file mode 100644
index c22cf6f72eb..00000000000
--- a/lib/libpthread/machdep/posix-irix-5.2.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1995 by Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Convert an IRIX-5.2 system to a more or less POSIX system.
- *
- * $Id: posix-irix-5.2.h,v 1.1 1998/07/21 13:19:15 peter Exp $
- *
- * 1.00 95/06/01 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/posix-linux-1.0.h b/lib/libpthread/machdep/posix-linux-1.0.h
deleted file mode 100644
index 20767eabcac..00000000000
--- a/lib/libpthread/machdep/posix-linux-1.0.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993, 1994 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-linux-1.0.h,v 1.1 1998/07/21 13:19:15 peter Exp $
- *
- * Description : Convert a Linux-1.0 system to a more or less POSIX system.
- * Mostly POSIX already
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-#include <sys/cdefs.h>
-
-/* Make sure we have size_t defined */
-#include <pthread/types.h>
-
-#define __INLINE extern inline
-/*
- * OK now do stuff to make the code compile.
- * Every OS has its own prototypes for each function
- */
-#ifdef malloc
-#undef malloc
-#endif
-
-#ifdef free
-#undef free
-#endif
-
-#endif
diff --git a/lib/libpthread/machdep/posix-netbsd-0.9.h b/lib/libpthread/machdep/posix-netbsd-0.9.h
deleted file mode 100644
index f10516917ec..00000000000
--- a/lib/libpthread/machdep/posix-netbsd-0.9.h
+++ /dev/null
@@ -1,22 +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-netbsd-0.9.h,v 1.1 1998/07/21 13:19:15 peter Exp $
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-#include <sys/cdefs.h>
-
-/* Make sure we have size_t defined */
-#include <pthread/types.h>
-
-#define __NORETURN
-
-#endif
diff --git a/lib/libpthread/machdep/posix-netbsd-1.0.h b/lib/libpthread/machdep/posix-netbsd-1.0.h
deleted file mode 100644
index 3557d0c5310..00000000000
--- a/lib/libpthread/machdep/posix-netbsd-1.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-netbsd-1.0.h,v 1.1 1998/07/21 13:19:15 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/posix-netbsd-1.1.h b/lib/libpthread/machdep/posix-netbsd-1.1.h
deleted file mode 100644
index f4ff1dfae05..00000000000
--- a/lib/libpthread/machdep/posix-netbsd-1.1.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.
- *
- * posix-netbsd-1.0.h,v 1.53 1995/02/17 03:41:34 proven 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/posix-romp-bsd.h b/lib/libpthread/machdep/posix-romp-bsd.h
deleted file mode 100644
index 1b9752f8f90..00000000000
--- a/lib/libpthread/machdep/posix-romp-bsd.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * Description : Convert a system to a more or less POSIX system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: posix-romp-bsd.h,v 1.1 1998/07/21 13:19:15 peter Exp $";
-#endif
-
-#ifndef O_NONBLOCK
-#ifdef FNDELAY
-#define O_NONBLOCK FNDELAY
-#endif
-#endif
-
-#ifndef O_ACCMODE
-#define O_ACCMODE (O_RDONLY|O_RDWR|O_WRONLY)
-#endif
-
-#ifndef S_ISREG
-#define S_ISREG(x) ((x & S_IFMT) == S_IFREG)
-#endif
-
-#ifndef ENOSYS
-#define ENOSYS EINVAL
-#endif
-
-/* Make sure we have size_t defined */
-#include <pthread/types.h>
diff --git a/lib/libpthread/machdep/posix-sco-3.2v5.h b/lib/libpthread/machdep/posix-sco-3.2v5.h
deleted file mode 100644
index ab91311612d..00000000000
--- a/lib/libpthread/machdep/posix-sco-3.2v5.h
+++ /dev/null
@@ -1,35 +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.
- *
- * posix-freebsd-2.0.h,v 1.1 1995/03/01 01:21:30 proven 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 __NORETURN
-#define __NORETURN
-#endif
-
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#endif
diff --git a/lib/libpthread/machdep/posix-sunos-4.1.3.h b/lib/libpthread/machdep/posix-sunos-4.1.3.h
deleted file mode 100644
index 68617e47f66..00000000000
--- a/lib/libpthread/machdep/posix-sunos-4.1.3.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-sunos-4.1.3.h,v 1.1 1998/07/21 13:19:15 peter Exp $
- *
- * Description : Do the right thing for a sunos 4.1.3 system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#ifndef __WAIT_STATUS
-#define __WAIT_STATUS int *
-#endif
-
-#define _PTHREAD_POSIX_H_
-
-#include <sys/cdefs.h>
-
-/* Make sure we have size_t defined */
-#include <pthread/types.h>
-
-extern long strtol();
-extern unsigned long strtoul();
-
-#endif
diff --git a/lib/libpthread/machdep/posix-sunos-5.3.h b/lib/libpthread/machdep/posix-sunos-5.3.h
deleted file mode 100644
index ba9b18cf3ed..00000000000
--- a/lib/libpthread/machdep/posix-sunos-5.3.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-sunos-5.3.h,v 1.1 1998/07/21 13:19:16 peter Exp $
- *
- * Description : Do the right thing for a sunos 4.1.3 system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-/* 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/posix-sunos-5.5.h b/lib/libpthread/machdep/posix-sunos-5.5.h
deleted file mode 100644
index 3d642bc5076..00000000000
--- a/lib/libpthread/machdep/posix-sunos-5.5.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-sunos-5.5.h,v 1.1 1998/07/21 13:19:19 peter Exp $
- *
- * Description : Do the right thing for a sunos 4.1.3 system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-/* 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/posix-ultrix-4.2.h b/lib/libpthread/machdep/posix-ultrix-4.2.h
deleted file mode 100644
index e35ee87c113..00000000000
--- a/lib/libpthread/machdep/posix-ultrix-4.2.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* ==== posix.h ============================================================
- * Copyright (c) 1993 by Chris Provenzano, proven@athena.mit.edu
- *
- * $Id: posix-ultrix-4.2.h,v 1.1 1998/07/21 13:19:16 peter Exp $
- *
- * Description : Convert an Ultrix-4.2 system to a more or less POSIX system.
- *
- * 1.00 93/07/20 proven
- * -Started coding this file.
- */
-
-#ifndef _PTHREAD_POSIX_H_
-#define _PTHREAD_POSIX_H_
-
-#include <sys/cdefs.h>
-
-/* 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.1.S b/lib/libpthread/machdep/syscall-alpha-netbsd-1.1.S
deleted file mode 100644
index 5b7dd017426..00000000000
--- a/lib/libpthread/machdep/syscall-alpha-netbsd-1.1.S
+++ /dev/null
@@ -1,206 +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
diff --git a/lib/libpthread/machdep/syscall-alpha-osf1.S b/lib/libpthread/machdep/syscall-alpha-osf1.S
deleted file mode 100644
index fad823a7352..00000000000
--- a/lib/libpthread/machdep/syscall-alpha-osf1.S
+++ /dev/null
@@ -1,97 +0,0 @@
-#include <asm.h>
-#include <regdef.h>
-#define COMPAT_43
-#include <syscall.h>
-
-#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, 2f ;\
- br gp, 1f ;\
-1: ;\
- /* Load gp so we can find cerror to jump to. */;\
- ldgp gp, 0(gp) ;\
- jmp zero, machdep_cerror ;\
-2:
-
-#define XSYSCALL(x) SYSCALL(x) ; ret ; .end machdep_sys_##x
-
- .globl machdep_cerror
-machdep_cerror:
- br t0, 1f
-1:
- 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
-
-/* So is the sigsuspend system call */
- .align 4
- .globl machdep_sys_sigsuspend
- .ent machdep_sys_sigsuspend, 0
-machdep_sys_sigsuspend:
- .frame sp,0,ra
-
- bis a0, a0, a1
- ldq a0, 0(a1)
- ldiq v0, SYS_sigsuspend
- CHMK()
- ret
- .end machdep_sys_sigsuspend
-
-/* More stuff ... */
- .align 4
- .globl machdep_restore_from_setjmp
- .ent machdep_restore_from_setjmp, 0
-machdep_restore_from_setjmp:
- .frame sp, 16, ra
- ldgp gp, 0(t12)
- lda sp, -16(sp)
- stq ra, 0(sp)
- ldq v0, 280(a0)
- subq v0, 0x00000000acedbade, t0
- bne t0, botch
- cmoveq a1, 0x1, a1
- stq a1, 32(a0)
- ldiq v0, 0x67
- call_pal 0x83
-botch:
- /* This should cause the program to crash. Eventually, fix it
- up to print a message first. */
- jsr abort
- .end machdep_restore_from_setjmp
diff --git a/lib/libpthread/machdep/syscall-hppa-hpux-10.20.S b/lib/libpthread/machdep/syscall-hppa-hpux-10.20.S
deleted file mode 100644
index c63d845bae5..00000000000
--- a/lib/libpthread/machdep/syscall-hppa-hpux-10.20.S
+++ /dev/null
@@ -1,23 +0,0 @@
- .CODE
-
-machdep_error
- sub %r0,%r28,%r28
- bv,n %r0(%r2)
-
-machdep_sys_fork
-
- .PROC
- .CALLINFO NO_CALLS,FRAME=0
-
- ldil -0x80000,%r1
- ble 4(%sr7,%r1)
- ldi 2 ,%r22
- or,= %r0,%r22,%r0
- b,n machdep_error
- or,= %r29,%r0,%r0
- copy %r0,%r28
- bv,n %r0(%r2)
-
- .PROCEND
- .EXPORT machdep_sys_fork,ENTRY
-
diff --git a/lib/libpthread/machdep/syscall-hppa-hpux-9.03.S b/lib/libpthread/machdep/syscall-hppa-hpux-9.03.S
deleted file mode 100644
index c63d845bae5..00000000000
--- a/lib/libpthread/machdep/syscall-hppa-hpux-9.03.S
+++ /dev/null
@@ -1,23 +0,0 @@
- .CODE
-
-machdep_error
- sub %r0,%r28,%r28
- bv,n %r0(%r2)
-
-machdep_sys_fork
-
- .PROC
- .CALLINFO NO_CALLS,FRAME=0
-
- ldil -0x80000,%r1
- ble 4(%sr7,%r1)
- ldi 2 ,%r22
- or,= %r0,%r22,%r0
- b,n machdep_error
- or,= %r29,%r0,%r0
- copy %r0,%r28
- bv,n %r0(%r2)
-
- .PROCEND
- .EXPORT machdep_sys_fork,ENTRY
-
diff --git a/lib/libpthread/machdep/syscall-i386-bsdi-1.1.S b/lib/libpthread/machdep/syscall-i386-bsdi-1.1.S
deleted file mode 100644
index 596f3c7bf70..00000000000
--- a/lib/libpthread/machdep/syscall-i386-bsdi-1.1.S
+++ /dev/null
@@ -1,288 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-bsdi-1.1.S,v 1.1 1998/07/21 13:19:16 peter 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>
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-_machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- .byte 0x9a; .long 0; .word 7; \
- jb 1b; \
- ret;
-
-/*
- * 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_write()
- */
-SYSCALL(write)
-
-/* ==========================================================================
- * machdep_sys_read()
- */
-SYSCALL(read)
-
-/* ==========================================================================
- * machdep_sys_open()
- */
-SYSCALL(open)
-
-/* ==========================================================================
- * machdep_sys_close()
- */
-SYSCALL(close)
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
-SYSCALL(fcntl)
-
-/* ==========================================================================
- * machdep_sys_lseek()
- */
-SYSCALL(lseek)
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
-SYSCALL(pipe)
-
-/* ==========================================================================
- * machdep_sys_dup()
- */
-SYSCALL(dup)
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-SYSCALL(dup2)
-
-/* ==========================================================================
- * 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_execve()
- */
-SYSCALL(execve)
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
-SYSCALL(fstat)
-
-/* ==========================================================================
- * machdep_sys_fchown()
- */
-SYSCALL(fchown)
-
-/* ==========================================================================
- * machdep_sys_fchmod()
- */
-SYSCALL(fchmod)
-
-/* ==========================================================================
- * machdep_sys_chown()
- */
-SYSCALL(chown)
-
-/* ==========================================================================
- * machdep_sys_chmod()
- */
-SYSCALL(chmod)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(chdir)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(link)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(unlink)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(rename)
-
-/* ==========================================================================
- * Nonstandard calls used to make the system work
- *
- * ==========================================================================
- * machdep_sys_select()
- */
-SYSCALL(select)
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-SYSCALL(getdirentries)
-
-/* ==========================================================================
- * machdep_sys_wait4()
- */
-SYSCALL(wait4)
-
-/* ==========================================================================
- * Berkeley socket stuff
- *
- * ==========================================================================
- * machdep_sys_socket()
- */
-SYSCALL(socket)
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
-SYSCALL(bind)
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
-SYSCALL(connect)
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
-SYSCALL(accept)
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
-SYSCALL(listen)
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
-SYSCALL(getsockopt)
-
-/* ==========================================================================
- * machdep_sys_readv()
- */
-SYSCALL(readv)
-
-/* ==========================================================================
- * machdep_sys_writev()
- */
-SYSCALL(writev)
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
-SYSCALL(getpeername)
-
-/* ==========================================================================
- * machdep_sys_getsockname()
- */
-SYSCALL(getsockname)
-
-/* ==========================================================================
- * machdep_sys_sendto()
- */
-SYSCALL(sendto)
-
-/* ==========================================================================
- * machdep_sys_recvfrom()
- */
-SYSCALL(recvfrom)
-
-/* ==========================================================================
- * machdep_sys_sendmsg()
- */
-SYSCALL(sendmsg)
-
-/* ==========================================================================
- * machdep_sys_recvmsg()
- */
-SYSCALL(recvmsg)
-
-/* ==========================================================================
- * machdep_sys_shutdown() - Is this correct?
- */
-SYSCALL(shutdown)
-
diff --git a/lib/libpthread/machdep/syscall-i386-bsdi-2.0.S b/lib/libpthread/machdep/syscall-i386-bsdi-2.0.S
deleted file mode 100644
index 8a56717da31..00000000000
--- a/lib/libpthread/machdep/syscall-i386-bsdi-2.0.S
+++ /dev/null
@@ -1,294 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "syscall-i386-netbsd-1.0.S,v 1.56 1995/09/26 21:04:05 raeburn 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>
-
-/*
- * 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_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
-
-
-/* BSDI DEFS.h,v 2.1 1995/02/03 06:28:24 polk Exp */
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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.
- *
- * @(#)DEFS.h 8.1 (Berkeley) 6/4/93
- */
-
-#ifdef PROF
-#define ENTRY(x) .globl _/**/x; .align 2; _/**/x: \
- .data; 1:; .long 0; .text; \
- pushl %ebp; movl %esp,%ebp; \
- leal 1b,%eax; call mcount; leave
-#define ASENTRY(x) .globl x; .align 2; x: \
- .data; 1:; .long 0; .text; \
- pushl %ebp; movl %esp,%ebp; \
- leal 1b,%eax; call mcount; leave
-#else
-#define ENTRY(x) .globl _/**/x; .align 2; _/**/x:
-#define ASENTRY(x) .globl x; .align 2; x:
-#endif
-
-/*-
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
- .asciz "@(#)_setjmp.s 8.1 (Berkeley) 6/4/93"
-#endif /* LIBC_SCCS and not lint */
-
-/*
- * C library -- _setjmp, _longjmp
- *
- * _longjmp(a,v)
- * will generate a "return(v)" from the last call to
- * _setjmp(a)
- * by restoring registers from the stack.
- * The previous signal state is NOT restored.
- */
-
-
-.globl __setjmp; /* Patch by Jan Legenhausen (monty) */
-.align 2;
-__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)
- movl $0,%eax
- ret
-
-.globl __longjmp; /* Patch by Jan Legenhausen ? (monty) */
-.align 2;
-__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
- cmpl $0,%eax
- jne 1f
- movl $1,%eax
-1: movl %ecx,0(%esp)
- ret
diff --git a/lib/libpthread/machdep/syscall-i386-freebsd-1.1.S b/lib/libpthread/machdep/syscall-i386-freebsd-1.1.S
deleted file mode 100644
index a2ea1b67e8d..00000000000
--- a/lib/libpthread/machdep/syscall-i386-freebsd-1.1.S
+++ /dev/null
@@ -1,293 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-freebsd-1.1.S,v 1.1 1998/07/21 13:19:16 peter 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>
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-_machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- .byte 0x9a; .long 0; .word 7; \
- jb 1b; \
- ret;
-
-/*
- * 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_write()
- */
-SYSCALL(write)
-
-/* ==========================================================================
- * machdep_sys_read()
- */
-SYSCALL(read)
-
-/* ==========================================================================
- * machdep_sys_open()
- */
-SYSCALL(open)
-
-/* ==========================================================================
- * machdep_sys_close()
- */
-SYSCALL(close)
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
-SYSCALL(fcntl)
-
-/* ==========================================================================
- * machdep_sys_lseek()
- */
-SYSCALL(lseek)
-
-/* ==========================================================================
- * machdep_sys_stat()
- */
-SYSCALL(stat)
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
-SYSCALL(pipe)
-
-/* ==========================================================================
- * machdep_sys_dup()
- */
-SYSCALL(dup)
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-SYSCALL(dup2)
-
-/* ==========================================================================
- * 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_execve()
- */
-SYSCALL(execve)
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
-SYSCALL(fstat)
-
-/* ==========================================================================
- * machdep_sys_fchown()
- */
-SYSCALL(fchown)
-
-/* ==========================================================================
- * machdep_sys_fchmod()
- */
-SYSCALL(fchmod)
-
-/* ==========================================================================
- * machdep_sys_chown()
- */
-SYSCALL(chown)
-
-/* ==========================================================================
- * machdep_sys_chmod()
- */
-SYSCALL(chmod)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(chdir)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(link)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(unlink)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL(rename)
-
-/* ==========================================================================
- * Nonstandard calls used to make the system work
- *
- * ==========================================================================
- * machdep_sys_select()
- */
-SYSCALL(select)
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-SYSCALL(getdirentries)
-
-/* ==========================================================================
- * machdep_sys_wait4()
- */
-SYSCALL(wait4)
-
-/* ==========================================================================
- * Berkeley socket stuff
- *
- * ==========================================================================
- * machdep_sys_socket()
- */
-SYSCALL(socket)
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
-SYSCALL(bind)
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
-SYSCALL(connect)
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
-SYSCALL(accept)
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
-SYSCALL(listen)
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
-SYSCALL(getsockopt)
-
-/* ==========================================================================
- * machdep_sys_readv()
- */
-SYSCALL(readv)
-
-/* ==========================================================================
- * machdep_sys_writev()
- */
-SYSCALL(writev)
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
-SYSCALL(getpeername)
-
-/* ==========================================================================
- * machdep_sys_getsockname()
- */
-SYSCALL(getsockname)
-
-/* ==========================================================================
- * machdep_sys_sendto()
- */
-SYSCALL(sendto)
-
-/* ==========================================================================
- * machdep_sys_recvfrom()
- */
-SYSCALL(recvfrom)
-
-/* ==========================================================================
- * machdep_sys_sendmsg()
- */
-SYSCALL(sendmsg)
-
-/* ==========================================================================
- * machdep_sys_recvmsg()
- */
-SYSCALL(recvmsg)
-
-/* ==========================================================================
- * machdep_sys_shutdown()
- */
-SYSCALL(shutdown)
-
diff --git a/lib/libpthread/machdep/syscall-i386-freebsd-2.0.S b/lib/libpthread/machdep/syscall-i386-freebsd-2.0.S
deleted file mode 100644
index cfdbbc77f73..00000000000
--- a/lib/libpthread/machdep/syscall-i386-freebsd-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-i386-linux-1.0.S b/lib/libpthread/machdep/syscall-i386-linux-1.0.S
deleted file mode 100644
index 88adb32841a..00000000000
--- a/lib/libpthread/machdep/syscall-i386-linux-1.0.S
+++ /dev/null
@@ -1,406 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- * Description : Machine dependent syscalls for i386/i486/i586
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- *
- * 1.16 94/01/30 proven
- * -This file now requires gas version 2.0 or greater.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-linux-1.0.S,v 1.1 1998/07/21 13:19:16 peter Exp $";
-#endif
-
-#include <sys/syscall.h>
-#include <config.h>
-
-#ifdef __ELF__
-
-#define NAME(X) machdep_sys_##X
-#define END(X) 1: ; .type NAME(X),@function ; .size NAME(X),1b - NAME(X)
-
-#else
-
-#define NAME(X) _machdep_sys_##X
-#define END(X)
-
-#endif
-
-#define SYSCALL0(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %ebx; \
- ret; \
- \
- END(x)
-
-#define SYSCALL1(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- mov 8(%esp), %ebx; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %ebx; \
- ret; \
- \
- END(x)
-
-#define SYSCALL2(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- mov 8(%esp), %ebx; \
- mov 12(%esp), %ecx; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %ebx; \
- ret; \
- \
- END(x)
-
-#define STATCALL2(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- mov 8(%esp), %ebx; \
- mov 12(%esp), %ecx; \
- lea SYS_prev_##x, %eax; \
- int $0x80; \
- pop %ebx; \
- ret; \
- END(x)
-
-#define SYSCALL3(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- mov 8(%esp), %ebx; \
- mov 12(%esp), %ecx; \
- mov 16(%esp), %edx; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %ebx; \
- ret; \
- END(x)
-
-
-#define SYSCALL4(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- push %esi; \
- mov 12(%esp), %ebx; \
- mov 16(%esp), %ecx; \
- mov 20(%esp), %edx; \
- mov 24(%esp), %esi; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %esi; \
- pop %ebx; \
- ret; \
- END(x)
-
-#define SYSCALL5(x) \
- .globl NAME(x) ; \
- \
-NAME(x): \
- \
- push %ebx; \
- push %esi; \
- push %edi; \
- mov 16(%esp), %ebx; \
- mov 20(%esp), %ecx; \
- mov 24(%esp), %edx; \
- mov 28(%esp), %esi; \
- mov 32(%esp), %edi; \
- lea SYS_##x, %eax; \
- int $0x80; \
- pop %edi; \
- pop %esi; \
- pop %ebx; \
- ret; \
- END(x)
-
-/* =========================================================================
- * exit 1 select 82
- * fork 2 fstatfs 100
- * read 3 socketcall 102
- * write 4 flock 143
- * open 5 readv 145
- * creat 8 writev 146
- * link 9
- * unlink 10
- * execve 11
- * chdir 12
- * chmod 15
- * chown 16
- * lseek 19
- * rename 38
- * dup 41
- * pipe 42
- * ioctl 54
- * fcntl 55
- * dup2 63
- * readdir 89
- * ftruncate 93
- * fchmod 94
- * fchown 95
- */
-
-/*
- * Initial asm stuff for all functions.
- */
- .text
- .align 2
-
-
-/* ==========================================================================
- * machdep_sys_read()
- */
-SYSCALL3(read)
-
-/* ==========================================================================
- * machdep_sys_write()
- */
-SYSCALL3(write)
-
-/* ==========================================================================
- * machdep_sys_open()
- */
-SYSCALL3(open)
-
-/* ==========================================================================
- * machdep_sys_close()
- */
-SYSCALL1(close)
-
-/* ==========================================================================
- * machdep_sys_creat()
- */
-SYSCALL2(creat)
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-SYSCALL2(dup2)
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
-SYSCALL3(fcntl)
-
-/* ==========================================================================
- * machdep_sys_fchown()
- */
-SYSCALL3(fchown)
-
-/* ==========================================================================
- * machdep_sys_fchmod()
- */
-SYSCALL2(fchmod)
-
-/* ==========================================================================
- * machdep_sys_ioctl()
- */
-SYSCALL3(ioctl)
-
-/* ==========================================================================
- * machdep_sys_chown()
- */
-SYSCALL3(chown)
-
-/* ==========================================================================
- * machdep_sys_chmod()
- */
-SYSCALL2(chmod)
-
-/* ==========================================================================
- * machdep_sys_chdir()
- */
-SYSCALL1(chdir)
-
-/* ==========================================================================
- * machdep_sys_unlink()
- */
-SYSCALL1(unlink)
-
-/* ==========================================================================
- * machdep_sys_link()
- */
-SYSCALL2(link)
-
-/* ==========================================================================
- * machdep_sys_rename()
- */
-SYSCALL2(rename)
-
-/* ==========================================================================
- * machdep_sys_lseek()
- */
-SYSCALL3(lseek)
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
-SYSCALL1(pipe)
-
-/* ==========================================================================
- * machdep_sys_dup()
- */
-SYSCALL1(dup)
-
-/* ==========================================================================
- * machdep_sys_fork()
- */
-SYSCALL0(fork)
-
-/* ==========================================================================
- * machdep_sys_execve()
- */
-SYSCALL3(execve)
-
-/* ==========================================================================
- * machdep_sys_stat()
- */
-#ifdef __ELF__
-STATCALL2(stat)
-#else
-SYSCALL2(stat)
-#endif
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
-#ifdef __ELF__
-STATCALL2(fstat)
-#else
-SYSCALL2(fstat)
-#endif
-
-/* ==========================================================================
- * machdep_sys_lstat()
- */
-#ifdef __ELF__
-STATCALL2(lstat)
-#else
-SYSCALL2(lstat)
-#endif
-
-/* ==========================================================================
- * machdep_sys_fstatfs()
- */
-SYSCALL2(fstatfs)
-
-
-/* ==========================================================================
- * machdep_sys_ftruncate()
- */
-SYSCALL2(ftruncate)
-
-/* ==========================================================================
- * Nonstandard calls used to make the system work
- *
- * ==========================================================================
- * machdep_sys_select()
- */
-
- .globl NAME(select)
-
-NAME(select):
-
- push %ebx
- lea 8(%esp), %ebx
- lea SYS_select, %eax
- int $0x80
- pop %ebx
- ret
- END(select)
-
-/* ==========================================================================
- * machdep_sys_wait4()
- */
-SYSCALL4(wait4)
-
-/* ==========================================================================
- * machdep_sys_readdir()
- */
-SYSCALL3(readdir)
-
-/* ==========================================================================
- * machdep_sys_socketcall()
- */
-SYSCALL2(socketcall)
-
-
-SYSCALL1(exit)
-SYSCALL3(sigprocmask)
-
-/* ==========================================================================
- * machdep_sys_sigsuspend()
- */
-
- .globl NAME(sigsuspend)
-
-NAME(sigsuspend):
-
- push %ebp
- mov %esp,%ebp
- push %edi
- push %esi
- push %ebx
- mov 8(%ebp), %edx
- mov (%edx), %edx
- lea SYS_sigsuspend, %eax
- int $0x80
- pop %ebx
- pop %esi
- pop %edi
- mov %ebp,%esp
- pop %ebp
- ret
- END(sigsuspend)
-
-/* ==========================================================================
- * machdep_sys_readv()
- */
-#ifdef HAVE_SYSCALL_READV
-SYSCALL3(readv)
-#endif
-
-/* ==========================================================================
- * machdep_sys_writev()
- */
-#ifdef HAVE_SYSCALL_WRITEV
-SYSCALL3(writev)
-#endif
-
-/* ==========================================================================
- * machdep_sys_flock()
- */
-#ifdef HAVE_SYSCALL_FLOCK
-SYSCALL2(flock)
-#endif
diff --git a/lib/libpthread/machdep/syscall-i386-netbsd-0.9.S b/lib/libpthread/machdep/syscall-i386-netbsd-0.9.S
deleted file mode 100644
index 2ee3b940413..00000000000
--- a/lib/libpthread/machdep/syscall-i386-netbsd-0.9.S
+++ /dev/null
@@ -1,229 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-netbsd-0.9.S,v 1.1 1998/07/21 13:19:16 peter Exp $";
-#endif
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-_machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- .byte 0x9a; .long 0; .word 7; \
- jb 1b; \
- ret;
-
-/*
- * 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_write()
- */
-SYSCALL(write)
-
-/* ==========================================================================
- * machdep_sys_read()
- */
-SYSCALL(read)
-
-/* ==========================================================================
- * machdep_sys_open()
- */
-SYSCALL(open)
-
-/* ==========================================================================
- * machdep_sys_close()
- */
-SYSCALL(close)
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
-SYSCALL(fcntl)
-
-/* ==========================================================================
- * machdep_sys_lseek()
- */
-SYSCALL(lseek)
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
-SYSCALL(pipe)
-
-/* ==========================================================================
- * machdep_sys_dup()
- */
-SYSCALL(dup)
-
-/* ==========================================================================
- * machdep_sys_dup2()
- */
-SYSCALL(dup2)
-
-/* ==========================================================================
- * 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_execve()
- */
-SYSCALL(execve)
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
-SYSCALL(fstat)
-
-/* ==========================================================================
- * Nonstandard calls used to make the system work
- *
- * ==========================================================================
- * machdep_sys_select()
- */
-SYSCALL(select)
-
-/* ==========================================================================
- * machdep_sys_getdirentries()
- */
-SYSCALL(getdirentries)
-
-/* ==========================================================================
- * Berkeley socket stuff
- *
- * ==========================================================================
- * machdep_sys_socket()
- */
-SYSCALL(socket)
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
-SYSCALL(bind)
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
-SYSCALL(connect)
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
-SYSCALL(accept)
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
-SYSCALL(listen)
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
-SYSCALL(getsockopt)
-
-/* ==========================================================================
- * machdep_sys_readv()
- */
-SYSCALL(readv)
-
-/* ==========================================================================
- * machdep_sys_writev()
- */
-SYSCALL(writev)
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
-SYSCALL(getpeername)
-
-/* ==========================================================================
- * machdep_sys_getsockname()
- */
-SYSCALL(getsockname)
-
-/* ==========================================================================
- * machdep_sys_sendto()
- */
-SYSCALL(sendto)
-
-/* ==========================================================================
- * machdep_sys_recvfrom()
- */
-SYSCALL(recvfrom)
-
diff --git a/lib/libpthread/machdep/syscall-i386-netbsd-1.0.S b/lib/libpthread/machdep/syscall-i386-netbsd-1.0.S
deleted file mode 100644
index f3d11be9b0a..00000000000
--- a/lib/libpthread/machdep/syscall-i386-netbsd-1.0.S
+++ /dev/null
@@ -1,158 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-netbsd-1.0.S,v 1.1 1998/07/21 13:19:16 peter Exp $";
-#endif
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-/*
- * 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_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
diff --git a/lib/libpthread/machdep/syscall-i386-netbsd-1.1.S b/lib/libpthread/machdep/syscall-i386-netbsd-1.1.S
deleted file mode 100644
index 12e550da3bd..00000000000
--- a/lib/libpthread/machdep/syscall-i386-netbsd-1.1.S
+++ /dev/null
@@ -1,181 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-netbsd-1.1.S,v 1.1 1998/07/21 13:19:16 peter Exp $";
-#endif
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-/*
- * Initial asm stuff for all functions.
- */
- .text
- .align 2
-
-
-/* ==========================================================================
- * 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;
- int $0x80;
- 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;
- int $0x80;
- jb 3f;
- ret
-
-3:
-
- 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_sigprocmask()
- */
- .globl _machdep_sys_sigprocmask;
-
-_machdep_sys_sigprocmask:;
-
- movl 8(%esp),%ecx
- movl (%ecx),%ecx
- movl %ecx,8(%esp)
- movl $(SYS_sigprocmask), %eax;
- int $0x80;
- jb 3b;
- ret
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
- .globl _machdep_sys_pipe;
-
-_machdep_sys_pipe:;
-
- movl $(SYS_pipe), %eax;
- int $0x80;
- jb 3b;
- movl 4(%esp),%ecx
- movl %eax,(%ecx)
- movl %edx,4(%ecx)
- xorl %eax,%eax
- ret
-
diff --git a/lib/libpthread/machdep/syscall-i386-netbsd-1.3.S b/lib/libpthread/machdep/syscall-i386-netbsd-1.3.S
deleted file mode 100644
index 9e129fc6fb7..00000000000
--- a/lib/libpthread/machdep/syscall-i386-netbsd-1.3.S
+++ /dev/null
@@ -1,196 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1990 The Regents of the University of California.
- * Copyright (c) 1993 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
- *
- * 1.00 93/08/26 proven
- * -Started coding this file.
- *
- * 1.01 93/11/13 proven
- * -The functions readv() and writev() added.
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-i386-netbsd-1.3.S,v 1.1 1998/07/21 13:19:19 peter Exp $";
-#endif
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)syscall.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-/*
- * Initial asm stuff for all functions.
- */
- .text
- .align 2
-
-
-/* ==========================================================================
- * 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;
- int $0x80;
- 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;
- int $0x80;
- jb 3f;
- ret
-
-3:
-
- 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_sigprocmask()
- */
- .globl _machdep_sys_sigprocmask;
-
-_machdep_sys_sigprocmask:;
-
- movl 8(%esp),%ecx
- movl (%ecx),%ecx
- movl %ecx,8(%esp)
- movl $(SYS_sigprocmask), %eax;
- int $0x80;
- jb 3b;
- ret
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
- .globl _machdep_sys_pipe;
-
-_machdep_sys_pipe:;
-
- movl $(SYS_pipe), %eax;
- int $0x80;
- jb 3b;
- movl 4(%esp),%ecx
- movl %eax,(%ecx)
- movl %edx,4(%ecx)
- xorl %eax,%eax
- ret
-
-/* ==========================================================================
- * machdep_sys_fstat()
- */
- .globl _machdep_sys_fstat;
-
-_machdep_sys_fstat:;
- movl $(SYS___fstat13), %eax;
- int $0x80;
- jb 4f;
- ret
-4:
- neg %eax
- movl $0xffffffff,%edx
- ret
-
diff --git a/lib/libpthread/machdep/syscall-i386-sco-3.2v5.S b/lib/libpthread/machdep/syscall-i386-sco-3.2v5.S
deleted file mode 100644
index 0a60dcdd866..00000000000
--- a/lib/libpthread/machdep/syscall-i386-sco-3.2v5.S
+++ /dev/null
@@ -1,442 +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-sco-3.2v5.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/errno.h>
-#include <sys/syscall.h>
-
-#ifdef _SCO_ELF
-
-#define NAME(X) machdep_sys_##X
-#define GETADDR(X) \
- call 1f; \
-1: \
- popl %ebx; \
- addl $NAME(X)+[.-1b], %ebx
-
-#define END(X) 1: ; .type NAME(X),@function ; .size NAME(X),1b - NAME(X)
-
-#else
-
-#define NAME(X) _machdep_sys_##X
-#define END(X)
-
-#endif
-
-#ifdef __STDC__
-
-#define SYSCALL(x) \
- .globl NAME(x); \
- \
-NAME(x): \
- movl $(SYS_##x##), %eax; \
- lcall $7, $0; \
- jae 1f; \
- cmp $(ERESTART), %eax; \
- je NAME(x); \
- neg %eax; \
-1: \
- ret; \
-\
- END(x)
-
-
-#else
-
-#define SYSCALL(x) \
- .globl NAME(x); \
- \
-NAME(x): \
- \
- movl $(SYS_/**/x), %eax; \
- lcall $7, $0; \
- jb 1b; \
- ret; \
- END(x)
-
-#endif
-
-
-/*
- * Initial asm stuff for all functions.
- */
- .text
- .align 2
-
-/* ==========================================================================
- * machdep_sys_fork()
- */
- .globl NAME(fork);
-
-NAME(fork):;
- movl $(SYS_fork), %eax
- lcall $7, $0
- jae 1f
- neg %eax
- ret
-1:
- test %edx, %edx
- je 2f
- xor %eax, %eax
-2:
- ret;
- END(fork)
-
-/* ==========================================================================
- * NAME(getdents)
- */
- .globl NAME(getdents);
-
-NAME(getdents):
- movl $(SYS_getdents), %eax;
- lcall $7, $0
- jae 1f
- neg %eax
-1:
- ret;
- END(getdents)
-
-/* ==========================================================================
- * NAME(fxstat)
- */
- .globl NAME(fxstat);
-
-NAME(fxstat):;
- movl $(SYS_fxstat), %eax;
- lcall $7, $0
- jae 1f
- neg %eax;
- ret;
-1:
- xor %eax, %eax;
- ret;
- END(fxstat)
-
-/* ==========================================================================
- * NAME(signal)
- */
- .globl NAME(signal);
-
-NAME(signal):;
- movl 4(%esp), %ecx
- movl $(SYS_signal),%eax
-#if 0
- call .L1
-.L1:
- popl %edx
- addl $(NAME(sigreturn)+[.-.L1]), %edx
-#else
- movl $NAME(sigreturn), %edx
-#endif
- lcall $7,$0
- jae 1f
-# movl %eax, 12(%esp)
- neg %eax
- ret
-1:
-# xor %eax, %eax
-# movl %eax, 12(%esp)
- ret
- END(signal)
-
-/* ==========================================================================
- * NAME(sigaction)
- */
- .globl NAME(sigaction);
-
-NAME(sigaction):
- movl $(SYS_sigaction),%eax
-#if 0
- call .L2
-.L2:
- popl %edx
- addl $(NAME(sigreturn)+[.-.L2]), %edx
-#else
- movl $NAME(sigreturn), %edx
-#endif
- lcall $7, $0
- jb 1f
- xor %eax, %eax
- ret
-1:
- neg %eax
- ret
- END(sigaction)
-
- .globl NAME(sigreturn)
-NAME(sigreturn):
- addl $4,%esp
- lcall $0xf, $0
- nop
- nop
- END(sigreturn)
-
-/* ==========================================================================
- * NAME(waitpid)
- */
- .globl NAME(waitpid);
-
-NAME(waitpid):
- .byte 0x9c
- popl %eax
- orl $0x8c4, %eax
- pushl %eax
- .byte 0x9d
- movl $(SYS_wait), %eax
- lcall $7, $0
- jae 2f
- cmpl $(ERESTART), %al
- je NAME(waitpid)
- neg %eax
-3:
- ret
-2:
- movl 8(%esp), %ecx
- test %ecx,%ecx
- je 3b
- mov %edx, (%ecx)
- ret
- END(waitpid)
-
-/* ==========================================================================
- * NAME(uname)
- */
- .globl NAME(uname);
-
-NAME(uname):
- pushl $0
- pushl $0
- pushl 12(%esp)
- subl $4, %esp
- movl $(SYS_utssys), %eax
- .byte 0x9a; .long 0; .word 7;
- jb 1f
- addl $16, %esp
- ret
-1:
- addl $16, %esp
- neg %eax
- ret
- END(uname)
-
-
-/* ==========================================================================
- * machdep_sys_ftruncate
- */
-
-SYSCALL(ftruncate)
-
-/* ==========================================================================
- * machdep_sys_ftime
- */
-
-SYSCALL(ftime)
-
-/* ==========================================================================
- * machdep_sys_gettimeofday()
- */
-
-SYSCALL(gettimeofday)
-
-/* ==========================================================================
- * machdep_sys_kill()
- */
-
-SYSCALL(kill)
-
-/* ==========================================================================
- * pthread_sys_setitimer
- */
- .globl NAME(setitimer);
-
-NAME(setitimer):;
- movl $(SYS_setitimer), %eax;
- lcall $7, $0
- jae 1f
- neg %eax
- ret
-1:
- xor %eax, %eax
- ret;
- END(setitimer)
-
-/* ==========================================================================
- * pthread_sys_sysconf
- */
- .globl NAME(sysconf);
-
-NAME(sysconf):;
- movl $(SYS_sysconf), %eax;
- lcall $7, $0
- jae 1f
- neg %eax
-1:
- ret;
- END(sysconf)
-
-/* ==========================================================================
- * pthread_sys_sysi86()
- */
- .globl NAME(sysi86);
-
-NAME(sysi86):;
- movl $(SYS_sysi86), %eax
- lcall $7, $0
- jae 1f
- neg %eax
-1:
- ret;
- END(sysi86)
-
-
-/* ==========================================================================
- * machdep_sys_brk()
- */
- .globl NAME(brk);
-
-NAME(brk):;
- movl $(SYS_break), %eax
- lcall $7, $0
- jae 1f
- neg %eax
- ret
-1:
- xor %eax, %eax
- ret;
- END(brk)
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
- .globl NAME(pipe);
-
-NAME(pipe):;
- movl $(SYS_pipe), %eax;
- lcall $7, $0
- jae 1f
- neg %eax
- ret
-1:
- movl 4(%esp), %ecx
- movl %eax, (%ecx)
- movl %edx, 4(%ecx)
- xor %eax, %eax
- ret;
- END(brk)
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
- .globl NAME(fcntl);
-
-NAME(fcntl):;
- movl $(SYS_fcntl), %eax
- lcall $7, $0
- jae 1f
- neg %eax
-1:
- ret
- END(fcntl)
-
-
-/* ==========================================================================
- * machdep_sys_select()
- */
- .globl NAME(select);
-
-NAME(select):;
- movl $(SYS_select), %eax
- lcall $7, $0
- jae 1f
- cmp $(ERESTART), %eax
- jne 2f
- movl $(EINTR), %eax
-2:
- neg %eax
-1:
- ret
- END(select)
-
-
-/* ==========================================================================
- * setjmp()
- */
- .globl setjmp;
-
-setjmp:
- movl 4(%esp),%eax
- movl %ebx,(%eax)
- movl %esi,4(%eax)
- movl %edi,8(%eax)
- movl %ebp,12(%eax)
- popl %edx
- movl %esp,16(%eax)
- movl %edx,20(%eax)
- subl %eax,%eax
- jmp *%edx
-1: ; .type setjmp,@function ; .size setjmp,1b - setjmp
-
-/* ==========================================================================
- * longjmp()
- */
- .globl longjmp;
-
-longjmp:
- movl 4(%esp),%edx
- movl 8(%esp),%eax
- movl 0(%edx),%ebx
- movl 4(%edx),%esi
- movl 8(%edx),%edi
- movl 12(%edx),%ebp
- movl 16(%edx),%esp
- test %eax,%eax
- jne 1f
- inc %eax
-1:
- jmp *20(%edx)
-1: ; .type longjmp,@function ; .size longjmp,1b - longjmp
diff --git a/lib/libpthread/machdep/syscall-ip22-irix-5.2.S b/lib/libpthread/machdep/syscall-ip22-irix-5.2.S
deleted file mode 100644
index ded0fc55e38..00000000000
--- a/lib/libpthread/machdep/syscall-ip22-irix-5.2.S
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <sys.s>
-#include <sys/regdef.h>
-
-/*
- Kernel syscall interface:
- Input:
- v0 syscall number
- Output:
-
- This macro is similar to SYSCALL in sys/syscall.h, but not completely.
- There's room for optimization, if we assume this will continue to
- be assembled as one file.
-
- Compile with -DPIC for pic code.
-*/
-
-#ifdef PIC
-#define PICOPT .option pic2
-#else
-#define PICOPT
-#endif
-
-
-#define YSYSCALL(x) \
- PICOPT; \
- .globl machdep_sys_##x; \
- .ent machdep_sys_##x, 0; \
-machdep_sys_##x:; \
- .frame sp,0,ra; \
- .set noreorder; \
- li v0, SYS_##x; \
- syscall; \
- bne a3, zero, 1b; \
- nop; \
- j ra; \
- nop; \
- .end machdep_sys_##x
-
-/* ==========================================================================
- * error code for all syscalls. The error value is returned as the negative
- * of the errno value.
- */
-
-1:
- subu v0,zero,v0;
- j ra;
-
-/* ==========================================================================
- * lstat
- */
- PICOPT;
- .globl machdep_sys_lstat;
- .ent machdep_sys_lstat, 0;
-machdep_sys_lstat:;
- .frame sp,0,ra;
- .set noreorder;
- move a2, a1
- move a1, a0
- li a0, 2
- li v0, SYS_lxstat;
- syscall;
- bne a3, zero, 1b;
- nop;
- j ra;
- nop;
- .end machdep_sys_lstat
-
-/* ==========================================================================
- * fstat
- */
- PICOPT;
- .globl machdep_sys_fstat;
- .ent machdep_sys_fstat, 0;
-machdep_sys_fstat:;
- .frame sp,0,ra;
- .set noreorder;
- move a2, a1
- move a1, a0
- li a0, 2
- li v0, SYS_fxstat;
- syscall;
- bne a3, zero, 1b;
- nop;
- j ra;
- nop;
- .end machdep_sys_fstat
-
-/* ==========================================================================
- * stat
- */
- PICOPT;
- .globl machdep_sys_stat;
- .ent machdep_sys_stat, 0;
-machdep_sys_stat:;
- .frame sp,0,ra;
- .set noreorder;
- move a2, a1
- move a1, a0
- li a0, 2
- li v0, SYS_xstat;
- syscall;
- bne a3, zero, 1b;
- nop;
- j ra;
- nop;
- .end machdep_sys_stat
diff --git a/lib/libpthread/machdep/syscall-r2000-ultrix-4.2.S b/lib/libpthread/machdep/syscall-r2000-ultrix-4.2.S
deleted file mode 100644
index 5115e867257..00000000000
--- a/lib/libpthread/machdep/syscall-r2000-ultrix-4.2.S
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1993 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 syscalls for decstation with r2000/r3000
- *
- * 1.00 93/08/14 proven
- * -Started coding this file.
- */
-
- .text
- .ascii "$Id: syscall-r2000-ultrix-4.2.S,v 1.1 1998/07/21 13:19:17 peter Exp $";
-
-#include <syscall.h>
-#include <machine/regdef.h>
-
-/*
- * 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. Eventually I want to load the errno value directly
- * into pthread_run->error but until then ...
- */
-machdep_error:
- negu v0, v0 /* Return negative of errno value. */
- j ra
-
-/* ==========================================================================
- * Syscalls already done,
- * Standard Other important BSD sockets
- * fork = 2 select = 93 socket = 97
- * read = 3 readv = 120 connect = 98
- * write = 4 writev = 121 accept = 99
- * open = 5 getdirentries = send = 101
- * close = 6 recv = 102
- * creat = 8 bind = 104
- * link = 9 listen = 106
- * unlink = 10 recvmsg = 113
- * chdir = 12 sendmsg = 114
- * chmod = 15 getsockopt = 118
- * chown = 16 recvfrom = 125
- * lseek = 19 sendto = 133
- * stat = 38 shutdown = 134
- * dup = 41 getpeername = 141
- * pipe = 42
- * execve = 59
- * fstat = 62
- * wait3 = 84
- * dup2 = 90
- * fcntl = 92
- * fchown = 123
- * fchmod = 124
- * rename = 128
- * waitpid = 189
- * ======================================================================= */
-
-/* ==========================================================================
- * machdep_sys_fork()
- */
- .globl machdep_sys_fork
- .ent machdep_sys_fork
-
-machdep_sys_fork:
-
- .frame sp,0,ra /* No frame, return address in ra */
-
- li v0,SYS_fork /* Load fork syscall # into v0 */
- syscall
- bne a3,zero,machdep_error /* Error if a3 != 0 */
- beqz v1,__fork_parent /* Second return value = 0, if parent */
- li v0,0
-__fork_parent:
- j ra
-
- .end machdep_sys_fork
-
-/* ==========================================================================
- * machdep_sys_pipe()
- */
- .globl machdep_sys_pipe
- .ent machdep_sys_pipe
-
-machdep_sys_pipe:
-
- .frame sp,0,ra /* No frame, return address in ra */
-
- li v0,SYS_pipe /* Load pipe syscall # into v0 */
- syscall
- bne a3,zero,machdep_error /* Error if a3 != 0 */
- sw v0, 0(a0)
- sw v1, 4(a0)
- li v0, 0
- j ra
-
- .end machdep_sys_pipe
-
-/* ==========================================================================
- * Other important asm routines.
- * ======================================================================= */
-/* ==========================================================================
- * fake_setjmp()
- */
- .globl fake_setjmp
- .ent fake_setjmp
-
-fake_setjmp:
-
- .frame sp,0,ra /* No frame, return address in ra */
-
- /* Save all the important registers */
- sw ra,8(a0)
- sw gp,124(a0)
- sw sp,128(a0)
- sw s0,76(a0)
- /* More registers needed. */
- j ra
-
- .end fake_longjmp
-
-/* ==========================================================================
- * machdep_sys_longjmp()
- */
- .globl machdep_sys_longjmp
- .ent machdep_sys_longjmp
-
-machdep_sys_longjmp:
-
- .frame sp,0,ra /* No frame, return address in ra */
- li a1,1 /* Load 1 into reg a1 */
- sw a1, 20(a0); /* Load a1 into address a0 + 20 */
- li v0,SYS_sigreturn /* Load sigreturn syscall # into v0 */
- syscall /* Do syscall to do longjmp */
- j ra
-
- .end machdep_sys_longjmp
diff --git a/lib/libpthread/machdep/syscall-romp-bsd.S b/lib/libpthread/machdep/syscall-romp-bsd.S
deleted file mode 100644
index 4fbe7c24d6f..00000000000
--- a/lib/libpthread/machdep/syscall-romp-bsd.S
+++ /dev/null
@@ -1,327 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1993 by John F. Carr, jfc@mit.edu
- *
- * 1.00 93/09/xx proven
- * -Started coding this file.
- */
-
-#ifndef lint
-static const char rcsid[] = "$Id: syscall-romp-bsd.S,v 1.1 1998/07/21 13:19:17 peter Exp $";
-#endif
-
-/* DO NOT USE COLONS IN THIS FILE, GCC CAN'T HANDLE THEM */
-/* #include <copyright.h> */
-
- .globl .oVncs
- .text
- .align 2
-
-/* ==========================================================================
- * machdep_sys_write()
- */
- .globl _machdep_sys_write
- .globl _.machdep_sys_write
-
- .text 2
-_machdep_sys_write:
- .long _.machdep_sys_write
-
- .text
-_.machdep_sys_write:
- lcs r0,0(r3)
- svc 4(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_read()
- */
- .globl _machdep_sys_read
- .globl _.machdep_sys_read
-
- .text 2
-_machdep_sys_read:
- .long _.machdep_sys_read
-
- .text
-_.machdep_sys_read:
- lcs r0,0(r3)
- svc 3(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_open()
- */
- .globl _machdep_sys_open
- .globl _.machdep_sys_open
-
- .text 2
-_machdep_sys_open:
- .long _.machdep_sys_open
-
- .text
-_.machdep_sys_open:
- lcs r0,0(r2)
- svc 5(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_bind()
- */
- .globl _machdep_sys_bind
- .globl _.machdep_sys_bind
-
- .text 2
-_machdep_sys_bind:
- .long _.machdep_sys_bind
-
- .text
-_.machdep_sys_bind:
- ls r0,0(r3)
- svc 104(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_socket()
- */
- .globl _machdep_sys_socket
- .globl _.machdep_sys_socket
-
- .text 2
-_machdep_sys_socket:
- .long _.machdep_sys_socket
-
- .text
- .align 2
-_.machdep_sys_socket:
- svc 97(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_close()
- */
- .globl _machdep_sys_close
- .globl _.machdep_sys_close
-
- .text 2
-_machdep_sys_close:
- .long _.machdep_sys_close
-
- .text
- .align 2
-_.machdep_sys_close:
- svc 6(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-
-/* ==========================================================================
- * machdep_sys_connect()
- */
- .globl _machdep_sys_connect
- .globl _.machdep_sys_connect
-
- .text 2
-_machdep_sys_connect:
- .long _.machdep_sys_connect
-
- .text
-_.machdep_sys_connect:
- lcs r0,0(r3)
- svc 98(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-/* ==========================================================================
- * machdep_sys_accept()
- */
- .globl _machdep_sys_accept
- .globl _.machdep_sys_accept
-
- .text 2
-_machdep_sys_accept:
- .long _.machdep_sys_accept
-
- .text
-_.machdep_sys_accept:
- lcs r0,0(r3)
- svc 99(r0)
- bntbr r15
- store r2,_errno,r5
- cal r2,-1(r0)
-
-/* ==========================================================================
- * machdep_sys_listen()
- */
- .globl _machdep_sys_listen
- .globl _.machdep_sys_listen
-
- .text 2
- .align 2
-_machdep_sys_listen:
- .long _.machdep_sys_listen
-
- .text
- .align 2
-_.machdep_sys_listen:
- svc 106(r0)
- bntbr r15
- brx r15
- twoc r2,r2
-
-/* ==========================================================================
- * machdep_sys_fcntl()
- */
- .globl _.machdep_sys_fcntl
- .globl _machdep_sys_fcntl
-
- .text 2
-_machdep_sys_fcntl:
- .long _.machdep_sys_fcntl
- .text
-_.machdep_sys_fcntl:
- lcs r0,0(sp)
- svc 92(r0)
- bntbr r15
- store r2,_errno,r5
- brx r15
- cal r2,-1(r0)
-
-/* ==========================================================================
- * machdep_sys_getpeername()
- */
- .globl _machdep_sys_getpeername
- .globl _.machdep_sys_getpeername
-
- .text 2
-_machdep_sys_getpeername:
- .long _.machdep_sys_getpeername
-
- .text
-_.machdep_sys_getpeername:
- ls r0,0(sp)
- svc 141(r0)
- bntbr r15
- brx r15
- twoc r2,r2
-
-
-/* ==========================================================================
- * machdep_sys_getsockopt()
- */
- .globl _machdep_sys_getsockopt
- .globl _.machdep_sys_getsockopt
-
- .text 2
-_machdep_sys_getsockopt:
- .long _.machdep_sys_getsockopt
-
- .text
-_.machdep_sys_getsockopt:
- ls r0,0(sp)
- svc 118(r0)
- bntbr r15
- brx r15
- twoc r2,r2
-
-
-/* ==========================================================================
- * machdep_sys_select()
- */
-
- .globl _.machdep_sys_select
- .globl _machdep_sys_select
-
- .text 2
-_machdep_sys_select:
- .long _.machdep_sys_select
- .text
-_.machdep_sys_select:
- svc 93(r0)
- bntbr r15
- brx r15
- twoc r2,r2
-
-/* ==========================================================================
- * __tsh()
- */
- .globl _._tsh
- .globl __tsh
- .text 2
-__tsh: .long _._tsh
- .text
- .align 2
-_._tsh:
- brx r15
- tsh r2,0(r2)
-
-
-/* ==========================================================================
- * __pthread_save()
- */
- .globl __pthread_save
- .globl _._pthread_save
- .text 2
-__pthread_save:
- .long _._pthread_save
- .text
- .align 2
-_._pthread_save:
- ail r5,r4,0
- jne 1f
- mr r4,sp
- lis r5,0
- stm r4,0(r2)
- brx r15
- lis r2,0
-1:
- mr r0,r15 # save old return address
- ls r15,0(r4) # new return address
- mr r5,r4 # r0 to restore
- mr r4,r3 # sp to restore
- stm r4,0(r2)
- brx r0
- lis r2,0
-
-
-/* ==========================================================================
- * __pthread_restore()
- */
- .globl __pthread_restore
- .globl _._pthread_restore
- .text 2
-__pthread_restore:
- .long _._pthread_restore
- .text
- .align 2
-_._pthread_restore:
- lm r4,0(r2)
- mr r0,r5
- lis r2,1
- brx r15
- mr sp,r4
-
-
diff --git a/lib/libpthread/machdep/syscall-sparc-sunos-4.1.3.S b/lib/libpthread/machdep/syscall-sparc-sunos-4.1.3.S
deleted file mode 100644
index 3e03fcf446f..00000000000
--- a/lib/libpthread/machdep/syscall-sparc-sunos-4.1.3.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-sparc-sunos-4.1.3.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;
- tst %o1
- bne,a __fork_parent
- mov %g0, %o0
-__fork_parent:;
- retl
-
-/* POSIX-compliant getpgrp() takes no arguments. The SunOS syscall wants
- one, and gives the POSIXy result if that argument is zero. */
- .globl _getpgrp
-_getpgrp:
- mov SYS_getpgrp, %g1
- mov 0, %i0
- ta 0
- bcs 1b
- nop
- retl
- nop
-
-#if 0
-/* I think this bit of magic will do the right thing for other syscalls.
- We get here with the new `errno' code in %o0. It should get stored in
- *__error(), and -1 returned to the caller. */
- .globl cerror
-cerror:
- save %sp,-104,%sp
- /* Now value is in %i0. Store it in *__error(). */
- call ___error
- nop
- st %i0,[%o0]
-
- /* Now also store a copy in global variable errno, for routines
- like isatty that want to examine it and which haven't been
- converted yet. */
- sethi %hi(_errno), %o0
- st %i0,[%o0+%lo(_errno)]
-
-#if 0 /* use this if you want -errno returned */
- sub %r0,%i0,%i0
-#else /* return -1 */
- mov -1,%i0
-#endif
- retl
- restore
-#endif
diff --git a/lib/libpthread/machdep/syscall-sparc-sunos-5.3.S b/lib/libpthread/machdep/syscall-sparc-sunos-5.3.S
deleted file mode 100644
index afcfecf22b8..00000000000
--- a/lib/libpthread/machdep/syscall-sparc-sunos-5.3.S
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-sparc-sunos-5.3.S,v 1.1 1998/07/21 13:19:17 peter Exp $";
-#endif
-
-#define _ASM
-#include <sys/syscall.h>
-
-/*
- * 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_fork()
- */
- .globl machdep_sys_fork;
-
-machdep_sys_fork:;
-
- mov SYS_fork, %g1;
- ta 0;
- bcs 1b;
- nop;
- tst %o1
- bne,a __fork_parent
- mov %g0, %o0
-__fork_parent:;
- retl
- nop; /* Added by monty to keep sparc assembler happy */
-
-/* ==========================================================================
- * Berkeley socket stuff
- *
- * ==========================================================================
- * machdep_sys_socketcall()
- */
- .globl machdep_sys_socketcall;
-
-machdep_sys_socketcall:;
-
- mov 83, %g1;
- ta 0;
- bcs,a 2b;
- sub %r0,%o0,%o0;
- retl
- nop; /* Added by monty to keep sparc assembler happy */
diff --git a/lib/libpthread/machdep/syscall-sparc-sunos4.S b/lib/libpthread/machdep/syscall-sparc-sunos4.S
deleted file mode 100644
index d1d6db6a6a3..00000000000
--- a/lib/libpthread/machdep/syscall-sparc-sunos4.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-sparc-sunos4.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;
- tst %o1
- bne,a __fork_parent
- mov %g0, %o0
-__fork_parent:;
- retl
-
-/* POSIX-compliant getpgrp() takes no arguments. The SunOS syscall wants
- one, and gives the POSIXy result if that argument is zero. */
- .globl _getpgrp
-_getpgrp:
- mov SYS_getpgrp, %g1
- mov 0, %i0
- ta 0
- bcs 1b
- nop
- retl
- nop
-
-#if 0
-/* I think this bit of magic will do the right thing for other syscalls.
- We get here with the new `errno' code in %o0. It should get stored in
- *__error(), and -1 returned to the caller. */
- .globl cerror
-cerror:
- save %sp,-104,%sp
- /* Now value is in %i0. Store it in *__error(). */
- call ___error
- nop
- st %i0,[%o0]
-
- /* Now also store a copy in global variable errno, for routines
- like isatty that want to examine it and which haven't been
- converted yet. */
- sethi %hi(_errno), %o0
- st %i0,[%o0+%lo(_errno)]
-
-#if 0 /* use this if you want -errno returned */
- sub %r0,%i0,%i0
-#else /* return -1 */
- mov -1,%i0
-#endif
- retl
- restore
-#endif
diff --git a/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.1.S b/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.1.S
deleted file mode 100644
index a2941ece7c9..00000000000
--- a/lib/libpthread/machdep/syscall-template-alpha-netbsd-1.1.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-alpha-osf1.S b/lib/libpthread/machdep/syscall-template-alpha-osf1.S
deleted file mode 100644
index bc4653b5f9e..00000000000
--- a/lib/libpthread/machdep/syscall-template-alpha-osf1.S
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <asm.h>
-#include <regdef.h>
-#define COMPAT_43
-#include <syscall.h>
-
-#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, 2f ;\
- br gp, 1f ;\
-1: ;\
- /* Load gp so we can find cerror to jump to. */;\
- ldgp gp, 0(gp) ;\
- jmp zero, machdep_cerror ;\
-2:
-
-#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-hppa-hpux-10.20.S b/lib/libpthread/machdep/syscall-template-hppa-hpux-10.20.S
deleted file mode 100644
index 0123b1deee7..00000000000
--- a/lib/libpthread/machdep/syscall-template-hppa-hpux-10.20.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ==== syscall.S ============================================================
- * Written 1996 by Stefan Grefen, grefen@convex.com
- */
-
-#include <sys/syscall.h>
-
-#define _CAT(a,b)a##b
-#define CAT(a,b)_CAT(a,b)
-
-#define MKNAME(a)CAT(a,SYSCALL_NAME)
-
- .CODE
-machdep_error
- sub %r0,%r28,%r28
- bv,n %r0(%r2)
-
- .label MKNAME(machdep_sys_)
- .PROC
- .CALLINFO NO_CALLS,FRAME=0
- ldil -0x80000,%r1
- ble 4(%sr7,%r1)
- ldi MKNAME(SYS_),%r22
- or,= %r0,%r22,%r0
- b,n machdep_error
- bv,n %r0(%r2)
- .PROCEND
- .EXPORT MKNAME(machdep_sys_)
diff --git a/lib/libpthread/machdep/syscall-template-hppa-hpux-9.03.S b/lib/libpthread/machdep/syscall-template-hppa-hpux-9.03.S
deleted file mode 100644
index 0123b1deee7..00000000000
--- a/lib/libpthread/machdep/syscall-template-hppa-hpux-9.03.S
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ==== syscall.S ============================================================
- * Written 1996 by Stefan Grefen, grefen@convex.com
- */
-
-#include <sys/syscall.h>
-
-#define _CAT(a,b)a##b
-#define CAT(a,b)_CAT(a,b)
-
-#define MKNAME(a)CAT(a,SYSCALL_NAME)
-
- .CODE
-machdep_error
- sub %r0,%r28,%r28
- bv,n %r0(%r2)
-
- .label MKNAME(machdep_sys_)
- .PROC
- .CALLINFO NO_CALLS,FRAME=0
- ldil -0x80000,%r1
- ble 4(%sr7,%r1)
- ldi MKNAME(SYS_),%r22
- or,= %r0,%r22,%r0
- b,n machdep_error
- bv,n %r0(%r2)
- .PROCEND
- .EXPORT MKNAME(machdep_sys_)
diff --git a/lib/libpthread/machdep/syscall-template-i386-bsdi-2.0.S b/lib/libpthread/machdep/syscall-template-i386-bsdi-2.0.S
deleted file mode 100644
index 3299f49195f..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-bsdi-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-i386-freebsd-2.0.S b/lib/libpthread/machdep/syscall-template-i386-freebsd-2.0.S
deleted file mode 100644
index 34fb5caaa43..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-freebsd-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-i386-netbsd-1.1.S b/lib/libpthread/machdep/syscall-template-i386-netbsd-1.1.S
deleted file mode 100644
index c5e76bb4538..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-netbsd-1.1.S
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-#ifdef __STDC__
-
-#define SYSCALL(x) \
- .globl _machdep_sys_##x; \
- \
-_machdep_sys_##x:; \
- \
- movl $(SYS_##x), %eax; \
- int $0x80; \
- jb 1b; \
- ret;
-
-#else
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-_machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- int $0x80; \
- 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-i386-netbsd-1.3.S b/lib/libpthread/machdep/syscall-template-i386-netbsd-1.3.S
deleted file mode 100644
index c5e76bb4538..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-netbsd-1.3.S
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <machine/asm.h>
-#include <sys/syscall.h>
-
-#ifdef __STDC__
-
-#define SYSCALL(x) \
- .globl _machdep_sys_##x; \
- \
-_machdep_sys_##x:; \
- \
- movl $(SYS_##x), %eax; \
- int $0x80; \
- jb 1b; \
- ret;
-
-#else
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-_machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- int $0x80; \
- 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-i386-netbsd1.0.S b/lib/libpthread/machdep/syscall-template-i386-netbsd1.0.S
deleted file mode 100644
index 83a2405ed51..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-netbsd1.0.S
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <machine/asm.h>
-#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-i386-sco-3.2v5.S b/lib/libpthread/machdep/syscall-template-i386-sco-3.2v5.S
deleted file mode 100644
index 753475b5c3d..00000000000
--- a/lib/libpthread/machdep/syscall-template-i386-sco-3.2v5.S
+++ /dev/null
@@ -1,67 +0,0 @@
-#include <sys/errno.h>
-#include <sys/syscall.h>
-
-#ifdef _SCO_ELF
-
-#define NAME(X) machdep_sys_##X
-#define END(X) 1: ; .type NAME(X),@function ; .size NAME(X),1b - NAME(X)
-#define GETBX(X) \
- push %ebx; \
- call 1f; \
-1: \
- popl %ebx;
-#else
-
-#define NAME(X) _machdep_sys_##X
-#define END(X)
-
-#endif
-
-#ifdef __STDC__
-
-#define SYSCALL(x) \
- .globl NAME(x); \
- \
-NAME(x):; \
- movl $(SYS_##x##), %eax; \
- .byte 0x9a; .long 0; .word 7; \
- jae 1f; \
- cmp $(ERESTART), %eax; \
- je NAME(x); \
- neg %eax; \
-1: \
- ret; \
- END(x)
-
-#else
-
-#define SYSCALL(x) \
- .globl _machdep_sys_/**/x; \
- \
-machdep_sys_/**/x:; \
- \
- movl $(SYS_/**/x), %eax; \
- .byte 0x9a; .long 0; .word 7; \
- jae 1f; \
- neg %eax;
-1: \
- 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.
- */
-
-#define XSYSCALL(NAME) SYSCALL(NAME)
-
-XSYSCALL(SYSCALL_NAME)
diff --git a/lib/libpthread/machdep/syscall-template-ip22-irix-5.2.S b/lib/libpthread/machdep/syscall-template-ip22-irix-5.2.S
deleted file mode 100644
index 722b001671b..00000000000
--- a/lib/libpthread/machdep/syscall-template-ip22-irix-5.2.S
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <sys.s>
-#include <sys/regdef.h>
-/* #include <sys/asm.h> */
-
-/*
- Kernel syscall interface:
- Input:
- v0 syscall number
- Output:
-
- This macro is similar to SYSCALL in sys/syscall.h, but not completely.
- There's room for optimization, if we assume this will continue to
- be assembled as one file.
-
- Compile with -DPIC for pic code.
-*/
-
-#ifdef PIC
-#define PICOPT .option pic2
-#else
-#define PICOPT
-#endif
-
-
-#define YSYSCALL(x) \
- PICOPT; \
- .globl machdep_sys_##x; \
- .ent machdep_sys_##x, 0; \
-machdep_sys_##x:; \
- .frame sp,0,ra; \
- .set noreorder; \
- li v0, SYS_##x; \
- syscall; \
- bne a3, zero, 1b; \
- nop; \
- j ra; \
- nop; \
- .end machdep_sys_##x
-
-/* ==========================================================================
- * error code for all syscalls. The error value is returned as the negative
- * of the errno value.
- */
-
-1:
- subu v0,zero,v0;
- j ra;
-
-#define XSYSCALL(x) YSYSCALL(x)
-
-XSYSCALL(SYSCALL_NAME)
diff --git a/lib/libpthread/machdep/syscall-template-r2000-ultrix-4.2.S b/lib/libpthread/machdep/syscall-template-r2000-ultrix-4.2.S
deleted file mode 100644
index c034d8114b0..00000000000
--- a/lib/libpthread/machdep/syscall-template-r2000-ultrix-4.2.S
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1993 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 syscalls for decstation with r2000/r3000
- *
- * 1.00 93/08/14 proven
- * -Started coding this file.
- */
-
- .text
- .ascii "$Id: syscall-template-r2000-ultrix-4.2.S,v 1.1 1998/07/21 13:19:17 peter Exp $";
-
-#include <syscall.h>
-#include <machine/regdef.h>
-
-#define SYSCALL(x) \
- \
- .globl machdep_sys_##x; \
- .ent machdep_sys_##x; \
- \
-machdep_sys_##x:; \
- \
- .frame sp,0,ra; /* No frame, return address in ra */ \
- \
- li v0,SYS_##x; /* Load syscall # into v0 */ \
- syscall; \
- bne a3,zero,machdep_error; /* Error if a3 != 0 */ \
- j ra; \
- \
- .end machdep_sys_##x
-
-/*
- * 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. Eventually I want to load the errno value directly
- * into pthread_run->error but until then ...
- */
-machdep_error:
- negu v0, v0 /* Return negative of errno value. */
- j ra
-
-#define XSYSCALL(NAME) SYSCALL(NAME)
-
-XSYSCALL(SYSCALL_NAME)
diff --git a/lib/libpthread/machdep/syscall-template-sparc-sunos-5.3.S b/lib/libpthread/machdep/syscall-template-sparc-sunos-5.3.S
deleted file mode 100644
index b86541f3049..00000000000
--- a/lib/libpthread/machdep/syscall-template-sparc-sunos-5.3.S
+++ /dev/null
@@ -1,45 +0,0 @@
-/* ==== syscall.S ============================================================
- * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
- * All rights reserved.
- *
- */
-
-#ifndef lint
- .text
- .asciz "$Id: syscall-template-sparc-sunos-5.3.S,v 1.1 1998/07/21 13:19:17 peter Exp $";
-#endif
-
-#define _ASM
-#include <sys/syscall.h>
-
-/*
- * 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 concat2(a,b) a ## b
-#define concat(a,b) concat2(a,b)
-#define SYSval concat(SYS_,SYSCALL_NAME)
-#define procname concat(machdep_sys_,SYSCALL_NAME)
-
- .globl procname
-
-procname:
- mov SYSval, %g1
- ta 0
- bcs,a 2b
- sub %r0,%o0,%o0
- retl
- nop
diff --git a/lib/libpthread/machdep/syscall-template-sparc-sunos4.S b/lib/libpthread/machdep/syscall-template-sparc-sunos4.S
deleted file mode 100644
index 2d07892a315..00000000000
--- a/lib/libpthread/machdep/syscall-template-sparc-sunos4.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)
diff --git a/lib/libpthread/machdep/unistd-i386-freebsd-1.1.h b/lib/libpthread/machdep/unistd-i386-freebsd-1.1.h
deleted file mode 100644
index 033e70de5e5..00000000000
--- a/lib/libpthread/machdep/unistd-i386-freebsd-1.1.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1991 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.
- *
- * @(#)unistd.h 5.13 (Berkeley) 6/17/91
- */
-
-#ifndef _UNISTD_H_
-#define _UNISTD_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <sys/unistd.h>
-
-#define STDIN_FILENO 0 /* standard input file descriptor */
-#define STDOUT_FILENO 1 /* standard output file descriptor */
-#define STDERR_FILENO 2 /* standard error file descriptor */
-
-#ifndef NULL
-#define NULL 0 /* null pointer constant */
-#endif
-
-typedef int ssize_t; /* count of bytes or error indication */
-
-__BEGIN_DECLS
-void _exit __P_((int));
-int access __P_((const char *, int));
-u_int alarm __P_((u_int));
-int chdir __P_((const char *));
-int chown __P_((const char *, uid_t, gid_t));
-int close __P_((int));
-char *cuserid __P_((char *));
-int dup __P_((int));
-int dup2 __P_((int, int));
-int execl __P_((const char *, const char *, ...));
-int execle __P_((const char *, const char *, ...));
-int execlp __P_((const char *, const char *, ...));
-int execv __P_((const char *, char * const *));
-int execve __P_((const char *, char * const *, char * const *));
-int execvp __P_((const char *, char * const *));
-pid_t fork __P_((void));
-long fpathconf __P_((int, int)); /* not yet */
-char *getcwd __P_((char *, size_t));
-gid_t getegid __P_((void));
-uid_t geteuid __P_((void));
-gid_t getgid __P_((void));
-int getgroups __P_((int, int *)); /* XXX (gid_t *) */
-char *getlogin __P_((void));
-pid_t getpgrp __P_((void));
-pid_t getpid __P_((void));
-pid_t getppid __P_((void));
-uid_t getuid __P_((void));
-int isatty __P_((int));
-int link __P_((const char *, const char *));
-off_t lseek __P_((int, off_t, int));
-long pathconf __P_((const char *, int)); /* not yet */
-int pause __P_((void));
-int pipe __P_((int *));
-ssize_t read __P_((int, void *, size_t));
-int rmdir __P_((const char *));
-int setgid __P_((gid_t));
-int setpgid __P_((pid_t, pid_t));
-pid_t setsid __P_((void));
-int setuid __P_((uid_t));
-u_int sleep __P_((u_int));
-long sysconf __P_((int)); /* not yet */
-pid_t tcgetpgrp __P_((int));
-int tcsetpgrp __P_((int, pid_t));
-char *ttyname __P_((int));
-int unlink __P_((const char *));
-ssize_t write __P_((int, const void *, size_t));
-
-#ifndef _POSIX_SOURCE
-
-/* structure timeval required for select() */
-#include <sys/time.h>
-
-int acct __P_((const char *));
-int async_daemon __P_((void));
-char *brk __P_((const char *));
-int chflags __P_((const char *, long));
-int chroot __P_((const char *));
-char *crypt __P_((const char *, const char *));
-int des_cipher __P_((const char *, char *, long, int));
-int des_setkey __P_((const char *key));
-int encrypt __P_((char *, int));
-void endusershell __P_((void));
-int exect __P_((const char *, char * const *, char * const *));
-int fchdir __P_((int));
-int fchflags __P_((int, long));
-int fchown __P_((int, uid_t, gid_t));
-int fsync __P_((int));
-int ftruncate __P_((int, off_t));
-int getdtablesize __P_((void));
-long gethostid __P_((void));
-int gethostname __P_((char *, int));
-mode_t getmode __P_((const void *, mode_t));
-int getpagesize __P_((void));
-char *getpass __P_((const char *));
-char *getusershell __P_((void));
-char *getwd __P_((char *)); /* obsoleted by getcwd() */
-int initgroups __P_((const char *, int));
-int mknod __P_((const char *, mode_t, dev_t));
-int mkstemp __P_((char *));
-char *mktemp __P_((char *));
-int nfssvc __P_((int));
-int nice __P_((int));
-void psignal __P_((u_int, const char *));
-extern char *sys_siglist[];
-int profil __P_((char *, int, int, int));
-int rcmd __P_((char **, int, const char *,
- const char *, const char *, int *));
-char *re_comp __P_((const char *));
-int re_exec __P_((const char *));
-int readlink __P_((const char *, char *, int));
-int reboot __P_((int));
-int revoke __P_((const char *));
-int rresvport __P_((int *));
-int ruserok __P_((const char *, int, const char *, const char *));
-char *sbrk __P_((int));
-int select __P_((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-int setegid __P_((gid_t));
-int seteuid __P_((uid_t));
-int setgroups __P_((int, const int *));
-void sethostid __P_((long));
-int sethostname __P_((const char *, int));
-int setkey __P_((const char *));
-int setlogin __P_((const char *));
-void *setmode __P_((const char *));
-int setpgrp __P_((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */
-int setregid __P_((int, int));
-int setreuid __P_((int, int));
-int setrgid __P_((gid_t));
-int setruid __P_((uid_t));
-void setusershell __P_((void));
-int swapon __P_((const char *));
-int symlink __P_((const char *, const char *));
-void sync __P_((void));
-int syscall __P_((int, ...));
-int truncate __P_((const char *, off_t));
-int ttyslot __P_((void));
-u_int ualarm __P_((u_int, u_int));
-void usleep __P_((u_int));
-void *valloc __P_((size_t)); /* obsoleted by malloc() */
-int vfork __P_((void));
-
-#endif /* !_POSIX_SOURCE */
-__END_DECLS
-
-#endif /* !_UNISTD_H_ */
diff --git a/lib/libpthread/machdep/unistd-i386-linux-1.0.h b/lib/libpthread/machdep/unistd-i386-linux-1.0.h
deleted file mode 100644
index e7a3c5de1e4..00000000000
--- a/lib/libpthread/machdep/unistd-i386-linux-1.0.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * Copyright (c) 1991 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.
- *
- * @(#)unistd.h 5.13 (Berkeley) 6/17/91
- */
-
-#ifndef _UNISTD_H_
-#define _UNISTD_H_
-
-#include <features.h>
-
-/* POSIX Standard approved as IEEE Std 1003.1 as of August, 1988. */
-#define _POSIX_VERSION 199009L
-#define _POSIX2_C_BIND 1
-#define _POSIX2_C_DEV 1
-#define _POSIX2_SW_DEV 1
-
-#define __need_size_t
-
-#include <posix_opt.h>
-#include <sys/types.h>
-#include <stddef.h>
-
-#define STDIN_FILENO 0 /* standard input file descriptor */
-#define STDOUT_FILENO 1 /* standard output file descriptor */
-#define STDERR_FILENO 2 /* standard error file descriptor */
-
-#include <pthread/unistd.h>
-
-#endif /* !_UNISTD_H_ */
diff --git a/lib/libpthread/machdep/unistd-sparc-sunos-4.1.3.h b/lib/libpthread/machdep/unistd-sparc-sunos-4.1.3.h
deleted file mode 100644
index 2fb0d137707..00000000000
--- a/lib/libpthread/machdep/unistd-sparc-sunos-4.1.3.h
+++ /dev/null
@@ -1,215 +0,0 @@
-/*-
- * Copyright (c) 1991 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: @(#)unistd.h 5.13 (Berkeley) 6/17/91
- * $Id: unistd-sparc-sunos-4.1.3.h,v 1.1 1998/07/21 13:19:18 peter Exp $
- */
-
-#ifndef _UNISTD_H_
-#define _UNISTD_H_
-
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#define _NO_STDIO_SIZE_T
-
-#define _SC_ARG_MAX 1 /* space for argv & envp */
-#define _SC_CHILD_MAX 2 /* maximum children per process??? */
-#define _SC_CLK_TCK 3 /* clock ticks/sec */
-#define _SC_NGROUPS_MAX 4 /* number of groups if multple supp. */
-#define _SC_OPEN_MAX 5 /* max open files per process */
-#define _SC_JOB_CONTROL 6 /* do we have job control */
-#define _SC_SAVED_IDS 7 /* do we have saved uid/gids */
-#define _SC_VERSION 8 /* POSIX version supported */
-
-#define _POSIX_JOB_CONTROL 1
-#define _POSIX_SAVED_IDS 1
-#define _POSIX_VERSION 198808
-
-#define _PC_LINK_MAX 1 /* max links to file/dir */
-#define _PC_MAX_CANON 2 /* max line length */
-#define _PC_MAX_INPUT 3 /* max "packet" to a tty device */
-#define _PC_NAME_MAX 4 /* max pathname component length */
-#define _PC_PATH_MAX 5 /* max pathname length */
-#define _PC_PIPE_BUF 6 /* size of a pipe */
-#define _PC_CHOWN_RESTRICTED 7 /* can we give away files */
-#define _PC_NO_TRUNC 8 /* trunc or error on >NAME_MAX */
-#define _PC_VDISABLE 9 /* best char to shut off tty c_cc */
-#define _PC_LAST 9 /* highest value of any _PC_* */
-
-
-#define STDIN_FILENO 0 /* standard input file descriptor */
-#define STDOUT_FILENO 1 /* standard output file descriptor */
-#define STDERR_FILENO 2 /* standard error file descriptor */
-
-#ifndef NULL
-#define NULL 0 /* null pointer constant */
-#endif
-
-typedef int ssize_t;
-
-__BEGIN_DECLS
-void _exit __P_((int));
-int access __P_((const char *, int));
-unsigned alarm __P_((unsigned));
-int chdir __P_((const char *));
-int chown __P_((const char *, uid_t, gid_t));
-int close __P_((int));
-size_t confstr __P_((int, char *, size_t));
-char *cuserid __P_((char *));
-int dup __P_((int));
-int dup2 __P_((int, int));
-int execl __P_((const char *, const char *, ...));
-int execle __P_((const char *, const char *, ...));
-int execlp __P_((const char *, const char *, ...));
-int execv __P_((const char *, char * const *));
-int execve __P_((const char *, char * const *, char * const *));
-int execvp __P_((const char *, char * const *));
-pid_t fork __P_((void));
-long fpathconf __P_((int, int)); /* not yet */
-char *getcwd __P_((char *, size_t));
-gid_t getegid __P_((void));
-uid_t geteuid __P_((void));
-gid_t getgid __P_((void));
-int getgroups __P_((int, int *)); /* XXX (gid_t *) */
-char *getlogin __P_((void));
-pid_t getpgrp __P_((void));
-pid_t getpid __P_((void));
-pid_t getppid __P_((void));
-uid_t getuid __P_((void));
-int isatty __P_((int));
-int link __P_((const char *, const char *));
-off_t lseek __P_((int, off_t, int));
-long pathconf __P_((const char *, int)); /* not yet */
-int pause __P_((void));
-int pipe __P_((int *));
-ssize_t read __P_((int, void *, size_t));
-int rmdir __P_((const char *));
-int setgid __P_((gid_t));
-int setpgid __P_((pid_t, pid_t));
-pid_t setsid __P_((void));
-int setuid __P_((uid_t));
-unsigned sleep __P_((unsigned));
-long sysconf __P_((int)); /* not yet */
-pid_t tcgetpgrp __P_((int));
-int tcsetpgrp __P_((int, pid_t));
-char *ttyname __P_((int));
-int unlink __P_((const char *));
-ssize_t write __P_((int, const void *, size_t));
-
-#ifndef _POSIX_SOURCE
-
-/* structure timeval required for select() */
-#include <sys/time.h>
-
-int acct __P_((const char *));
-int async_daemon __P_((void));
-char *brk __P_((const char *));
-int chflags __P_((const char *, long));
-int chroot __P_((const char *));
-char *crypt __P_((const char *, const char *));
-int des_cipher __P_((const char *, char *, long, int));
-int des_setkey __P_((const char *key));
-int encrypt __P_((char *, int));
-void endusershell __P_((void));
-int exect __P_((const char *, char * const *, char * const *));
-int fchdir __P_((int));
-int fchflags __P_((int, long));
-int fchown __P_((int, uid_t, gid_t));
-int fsync __P_((int));
-int ftruncate __P_((int, off_t));
-int getdomainname __P_((char *, int));
-int getdtablesize __P_((void));
-long gethostid __P_((void));
-int gethostname __P_((char *, int));
-mode_t getmode __P_((const void *, mode_t));
-int getpagesize __P_((void));
-char *getpass __P_((const char *));
-char *getusershell __P_((void));
-char *getwd __P_((char *)); /* obsoleted by getcwd() */
-int initgroups __P_((const char *, int));
-int mknod __P_((const char *, mode_t, dev_t));
-int mkstemp __P_((char *));
-char *mktemp __P_((char *));
-int nfssvc __P_((int));
-int nice __P_((int));
-void psignal __P_((u_int, const char *));
-extern const char *const sys_siglist[];
-int profil __P_((char *, int, int, int));
-int rcmd __P_((char **, int, const char *,
- const char *, const char *, int *));
-char *re_comp __P_((const char *));
-int re_exec __P_((const char *));
-int readlink __P_((const char *, char *, int));
-int reboot __P_((int));
-int revoke __P_((const char *));
-int rresvport __P_((int *));
-int ruserok __P_((const char *, int, const char *, const char *));
-char *sbrk __P_((int));
-int select __P_((int, fd_set *, fd_set *, fd_set *, struct timeval *));
-int setdomainname __P_((const char *, int));
-int setegid __P_((gid_t));
-int seteuid __P_((uid_t));
-int setgroups __P_((int, const int *));
-void sethostid __P_((long));
-int sethostname __P_((const char *, int));
-int setkey __P_((const char *));
-int setlogin __P_((const char *));
-void *setmode __P_((const char *));
-int setpgrp __P_((pid_t pid, pid_t pgrp)); /* obsoleted by setpgid() */
-int setregid __P_((int, int));
-int setreuid __P_((int, int));
-int setrgid __P_((gid_t));
-int setruid __P_((uid_t));
-void setusershell __P_((void));
-int swapon __P_((const char *));
-int symlink __P_((const char *, const char *));
-void sync __P_((void));
-int syscall __P_((int, ...));
-int truncate __P_((const char *, off_t));
-int ttyslot __P_((void));
-u_int ualarm __P_((u_int, u_int));
-void usleep __P_((u_int));
-void *valloc __P_((size_t)); /* obsoleted by malloc() */
-pid_t vfork __P_((void));
-
-int getopt __P_((int, char * const *, const char *));
-extern char *optarg; /* getopt(3) external variables */
-extern int opterr;
-extern int optind;
-extern int optopt;
-int getsubopt __P_((char **, char * const *, char **));
-extern char *suboptarg; /* getsubopt(3) external variable */
-#endif /* !_POSIX_SOURCE */
-__END_DECLS
-
-#endif /* !_UNISTD_H_ */