From owner-cvs-all Mon Feb 10 2:55: 4 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F02737B401; Mon, 10 Feb 2003 02:55:00 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93EA743F93; Mon, 10 Feb 2003 02:54:59 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 2F2DAAE160; Mon, 10 Feb 2003 02:54:59 -0800 (PST) Date: Mon, 10 Feb 2003 02:54:59 -0800 From: Alfred Perlstein To: Alexey Zelkin Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, legacy-committers@FreeBSD.org Subject: Re: cvs commit: src/include pthread.h src/lib/libc_r/uthread uthread_attr_getstack.c uthread_attr_setstack.c src/lib/libpthread/thread thr_attr_getstack.c thr_attr_setstack.c src/lib/libc_r/man pthread_attr.3 Message-ID: <20030210105459.GU88781@elvis.mu.org> References: <200302100848.h1A8m4Fj054987@repoman.freebsd.org> <20030210120147.A25796@phantom.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030210120147.A25796@phantom.cris.net> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Mon, Feb 10, 2003 at 12:48:04AM -0800, Alfred Perlstein wrote: > > Log: > > Add pthread_attr_getstack() and pthread_attr_setstack(). * Alexey Zelkin [030210 01:55] wrote: > hi, > > Who reviewed this change ? Did you told to Dan before doing it ? I thought it was fine, I've done work on the pthreads library before. > And last, that purpose of this functionality ? (I have seen a diff, > but it's interesting how these functions are supposed to be used?) This is to bring us a function that is required by: http://www.opengroup.org/onlinepubs/007904975/functions/pthread_attr_getstack.html > PS: We have pthread_attr_get_np() which provide functionality similar > to pthread_attr_getstack() in cleaner and correct way. Having of > pthread_attr_setstack() is absolutely crazy idea (IMHO) because using it > after pthread_create() may (or will) crash application. Well yes, but this is needed for standards compliance. Afaik when one passes in an attribute it is deep copied within the pthread_create call hence this can only be effective before the call to pthread_create. Also we have uthread_attr_setstackaddr.c and uthread_attr_setstacksize.c which setstack is simply a combination of them specified by the standard. -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message