1 write to nodeData
Microsoft.Build.Engine (1)
LocalProvider\LocalNodeProvider.cs (1)
87nodeData = new LocalNodeInfo[cpuCount - 1];
107 references to nodeData
Microsoft.Build.Engine (107)
LocalProvider\LocalNodeProvider.cs (107)
91for (int i = 0; i < nodeData.Length; i++) 93nodeData[i] = new LocalNodeInfo(lastUsedNodeNumber); 94lastUsedNodeNumber = nodeData[i].NodeNumber + 1; 183ErrorUtilities.VerifyThrow(nodeIds.Length == nodeData.Length, "Expected an ID for each node"); 187nodeData[i].NodeId = nodeIds[i]; 205ErrorUtilities.VerifyThrow(nodeIndex < nodeData.Length && nodeIndex >= 0, "Node index must be within array boundaries"); 209if (nodeData[nodeIndex].NodeState != NodeState.Launched) 211NodeStatus nodeStatus = new NodeStatus(requestId, false, 0, 0, 0, nodeData[nodeIndex].NodeState == NodeState.LaunchInProgress); 212engineCallback.PostStatus(nodeData[nodeIndex].NodeId, nodeStatus, false); 217engineCallback.PostStatus(nodeData[nodeIndex].NodeId, nodeStatus, false); 224nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 230ErrorUtilities.VerifyThrow(nodeIndex < nodeData.Length && nodeIndex >= 0, "Node index must be within array boundaries"); 232if (nodeData[nodeIndex].NodeState != NodeState.Launched) 240if (nodeData[nodeIndex].NodeState != NodeState.Launched && !shuttingDown) 243if (nodeData[nodeIndex].NodeState == NodeState.NotLaunched) 245nodeData[nodeIndex].NodeState = NodeState.LaunchInProgress; 255nodeData[nodeIndex].TargetList.AddFirst(new LinkedListNode<BuildRequest>(buildRequest)); 261nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 269nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 275ErrorUtilities.VerifyThrow(nodeIndex < nodeData.Length && nodeIndex >= 0, "Node index must be within array boundaries"); 276ErrorUtilities.VerifyThrow(nodeData[nodeIndex].NodeState == NodeState.Launched, "Node must be launched before result can be posted"); 280nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 315foreach (LocalNodeInfo nodeInfo in nodeData) 328foreach (LocalNodeInfo nodeInfo in nodeData) 348for (int i = 0; i < nodeData.Length; i++) 350LocalNodeInfo nodeInfo = nodeData[i]; 376for (int i = 0; i < nodeData.Length; i++) 378if (nodeData[i].NodeState == NodeState.Launched) 390nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 398nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 410for (int i = 0; i < nodeData.Length; i++) 414while (nodeData[i].NodeState == NodeState.LaunchInProgress && !nodeData[i].CommunicationFailed) 419if (nodeData[i].NodeState == NodeState.Launched) 421if (!nodeData[i].CommunicationFailed) 432nodeData[i].NodeCommandQueue.Enqueue(callDescriptor); 436TerminateChildNode(nodeData[i].ProcessId); 442nodeData[i].NodeState = NodeState.NotLaunched; 477if (nodeData[nodeId].CommunicationFailed) 484bool isUninitialized = nodeData[nodeId].ProcessId == LocalNodeInfo.unInitializedProcessId; 491bool isInvalidProcessId = nodeData[nodeId].ProcessId == LocalNodeInfo.invalidProcessId; 493if (!isInvalidProcessId && !Process.GetProcessById(nodeData[nodeId].ProcessId).HasExited) 504nodeData[nodeId].ProcessId = LocalNodeInfo.invalidProcessId; 505nodeData[nodeId].CommunicationFailed = true; 513for (; i < nodeData.Length; i++) 515if (nodeData[i].NodeId == nodeId) 517nodeData[i].ReleaseNode(); 522ErrorUtilities.VerifyThrow(i < nodeData.Length, "Expected to find a node to decrement count"); 548for (; i < nodeData.Length; i++) 550if (nodeData[i].NodeId == nodeId) 552nodeData[i].ShutdownResponseReceived = true; 558ErrorUtilities.VerifyThrow(i < nodeData.Length, "Expected to find a node to decrement count"); 566for (int i = 0; i < nodeData.Length; i++) 568if (nodeData[i].NodeId == nodeId) 570nodeData[i].ProcessId = processId; 592nodeData[nodeIndex].NodeState = NodeState.NotLaunched; 601if (!nodeData[nodeIndex].CommunicationFailed) 606nodeData[nodeIndex].NodeState = NodeState.Launched; 611LinkedListNode<BuildRequest> current = nodeData[nodeIndex].TargetList.First; 612BuildRequest[] buildRequests = new BuildRequest[nodeData[nodeIndex].TargetList.Count]; 623nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor); 625nodeData[nodeIndex].TargetList = null; 656if (!checkIfNodeActive(nodeData[nodeIndex].NodeNumber)) 661if (nodeData[nodeIndex].CommunicationFailed) 667if (checkIfNodeActive(nodeData[nodeIndex].NodeNumber)) 669nodeData[nodeIndex].SharedMemoryToNode.Reset(); 670nodeData[nodeIndex].SharedMemoryFromNode.Reset(); 674EventWaitHandle nodeInitiateActivationEvent = new EventWaitHandle(false, EventResetMode.ManualReset, LocalNodeProviderGlobalNames.NodeInitiateActivationEventName(nodeData[nodeIndex].NodeNumber)); 679EventWaitHandle nodeActivatedEvent = new EventWaitHandle(false, EventResetMode.ManualReset, LocalNodeProviderGlobalNames.NodeActivedEventName(nodeData[nodeIndex].NodeNumber)); 688new LocalCallDescriptorForInitializeNode(environmentVariablesTable, nodeLoggers.ToArray(), nodeData[nodeIndex].NodeId, parentGlobalProperties, toolsetSearchLocations, Process.GetCurrentProcess().Id, startupDirectory); 689nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptorInit); 691EventWaitHandle nodeInUseEvent = new EventWaitHandle(false, EventResetMode.ManualReset, LocalNodeProviderGlobalNames.NodeInUseEventName(nodeData[nodeIndex].NodeNumber)); 705if (!nodeConnected && checkIfNodeActive(nodeData[nodeIndex].NodeNumber)) 707EventWaitHandle nodeShutdownEvent = new EventWaitHandle(false, EventResetMode.ManualReset, LocalNodeProviderGlobalNames.NodeErrorShutdownEventName(nodeData[nodeIndex].NodeNumber)); 723DecreaseActiveNodeCount(nodeData[nodeIndex].NodeId); 724nodeData[nodeIndex].CommunicationFailed = true; 790string cmdLine = msbuildLocation + " /nologo /oldom /nodemode:" + nodeData[nodeIndex].NodeNumber; 796nodeReadyEvent = new EventWaitHandle(false, EventResetMode.ManualReset, LocalNodeProviderGlobalNames.NodeActiveEventName(nodeData[nodeIndex].NodeNumber)); 811nodeData[nodeIndex].CommunicationFailed = true; 827if (nodeIndex >= 0 && nodeIndex < nodeData.Length) 829if (decreaseActiveNodeCount && !nodeData[nodeIndex].CommunicationFailed) 831DecreaseActiveNodeCount(nodeData[nodeIndex].NodeId); 834nodeData[nodeIndex].CommunicationFailed = true; 841if (nodeIndex < 0 || nodeIndex >= nodeData.Length) 848engineCallback.PostStatus(nodeData[nodeIndex].NodeId, nodeStatus, false); 858WaitHandle[] waitHandles = new WaitHandle[1 + nodeData.Length]; 860for (int i = 0; i < nodeData.Length; i++) 862waitHandles[i + 1] = nodeData[i].NodeCommandQueue.QueueReadyEvent; 883nodeData[nodeIndex].SharedMemoryToNode.Write(nodeData[nodeIndex].NodeCommandQueue, nodeData[nodeIndex].NodeHiPriCommandQueue, false); 889if (nodeIndex >= 0 && nodeIndex < nodeData.Length) 897for (int i = 0; i < nodeData.Length; i++) 900if (nodeData[i].SharedMemoryToNode != null) 902nodeData[i].SharedMemoryToNode.Dispose(); 903nodeData[i].SharedMemoryToNode = null; 915WaitHandle[] waitHandles = new WaitHandle[1 + nodeData.Length]; 917for (int i = 0; i < nodeData.Length; i++) 919waitHandles[i + 1] = nodeData[i].SharedMemoryFromNode.ReadFlag; 940IList localCallDescriptorList = nodeData[nodeIndex].SharedMemoryFromNode.Read(); 947callDescriptor.HostAction(engineCallback, this, nodeData[nodeIndex].NodeId); 951nodeData[nodeIndex].NodeCommandQueue.Enqueue(callDescriptor.ReplyFromHostAction()); 961if (nodeIndex >= 0 && nodeIndex < nodeData.Length) 969for (int i = 0; i < nodeData.Length; i++) 972if (nodeData[i].SharedMemoryFromNode != null) 974nodeData[i].SharedMemoryFromNode.Dispose(); 975nodeData[i].SharedMemoryFromNode = null;