delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/18/16:45:17

X-Originating-Host: 202.158.27.82
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject: multitasking/threading in DJGPP
Lines: 22
From: batchex <thedark1NOthSPAM AT phreaker DOT net DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Message-ID: <11c302c2.dc5124a1@usw-ex0102-084.remarq.com>
Bytes: 946
X-Wren-Trace: eIithYSd2pDb3JSFicmbisu7iIWficmViJbJhYSI0ZrX3IbY05DT1NPH1N8=
Date: Sun, 18 Jun 2000 13:36:31 -0700
NNTP-Posting-Host: 10.0.2.84
X-Complaints-To: wrenabuse AT remarq DOT com
X-Trace: WReNphoon4 961360717 10.0.2.84 (Sun, 18 Jun 2000 13:38:37 PDT)
NNTP-Posting-Date: Sun, 18 Jun 2000 13:38:37 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

I'm thinking about writing a preempative multithreading lib with
djgpp. I want it to be all done in software, not using TSS. The
first problem I can think of is providing & preserving seperate
stacks for every thread. I'm thinking about allocating some
memory for stack every time a thread is registered, and change
SS:ESP to the address of the allocated stack for the current
thread in every task/thread switch (by means of timer
interrupt). Of course all the registers will be preserved during
the task/thread switch.

How much memory must I allocate per stacks just to be save? and
does the approach I'm thinking is save? I want to use one global
memory for all the threads, no address space partitioning.

Any help, suggestion and ideas as well to URLs to
multitasking/threading tuts in C are greatly appreciated.

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com

- Raw text -


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