From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in6.apple.com (mail-out6.apple.com [17.151.62.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9BAB621A143C1 for ; Tue, 27 Jun 2017 07:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1498572426; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LufTFfiG/hTSfzi9LYddbH6kLKxecQqKId4rG4+JWhQ=; b=pqTtYEahASjS/dH8kq6CtakB7B8JUk+xyztthESzBhYjxyr5tmo/QptnXWtX6K5J 9dt4F/7NaChmJrUgjJEtkyT9nUJIAgb8OdCJqjmr1nvrVI+VJD9z/GNL+BXzZIaJ zBs5sSDWXvBVZCOARwY7D++UARV/sON2ho8EQja+pDZwFdgkP8z4SCeZ+VrJJhpi 1wgh1sj7ae2i2LxjC1aNXKQENvRIA49rCJzazC1XqBh7YoGD3djVpjCZ0+kdKqth co/ySBISZXtcmzsDXbpIB2MAVPXkFZ+iwn0X3CzWiO2o9/FyZpCVrddPshtyiMqi 9Z0rFwG6SmuhUtti66SqLQ==; Received: from relay6.apple.com (relay6.apple.com [17.128.113.90]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in6.apple.com (Apple Secure Mail Relay) with SMTP id 00.6A.24649.98662595; Tue, 27 Jun 2017 07:07:06 -0700 (PDT) X-AuditID: 11973e15-a3fff70000006049-39-59526689f67a Received: from nwk-mmpp-sz11.apple.com (nwk-mmpp-sz11.apple.com [17.128.115.155]) by relay6.apple.com (Apple SCV relay) with SMTP id 63.C4.05199.98662595; Tue, 27 Jun 2017 07:07:05 -0700 (PDT) MIME-version: 1.0 Received: from [17.234.14.184] by nwk-mmpp-sz11.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170210 64bit (built Feb 10 2017)) with ESMTPSA id <0OS700LI0LVSRT50@nwk-mmpp-sz11.apple.com>; Tue, 27 Jun 2017 07:07:05 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Tue, 27 Jun 2017 07:07:04 -0700 Cc: edk2-devel@lists.01.org Message-id: References: To: TVKR X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsUi2FAYpduVFhRp0LpD22LPoaPMFo3vj7A6 MHnsnHWX3aN79j+WAKYoLpuU1JzMstQifbsEroyZux6xFBzlqJh4/AhTA+Nnti5GTg4JAROJ idunMXYxcnEICaxmkrj+7gczTOLOgTdgtpDAIUaJ3Tf4QGxeAUGJH5PvsXQxcnAwC8hLHDwv CxJmFtCS+P6olQVizldGif0b+5hAEsIC4hLvzmxihrAdJB6s3scCYrMJKEusmP+BHcTmFAiW 6J1/AayeRUBVYvflsywQQ6UlHk48zgqx10bizcTZTBD3BEjs2PYSzBYRkJHY2D0N6mZZiVuz LzGDHCEhsIRN4s7+ucwTGIVnIbl7FsLds5DcvYCReRWjUG5iZo5uZp6ZXmJBQU6qXnJ+7iZG UGBPtxPdwXhmldUhRgEORiUe3gthQZFCrIllxZW5hxilOViUxHkL5gRGCgmkJ5akZqemFqQW xReV5qQWH2Jk4uCUamB8bnTad+3UpT/f/V27KN5xm2e0qatN0bNFcQ5fkhTXvldvKjl+yP7w ufk3jzxoPRNc7ey9UTPfOnPO4pAUT0vWMwdrv/jtCswIDOUNMJ7L9O5W4PJrC5j/lMWbfUmI udG6Z6tladeDspcSRqH5eSzfS75azvfvlQn1mdt6YsVr2+n/3js92HZfiaU4I9FQi7moOBEA fnzHrU0CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42IRbCierduZFhRp0HPd3GLPoaPMFo3vj7A6 MHnsnHWX3aN79j+WAKYoLpuU1JzMstQifbsEroyZux6xFBzlqJh4/AhTA+Nnti5GTg4JAROJ OwfeMIPYQgKHGCV23+ADsXkFBCV+TL7H0sXIwcEsIC9x8LwsSJhZQEvi+6NWoDAXUPlXRon9 G/uYQBLCAuIS785sYoawHSQerN7HAmKzCShLrJj/gR3E5hQIluidfwGsnkVAVWL35bMsEEOl JR5OPM4KsddG4s3E2UwQ9wRI7Nj2EswWEZCR2Ng9jRniZlmJW7MvMU9gFJiF5NRZCKfOQnLq AkbmVYwCRak5iZVmeokFBTmpesn5uZsYwYFYGLWDsWG51SFGAQ5GJR5ejcigSCHWxLLiylxg UHAwK4nwXkgBCvGmJFZWpRblxxeV5qQWH2KsArp/IrOUaHI+MErySuINTUwMTIyNzYyNzU3M qSKsJM47oTswUkggPbEkNTs1tSC1CGY5EwenVAOj107R3EkaDh7Pv8lZb/68e1s/R7rLjT8x G4S/+m628yjgvX3G+7rdHU92DuGjB61a3kzZ2Wp2ou3tm3ity/4OS+Yc6+cw0be7JrXnkoBZ 374itlfzD51z0StS6DrdUbF68STfRfI3umXCv3OcMJJs/PYz75nM2hKeTy/2T9rgtV7/umzj 8hwNJZbijERDLeai4kQA/5IeT58CAAA= Subject: Re: DXE core - Connecting a controller to driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 14:05:36 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Jun 26, 2017, at 9:30 AM, TVKR wrote: > > Hi experts, > > I have a question related to the ConnectController implementation in the > edk2 codebase (MdeModulePkg\Core\Dxe\Hand\DriverSupport.c). Under the > CoreConnectSingleController function, what if DriverBinding->Supported > returns an error? I see that there is a do/while loop waiting for > DriverFound to be set to TRUE, but it looks like this wont happen if > DriverBinding->Supported returns an error (looping for ever). Am I reading > this wrong? > How do you think a do while loop works in C? DriverFound = FALSE; do { ; } while (DriverFound); Is not an infinite loop? It just runs one time. The code is looping as long as Start() is called as calling Start() could cause other drivers Supported() to start returning TRUE, so you have to recheck the set after calling Start(). Thanks, Andrew Fish > Thanks > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel