From owner-freebsd-threads@FreeBSD.ORG Fri May 30 18:41:41 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5B311065672; Fri, 30 May 2008 18:41:41 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id DFFE78FC1C; Fri, 30 May 2008 18:41:41 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 8612F1A4D81; Fri, 30 May 2008 11:41:41 -0700 (PDT) Date: Fri, 30 May 2008 11:41:41 -0700 From: Alfred Perlstein To: David Xu Message-ID: <20080530184141.GG48790@elvis.mu.org> References: <483FA1C0.2010506@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <483FA1C0.2010506@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: pthread_cleanup_push as a macro X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2008 18:41:41 -0000 * David Xu [080529 23:40] wrote: > I would like to make pthread_cleanup_push and pthread_cleanup_pop as a > pair of macros, the current implementation has to malloc() and free() a > pthread_cleanup memory block everytime, this is slow, the new one > simply uses stack space, note that other OSes have already done it in > this way. The patch keeps old functions and should not have binary > compatible problem. > > http://people.freebsd.org/~davidxu/patch/pthread_cleanup_push.patch Heh, when I had to use QNX on a project this totally confused me, but if others are doing it then go for it. Does Solaris do it? -Alfred