diff options
author | Russ Cox <rsc@swtch.com> | 2020-01-19 20:57:09 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-01-19 21:26:30 -0500 |
commit | 52397aaf2b240015533fa46f1767c20f45296465 (patch) | |
tree | 1161cae9ad0b09a50b5d69861b72611ece159fca /src/libthread/Darwin-386.c | |
parent | 8dcb18f71b1917713d4743ab10968c527acdc62e (diff) | |
download | plan9port-52397aaf2b240015533fa46f1767c20f45296465.tar.gz plan9port-52397aaf2b240015533fa46f1767c20f45296465.tar.bz2 plan9port-52397aaf2b240015533fa46f1767c20f45296465.zip |
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.
Diffstat (limited to 'src/libthread/Darwin-386.c')
-rw-r--r-- | src/libthread/Darwin-386.c | 30 |
1 files changed, 0 insertions, 30 deletions
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; -} |