diff options
author | Robert Moore <Robert.Moore@intel.com> | 2012-04-20 09:00:41 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2012-04-20 09:00:41 -0700 |
commit | 7adabc54792b979ef1977686511c595504a97e0c (patch) | |
tree | 2a863c83550274b1bc319d0bccf6fcc30db9887a /source/components/utilities/utdelete.c | |
parent | 85e2b6f0159715d876c896de532ac78625d7136c (diff) | |
download | acpica-7adabc54792b979ef1977686511c595504a97e0c.tar.gz |
Add support for multiple notify handlers.
This change adds support to allow multiple notify handlers on
Device, ThermalZone, and Processor objects. Also re-worked and
restructured the entire notify support code for handler installation,
handler removal, notify event queuing, and notify dispatch to handler.
Lin Ming, Bob Moore, Rafael Wysocki.
Diffstat (limited to 'source/components/utilities/utdelete.c')
-rw-r--r-- | source/components/utilities/utdelete.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index 3130e6d6c..b64a58528 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -239,7 +239,7 @@ AcpiUtDeleteInternalObj ( case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_THERMAL: - /* Walk the notify handler list for this object */ + /* Walk the address handler list for this object */ HandlerDesc = Object->CommonNotify.Handler; while (HandlerDesc) @@ -595,6 +595,7 @@ AcpiUtUpdateObjectReference ( ACPI_STATUS Status = AE_OK; ACPI_GENERIC_STATE *StateList = NULL; ACPI_OPERAND_OBJECT *NextObject = NULL; + ACPI_OPERAND_OBJECT *PrevObject; ACPI_GENERIC_STATE *State; UINT32 i; @@ -624,10 +625,20 @@ AcpiUtUpdateObjectReference ( case ACPI_TYPE_POWER: case ACPI_TYPE_THERMAL: - /* Update the notify objects for these types (if present) */ - - AcpiUtUpdateRefCount (Object->CommonNotify.SystemNotify, Action); - AcpiUtUpdateRefCount (Object->CommonNotify.DeviceNotify, Action); + /* + * Update the notify objects for these types (if present) + * Two lists, system and device notify handlers. + */ + for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++) + { + PrevObject = Object->CommonNotify.NotifyList[i]; + while (PrevObject) + { + NextObject = PrevObject->Notify.Next[i]; + AcpiUtUpdateRefCount (PrevObject, Action); + PrevObject = NextObject; + } + } break; case ACPI_TYPE_PACKAGE: |