1 | /** @file
|
---|
2 | Token Generator
|
---|
3 |
|
---|
4 | Copyright (c) 2021, Arm Limited. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | @par Glossary:
|
---|
9 | - Cm or CM - Configuration Manager
|
---|
10 | - Obj or OBJ - Object
|
---|
11 | **/
|
---|
12 |
|
---|
13 | #include <Protocol/ConfigurationManagerProtocol.h>
|
---|
14 |
|
---|
15 | /** Generate a token.
|
---|
16 |
|
---|
17 | @return A token.
|
---|
18 | **/
|
---|
19 | CM_OBJECT_TOKEN
|
---|
20 | EFIAPI
|
---|
21 | GenerateToken (
|
---|
22 | VOID
|
---|
23 | )
|
---|
24 | {
|
---|
25 | // Start Tokens at 1 to avoid collisions with CM_NULL_TOKEN.
|
---|
26 | STATIC UINTN CurrentToken = 1;
|
---|
27 |
|
---|
28 | return (CM_OBJECT_TOKEN)(CurrentToken++);
|
---|
29 | }
|
---|