Re: [PATCH] OsdSynch.c modernization

From: Maxime Henrion <mux_at_FreeBSD.org>
Date: Wed, 19 Sep 2007 17:03:49 +0200
Jung-uk Kim wrote:
> I have rewritten sys/dev/acpica/Osd/OsdSynch.c to match the modern 
> ACPI-CA and -CURRENT:
> 
> http://people.freebsd.org/~jkim/acpica/OsdSynch.diff
> 
> Major changes are:
> 
> 1. Semaphore is reimplemented with convar(9) instead of mutex(9).
> 
> 2. Semaphore with ACPI_WAIT_FOREVER option actually waits forever now.
> 
> 3. Obsolete and/or hidden debugging knobs and macros are removed.
> 
> 4. ACPI-CA introduced AcpiOs*Mutex() to complement AcpiOs*Semaphore():
> 
> 	http://bugzilla.kernel.org/show_bug.cgi?id=6634
> 
>    These functions are implemented and turned on by default.
> 
> 5. Spinlock is reimplemented with sx lock and more closely implements 
> the intended behaviour (e.g., save/restore interrupts).
> 
> It is orthogonal to Nate's effort of rewriting acpi_ec.c but I'd like 
> get more feedback *with* his last patch (revision D) because his 
> patch will be committed sooner or later. ;-)
> 
> Please test/review and let us know if there is any regression or not.
> 
> Thanks!

Out of curiosity, is there any reason you didn't use the sema(9) API for
semaphores and are instead implementing them in terms of mutex/condvar?

Cheers,
Maxime
Received on Wed Sep 19 2007 - 14:03:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:17 UTC