[syslinux:lwip] pxe: Make the ISR poll routine a bit saner

syslinux-bot for H. Peter Anvin hpa at zytor.com
Fri Mar 30 17:39:02 PDT 2012


Commit-ID:  73caae75a315c3de65ac25c9d5f521c1a4d3847f
Gitweb:     http://www.syslinux.org/commit/73caae75a315c3de65ac25c9d5f521c1a4d3847f
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 30 Mar 2012 17:38:33 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 30 Mar 2012 17:38:33 -0700

pxe: Make the ISR poll routine a bit saner

It's not great, but it's all we have...

Signed-off-by: H. Peter Anvin <hpa at zytor.com>

---
 core/fs/pxe/isr.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/fs/pxe/isr.c b/core/fs/pxe/isr.c
index 709d48e..c073e03 100644
--- a/core/fs/pxe/isr.c
+++ b/core/fs/pxe/isr.c
@@ -164,9 +164,12 @@ static void pxe_poll_thread(void *dummy)
     (void)dummy;
 
     for (;;) {
-	thread_yield();
-	if (pxe_isr_poll())
+	cli();
+	if (pxe_receive_thread_sem.count < 0 && pxe_isr_poll())
 	    sem_up(&pxe_receive_thread_sem);
+	__schedule();
+	sti();
+	cpu_relax();
     }
 }
 


More information about the Syslinux-commits mailing list