delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/19/08:44:55

From: "Paolo Gava" <pgava AT etrone DOT com DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: What I have to lock?
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <fyYO3.156$ke1.4458@nsw.nnrp.telstra.net>
Date: Tue, 19 Oct 1999 21:31:08 +1000
NNTP-Posting-Host: 203.41.169.13
X-Complaints-To: abuse AT telstra DOT net
X-Trace: nsw.nnrp.telstra.net 940332299 203.41.169.13 (Tue, 19 Oct 1999 21:24:59 EST)
NNTP-Posting-Date: Tue, 19 Oct 1999 21:24:59 EST
Organization: Customer of Telstra Big Pond Direct
Lines: 23
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

I have some problem to understand what data and function lock in my
application.
I wrote a multi-thread application (under windows98 and djgpp V2.02) in
which, with a timer, every 10ms I do a context switch and wake up an other
thread (if there is one).
Every thread has its own stack, the context_switch is write in assembler and
what it does is to save all the register of the thread that will be
interrupted and restore the register of the thread that must go in
execution.

My question is: do I have to lock stack and all the code that the thread
call? (This means lock everything) or I can do something better?

If I have to lock everything, I have to consider the possibility to disable
virtual memory to make sure my program doesn't page, how bad is it?

Thanks in advance for your help,
Paolo



- Raw text -


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