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