]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/MultiThread.h
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / ProcessDsc / MultiThread.h
CommitLineData
3e99020d
LG
1/*++\r
2\r
3Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
4This 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 MultiThread.h\r
15 \r
16Abstract:\r
17\r
18 Defines and function prototypes for the ProcessDsc utility.\r
19 \r
20--*/\r
21\r
22#ifndef _MULTI_THREAD_H_\r
23#define _MULTI_THREAD_H_\r
24\r
25typedef struct _COMPONENTS_ITEM COMPONENTS_ITEM;\r
26typedef struct _BUILD_ITEM BUILD_ITEM;\r
27typedef struct _SOURCE_FILE_ITEM SOURCE_FILE_ITEM;\r
28typedef struct _DEPENDENCY_ITEM DEPENDENCY_ITEM;\r
29\r
30//\r
31// Use this structure to keep track of module build items\r
32//\r
33typedef struct _BUILD_ITEM {\r
34 BUILD_ITEM *Next;\r
35 INT8 *BaseName;\r
36 INT8 *Processor;\r
37 INT8 *Makefile;\r
38 UINT32 Index;\r
39 UINT32 CompleteFlag;\r
40 SOURCE_FILE_ITEM *SourceFileList;\r
41 DEPENDENCY_ITEM *DependencyList;\r
42} BUILD_ITEM;\r
43\r
44//\r
45// Use this structure to keep track of module source files\r
46//\r
47typedef struct _SOURCE_FILE_ITEM {\r
48 SOURCE_FILE_ITEM *Next;\r
49 INT8 *FileName;\r
50} SOURCE_FILE_ITEM;\r
51\r
52//\r
53// Use this structure to keep track of module build dependencies\r
54//\r
55typedef struct _DEPENDENCY_ITEM {\r
56 DEPENDENCY_ITEM *Next;\r
57 BUILD_ITEM *Dependency;\r
58} DEPENDENCY_ITEM;\r
59\r
60//\r
61// Use this structure to keep track of [components] and [components.n] sections\r
62//\r
63typedef struct _COMPONENTS_ITEM {\r
64 COMPONENTS_ITEM *Next;\r
65 BUILD_ITEM *BuildList;\r
66} COMPONENTS_ITEM;\r
67\r
68//\r
69// Function prototypes\r
70//\r
71BUILD_ITEM *\r
72AddBuildItem (\r
73 BUILD_ITEM **BuildList,\r
74 INT8 *BaseName,\r
75 INT8 *Processor,\r
76 INT8 *Makefile\r
77 );\r
78\r
79\r
80SOURCE_FILE_ITEM *\r
81AddSourceFile (\r
82 BUILD_ITEM *BuildItem, \r
83 INT8 *FileName\r
84 );\r
85\r
86DEPENDENCY_ITEM *\r
87AddDependency (\r
88 BUILD_ITEM *BuildList, \r
89 BUILD_ITEM *BuildItem, \r
90 INT8 *BaseName,\r
91 INT8 AdjustIndex\r
92 );\r
93\r
94void\r
95FreeBuildList (\r
96 BUILD_ITEM *BuildList\r
97 );\r
98\r
99COMPONENTS_ITEM *\r
100AddComponentsItem (\r
101 COMPONENTS_ITEM **ComponentsList\r
102 );\r
103\r
104void\r
105FreeComponentsList (\r
106 COMPONENTS_ITEM *ComponentsList\r
107 );\r
108 \r
109INT8\r
110StartMultiThreadBuild (\r
111 BUILD_ITEM **BuildList,\r
112 UINT32 ThreadNumber,\r
113 INT8 *BuildDir\r
114 );\r
115\r
116#endif // ifndef _MULTI_THREAD_H_\r