delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/11/04:16:59

Sender: bill AT taniwha DOT tssc DOT co DOT nz
Message-ID: <350655E0.A0EFE270@taniwha.tssc.co.nz>
Date: Wed, 11 Mar 1998 22:14:08 +1300
From: Bill Currie <bill AT taniwha DOT tssc DOT co DOT nz>
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>, djgpp-workers AT delorie DOT com,
Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Subject: Re: Temporary files considered unsafe
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980310130222 DOT 4314B-100000 AT is>

Eli Zaretskii wrote:
> 
> On Tue, 10 Mar 1998, Vik Heyndrickx wrote:
> 
> > I've thought about STR-ing in the djgpp start-up code
>                      ^^^^^^^
> What's that?

Store Task Register.  However, I'm not certain windows uses task
segments. AFAICT from the Win3.0 VxD docs, the VMM (the real OS behind
windows, also the DPMI provider) uses the ring 0 stack to hold task
info, though I could easily be wrong.
 
> > but unless I'm
> > mistaking we cannot rely on the fact that our DJGPP program runs at
> > protection level 0, can we?
> 
> No, we can't.  Actually ring 3 is the more common case, IIRC.

Doesn't matter.  My 386/486 programmers guide impiles that STR is
allowed in ring 3 (only LTR isn't).
 
> Yup.  And then, of course, `getpid' is not used for temporary files
> inside the library, so the situation is not so bad, even on Windows.

why not combine the dos psp and the windows vmid (?, can't remember the
correct name, RBIL isn't handy at the moment :(, but I remember seeing a
2f16xx call to grab it).  Sure, you wind up with a 32 bit number, but
that can be expressed in 6 chars (uuencode or related) with the rest (5
if the extension is used) used for time/counter/whatever.

Bill
-- 
Leave others their otherness.

- Raw text -


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