aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-03-30 17:38:33 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-03-30 17:38:33 -0700
commit73caae75a315c3de65ac25c9d5f521c1a4d3847f (patch)
tree11ca56d2c3e9b04f3cf00860e5186d559e3a6d73
parent030b9a942871e73e36930154e4d484657ac8e5fa (diff)
downloadsyslinux-73caae75a315c3de65ac25c9d5f521c1a4d3847f.tar.gz
syslinux-73caae75a315c3de65ac25c9d5f521c1a4d3847f.tar.xz
syslinux-73caae75a315c3de65ac25c9d5f521c1a4d3847f.zip
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@zytor.com>
-rw-r--r--core/fs/pxe/isr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fs/pxe/isr.c b/core/fs/pxe/isr.c
index 709d48e6..c073e032 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();
}
}