From: TVKR <tresko1@gmail.com>
To: Andrew Fish <afish@apple.com>
Cc: edk2-devel@lists.01.org
Subject: Re: DXE core - Connecting a controller to driver
Date: Tue, 27 Jun 2017 17:44:42 -0500 [thread overview]
Message-ID: <CAD+hitf5mf2-kaz1rmzDjpaaTfdUWeEZEnvf0oyDdmmK4fHKEA@mail.gmail.com> (raw)
In-Reply-To: <A1E20F18-8784-49CB-A14E-B6E3B1893730@apple.com>
Thanks for the reply Andrew. I misread the code and mixed up the for loop
inside the do/while and got confused there for a moment (having one of
those brain fade moments :().
Regards
On Tue, Jun 27, 2017 at 9:07 AM, Andrew Fish <afish@apple.com> wrote:
>
> > On Jun 26, 2017, at 9:30 AM, TVKR <tresko1@gmail.com> 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
>
>
prev parent reply other threads:[~2017-06-27 22:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 16:30 DXE core - Connecting a controller to driver TVKR
2017-06-27 13:52 ` TVKR
2017-06-27 14:07 ` Andrew Fish
2017-06-27 22:44 ` TVKR [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAD+hitf5mf2-kaz1rmzDjpaaTfdUWeEZEnvf0oyDdmmK4fHKEA@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox