delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/10/06:57:20

From: bootsektor <machap AT tm DOT net DOT my>
Newsgroups: comp.os.msdos.djgpp
Subject: threading
Date: Sun, 09 Mar 1997 19:37:23 +0800
Organization: dk technology
Lines: 16
Message-ID: <3322A0F3.7349@tm.net.my>
NNTP-Posting-Host: png-30-62.tm.net.my
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi.
	I was wondering if it is possible to implement a tasker as shown 
below.	
	The main scheduler is an IRQ server which serves the timer 
interrupt. Then, the tasks are implemented with the i386's internal TSS 
mechanism. The task, in fact is a scheduler on its own right, scheduling 
 threads which make up a program.
	Ok. The problem is this. Once the scheduler is defined, there is 
no definite way to trace back the caller's CS:EIP, and to save the 
processor state. In real mode, there is practically no problem; save 
whatever is necessary in the caller's stack, and then, do thread 
processing to determine the next thread. After that, change the stack to 
reflect the next thread, pop registers and iret. If someone has any 
other ideas, i'd like to hear them ;)
	regards,
	-bootsektor-

- Raw text -


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