aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/inc/queutil.h
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-10-19 15:44:40 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-10-25 15:13:06 -0500
commit98080672cdbbde00ea40a96c1ce38e8a52f24fee (patch)
tree9c0b859f147d55d5c4caadccfd764ca84ed7e648 /src/libs/dutil/WixToolset.DUtil/inc/queutil.h
parent28e9c7c14d2a156b55476f6b8e39e13f17aa87b6 (diff)
downloadwix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.tar.gz
wix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.tar.bz2
wix-98080672cdbbde00ea40a96c1ce38e8a52f24fee.zip
Add queutil so Burn can manage its own queue of BA requested actions.
Fixes 6349
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/queutil.h')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/queutil.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/queutil.h b/src/libs/dutil/WixToolset.DUtil/inc/queutil.h
new file mode 100644
index 00000000..3b88825e
--- /dev/null
+++ b/src/libs/dutil/WixToolset.DUtil/inc/queutil.h
@@ -0,0 +1,52 @@
1#pragma once
2// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#define ReleaseQueue(qh, pfn, pv) if (qh) { QueDestroy(qh, pfn, pv); }
10#define ReleaseNullQue(qh, pfv, pv) if (qh) { QueDestroy(qh, pfn, pv); qh = NULL; }
11
12typedef void* QUEUTIL_QUEUE_HANDLE;
13
14typedef void(CALLBACK* PFNQUEUTIL_QUEUE_RELEASE_VALUE)(
15 __in void* pvValue,
16 __in void* pvContext
17 );
18
19extern const int QUEUTIL_QUEUE_HANDLE_BYTES;
20
21/********************************************************************
22QueCreate - Creates a simple queue. It is not thread safe.
23
24********************************************************************/
25HRESULT DAPI QueCreate(
26 __out_bcount(QUEUTIL_QUEUE_HANDLE_BYTES) QUEUTIL_QUEUE_HANDLE* phQueue
27 );
28
29HRESULT DAPI QueEnqueue(
30 __in_bcount(QUEUTIL_QUEUE_HANDLE_BYTES) QUEUTIL_QUEUE_HANDLE hQueue,
31 __in void* pvValue
32 );
33
34/********************************************************************
35QueDequeue - Returns the value from the beginning of the queue,
36 or E_NOMOREITEMS if the queue is empty.
37
38********************************************************************/
39HRESULT DAPI QueDequeue(
40 __in_bcount(QUEUTIL_QUEUE_HANDLE_BYTES) QUEUTIL_QUEUE_HANDLE hQueue,
41 __out void** ppvValue
42 );
43
44void DAPI QueDestroy(
45 __in_bcount(QUEUTIL_QUEUE_HANDLE_BYTES) QUEUTIL_QUEUE_HANDLE hQueue,
46 __in_opt PFNQUEUTIL_QUEUE_RELEASE_VALUE pfnReleaseValue,
47 __in_opt void* pvContext
48 );
49
50#ifdef __cplusplus
51}
52#endif