From owner-freebsd-acpi@FreeBSD.ORG Tue Sep 25 19:38:38 2007 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CAE416A418; Tue, 25 Sep 2007 19:38:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id B3DD413C455; Tue, 25 Sep 2007 19:38:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l8PJcZOr089877; Tue, 25 Sep 2007 15:38:35 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org Date: Tue, 25 Sep 2007 15:38:31 -0400 User-Agent: KMail/1.6.2 References: <200709181516.11207.jkim@FreeBSD.org> <200709241259.01518.jkim@FreeBSD.org> <46F7EDD6.4010508@root.org> In-Reply-To: <46F7EDD6.4010508@root.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200709251538.33353.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.90.2/4396/Tue Sep 25 14:48:03 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-acpi@FreeBSD.org, John Baldwin Subject: Re: [PATCH] OsdSynch.c modernization X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 19:38:38 -0000 On Monday 24 September 2007 01:03 pm, Nate Lawson wrote: > Jung-uk Kim wrote: > > (At least on my laptop) I found the malloc() was called from our > > code, i.e., AcpiOsExecute() from OsdSched.c. I'll try something > > shortly cause I was going to rewrite the file anyway. > > Yep, that's because we need a task structure that's different for > each call and acpi-ca doesn't like the "pending" argument (see > OsdSchedule.c). One fix for this is to just use a hack and cast > the fn to discard the extra arg. Not sure this would work. I quickly tested it but didn't work. :-( Actually it is not just pending argument but struct task itself has to be allocated. I did crude hack to see if it is possible to have it working with spin mutex gracefully. It can be done if we pre-allocate some space for the tasks and use fast taskqueue. Does it make sense to you? Thanks, Jung-uk Kim