From 52397aaf2b240015533fa46f1767c20f45296465 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 19 Jan 2020 20:57:09 -0500 Subject: libthread: rm Darwin pre-11.0.0 support Darwin 11.0.0 was Mac OS X 10.7.0 aka Lion. The previous version was Snow Leopard, which has been unsupported by Apple since February 2014. --- src/libthread/Darwin-386.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/libthread/Darwin-386.c (limited to 'src/libthread/Darwin-386.c') diff --git a/src/libthread/Darwin-386.c b/src/libthread/Darwin-386.c deleted file mode 100644 index b138e420..00000000 --- a/src/libthread/Darwin-386.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "threadimpl.h" - -void -makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...) -{ - int *sp; - - sp = (int*)ucp->uc_stack.ss_sp+ucp->uc_stack.ss_size/4; - sp -= argc; - /* - * Stack pointer at call instruction (before return address - * gets pushed) must be 16-byte aligned. - */ - if((uintptr)sp%4) - abort(); - while((uintptr)sp%16) - sp--; - memmove(sp, &argc+1, argc*sizeof(int)); - *--sp = 0; /* return address */ - ucp->uc_mcontext.mc_eip = (long)func; - ucp->uc_mcontext.mc_esp = (int)sp; -} - -int -swapcontext(ucontext_t *oucp, ucontext_t *ucp) -{ - if(getcontext(oucp) == 0) - setcontext(ucp); - return 0; -} -- cgit v1.2.3