From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schweigstill Date: Tue, 08 Jan 2008 18:51:23 +0100 Subject: [U-Boot-Users] Do we enable Interrupts in U-Boot? In-Reply-To: <7f245da80801080727o460b630esf14697414f76ce33@mail.gmail.com> References: <7f245da80801080411g4f8e4f82xdb0f6271a8b20f5a@mail.gmail.com> <200801081334.49170.sr@denx.de> <7f245da80801080452p3c939977i649b5ecede367348@mail.gmail.com> <200801081427.56350.sr@denx.de> <7f245da80801080727o460b630esf14697414f76ce33@mail.gmail.com> Message-ID: <4783B81B.3030509@schweigstill.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello! Chetan Nanda schrieb: > Thanks, for explaining the things, > But how can we wait for two events simultaneously (that is also under > a single thread of execution)? Can you give me pointer to the code ? As mentioned before, U-Boot is not an operating system which provides such means. It doesn't have a driver layer with file operations similar to Linux. The only way to wait for events exactly simultaneously is using a hardware which provides these events in one hardware register. Usually one would poll the event sources: ... while (1) { if (driver_a_check_data_available()) { driver_a_read_data(); } if (driver_b_check_data_available()) { driver_b_read_data(); } } if this will be implemented in an U-Boot command, you probably want this loop also to be left, e.g. by pressing Ctrl-C: while (!ctrlc()) { ... } Regards Andreas Schweigstill -- Dipl.-Phys. Andreas Schweigstill Schweigstill IT | Embedded Systems Schauenburgerstra?e 116, D-24118 Kiel, Germany Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436 Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/