From de2138164cd16145ee5fd4d0aef1e8f952c1a9fb Mon Sep 17 00:00:00 2001 From: ad Date: Fri, 2 Mar 2007 18:53:51 +0000 Subject: Remove the PTHREAD_SA option. If M:N threads is reimplemented it's better off done with a seperate library. --- lib/libpthread/pthread_stack.c | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) (limited to 'lib/libpthread/pthread_stack.c') diff --git a/lib/libpthread/pthread_stack.c b/lib/libpthread/pthread_stack.c index 2846c7d9dd8..fa3c8332284 100644 --- a/lib/libpthread/pthread_stack.c +++ b/lib/libpthread/pthread_stack.c @@ -1,7 +1,7 @@ -/* $NetBSD: pthread_stack.c,v 1.19 2007/01/20 18:58:11 christos Exp $ */ +/* $NetBSD: pthread_stack.c,v 1.20 2007/03/02 18:53:54 ad Exp $ */ /*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. + * Copyright (c) 2001, 2006, 2007 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -37,7 +37,7 @@ */ #include -__RCSID("$NetBSD: pthread_stack.c,v 1.19 2007/01/20 18:58:11 christos Exp $"); +__RCSID("$NetBSD: pthread_stack.c,v 1.20 2007/03/02 18:53:54 ad Exp $"); #define __EXPOSE_STACK 1 #include @@ -207,29 +207,6 @@ pthread__stackid_setup(void *base, size_t size, pthread_t *tp) if (ret == -1) { return errno; } -#ifdef PTHREAD_MLOCK_KLUDGE - ret = mlock(t, sizeof(struct __pthread_st)); - if (ret < 0) { - return errno; - } -#endif *tp = t; return 0; } - - -#ifdef PTHREAD_SA -ssize_t -pthread__stackinfo_offset() -{ - size_t pagesize; - - pagesize = (size_t)sysconf(_SC_PAGESIZE); - -#ifdef __MACHINE_STACK_GROWS_UP - return (-pagesize + offsetof(struct __pthread_st, pt_stackinfo)); -#else - return (-(2 * pagesize) + offsetof(struct __pthread_st, pt_stackinfo)); -#endif -} -#endif -- cgit