]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/DpcLib.h
Sync in bug fix from EDK I:
[mirror_edk2.git] / MdeModulePkg / Include / Library / DpcLib.h
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 DpcLib.h
15
16 Abstract:
17
18 Library for Deferred Procedure Calls.
19
20 **/
21
22 #ifndef _DPC_LIB_H_
23 #define _DPC_LIB_H_
24
25 #include <Protocol/Dpc.h>
26
27 /**
28 Add a Deferred Procedure Call to the end of the DPC queue.
29
30 @param DpcTpl The EFI_TPL that the DPC should be invoked.
31 @param DpcProcedure Pointer to the DPC's function.
32 @param DpcContext Pointer to the DPC's context. Passed to DpcProcedure
33 when DpcProcedure is invoked.
34
35 @retval EFI_SUCCESS The DPC was queued.
36 @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL.
37 @retval EFI_INVALID_PARAMETER DpcProcedure is NULL.
38 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to
39 add the DPC to the queue.
40
41 **/
42 EFI_STATUS
43 EFIAPI
44 QueueDpc (
45 IN EFI_TPL DpcTpl,
46 IN EFI_DPC_PROCEDURE DpcProcedure,
47 IN VOID *DpcContext OPTIONAL
48 );
49
50 /**
51 Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl
52 value greater than or equal to the current TPL are invoked in the order that
53 they were queued. DPCs with higher DpcTpl values are invoked before DPCs with
54 lower DpcTpl values.
55
56 @retval EFI_SUCCESS One or more DPCs were invoked.
57 @retval EFI_NOT_FOUND No DPCs were invoked.
58
59 **/
60 EFI_STATUS
61 EFIAPI
62 DispatchDpc (
63 VOID
64 );
65
66 #endif