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