delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2006/11/28/00:33:28

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Denis Itskovich <shwon AT netvision DOT net DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: LWP & hw_exception under DJGPP
Date: Tue, 28 Nov 2006 06:51:18 +0200
Organization: NetVision InterNetNews site
Lines: 26
Message-ID: <ekgf85$4m0$1@news2.netvision.net.il>
NNTP-Posting-Host: 89-139-210-238.bb.netvision.net.il
Mime-Version: 1.0
X-Trace: news2.netvision.net.il 1164689477 4800 89.139.210.238 (28 Nov 2006 04:51:17 GMT)
X-Complaints-To: usenet AT netvision DOT net DOT il
NNTP-Posting-Date: Tue, 28 Nov 2006 04:51:17 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi.

I'm taking a part in developing network driver for DOS. Due to some 
reasons we need to enable some kind of multithreading. I tried to 
implement it by myself, using IRQ0, but that failed (the program was 
crashing). I have a couple of questions regarding the way LWP handles 
timer interrupts. I'll be glad if one will answer, or will provide some 
links about the LWP design.

Of course, I can use LWP as is, but I still want to understand how does 
it work.

So the questions are:
    1. Why not to make context switch directly from the interrupt 
handler, instead of raising a SIGILL and handling the signal?

    2. My program crashes, with SIGSEGV, when it tries to 'pop' 
something from the stack, while SS points to segment with limit=0000FFF 
and ESP=1000. What is that segment? I was sure, that DJGPP uses the flat 
memory model - all data and code are sharing the same linear space, but 
during the crash SS points to segment with different base address (which 
differs from the base address pointed by CS, for example). Could you 
explain what is the purpose of this weird segment?


Thank you a lot!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019