1 /*++ 2 3 Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 Module Name: 13 14 MultiThread.h 15 16 Abstract: 17 18 Defines and function prototypes for the ProcessDsc utility. 19 20 --*/ 21 22 #ifndef _MULTI_THREAD_H_ 23 #define _MULTI_THREAD_H_ 24 25 typedef struct _COMPONENTS_ITEM COMPONENTS_ITEM; 26 typedef struct _BUILD_ITEM BUILD_ITEM; 27 typedef struct _SOURCE_FILE_ITEM SOURCE_FILE_ITEM; 28 typedef struct _DEPENDENCY_ITEM DEPENDENCY_ITEM; 29 30 // 31 // Use this structure to keep track of module build items 32 // 33 typedef struct _BUILD_ITEM { 34 BUILD_ITEM *Next; 35 INT8 *BaseName; 36 INT8 *Processor; 37 INT8 *Makefile; 38 UINT32 Index; 39 UINT32 CompleteFlag; 40 SOURCE_FILE_ITEM *SourceFileList; 41 DEPENDENCY_ITEM *DependencyList; 42 } BUILD_ITEM; 43 44 // 45 // Use this structure to keep track of module source files 46 // 47 typedef struct _SOURCE_FILE_ITEM { 48 SOURCE_FILE_ITEM *Next; 49 INT8 *FileName; 50 } SOURCE_FILE_ITEM; 51 52 // 53 // Use this structure to keep track of module build dependencies 54 // 55 typedef struct _DEPENDENCY_ITEM { 56 DEPENDENCY_ITEM *Next; 57 BUILD_ITEM *Dependency; 58 } DEPENDENCY_ITEM; 59 60 // 61 // Use this structure to keep track of [components] and [components.n] sections 62 // 63 typedef struct _COMPONENTS_ITEM { 64 COMPONENTS_ITEM *Next; 65 BUILD_ITEM *BuildList; 66 } COMPONENTS_ITEM; 67 68 // 69 // Function prototypes 70 // 71 BUILD_ITEM * 72 AddBuildItem ( 73 BUILD_ITEM **BuildList, 74 INT8 *BaseName, 75 INT8 *Processor, 76 INT8 *Makefile 77 ); 78 79 80 SOURCE_FILE_ITEM * 81 AddSourceFile ( 82 BUILD_ITEM *BuildItem, 83 INT8 *FileName 84 ); 85 86 DEPENDENCY_ITEM * 87 AddDependency ( 88 BUILD_ITEM *BuildList, 89 BUILD_ITEM *BuildItem, 90 INT8 *BaseName, 91 INT8 AdjustIndex 92 ); 93 94 void 95 FreeBuildList ( 96 BUILD_ITEM *BuildList 97 ); 98 99 COMPONENTS_ITEM * 100 AddComponentsItem ( 101 COMPONENTS_ITEM **ComponentsList 102 ); 103 104 void 105 FreeComponentsList ( 106 COMPONENTS_ITEM *ComponentsList 107 ); 108 109 INT8 110 StartMultiThreadBuild ( 111 BUILD_ITEM **BuildList, 112 UINT32 ThreadNumber, 113 INT8 *BuildDir 114 ); 115 116 #endif // ifndef _MULTI_THREAD_H_ 117