From owner-acpi-jp@jp.freebsd.org  Thu Dec  6 01:55:21 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id BAA61182;
	Thu, 6 Dec 2001 01:55:21 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id BAA61174;
	Thu, 6 Dec 2001 01:55:15 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (root@localhost [127.0.0.1])
	(authenticated as iwa with CRAM-MD5)
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id fB5GtBP58278;
	Thu, 6 Dec 2001 01:55:12 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Thu, 06 Dec 2001 01:55:01 +0900 (JST)
Message-Id: <20011206.015501.09576201.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.freebsd.org, robert.moore@intel.com
Cc: andrew.grover@intel.com, iwasaki@jp.FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
In-Reply-To: <B9ECACBD6885D5119ADC00508B68C1EA2FE083@orsmsx107.jf.intel.com>
References: <B9ECACBD6885D5119ADC00508B68C1EA2FE083@orsmsx107.jf.intel.com>
X-Mailer: Mew version 2.0 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1519
Subject: [acpi-jp 1519] Re: problem in AcpiExSystemWaitSemaphore()
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi,

> I agree that the actual exception from AcpiOsWaitSemaphore is lost.
> However, I don't want to lose the failure exception from EnterInterpreter,
> either.  So, I think that I would use two exception codes:
> 
>     Status = AcpiOsWaitSemaphore (Semaphore, 1, 0);
>     if (ACPI_SUCCESS (Status))
>     {
>         return_ACPI_STATUS (Status);
>     }
> 
>     if (Status == AE_TIME)
>     {
>         /* We must wait, so unlock the interpreter */
> 
>         AcpiExExitInterpreter ();
> 
>         Status = AcpiOsWaitSemaphore (Semaphore, 1, Timeout);
> 
>         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*** Thread awake after blocking,
> %s\n",
>             AcpiFormatException (Status)));
> 
>         /* Reacquire the interpreter */
> 
>         Status2 = AcpiExEnterInterpreter ();
>         if (ACPI_FAILURE (Status2))
>         {
>             /* Report fatal error, could not acquire interpreter */
> 
>             return_ACPI_STATUS (Status2);
>         }
>     }
>     return_ACPI_STATUS (Status);

Yes!  I also think this is the best solution :-)

Thanks
