cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/17/04:15:36

From: russell DOT thamm AT dsto DOT defence DOT gov DOT au
Newsgroups: comp.os.msdos.djgpp
Subject: Realtime & DJGPP
Date: Mon, 17 Aug 1998 04:35:14 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 49
Message-ID: <6r8bu2$ce9$1@nnrp1.dejanews.com>
NNTP-Posting-Host: 203.5.217.4
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am currently evaluating djgpp as a real-time development environment.
Due to real-time constraints, I am only considering an environment without
virtual memory and of course plain dos (no windows), so I am using
CWSDPR0 for DPMI.

I am using the timer interrupt (at 1kHz) to execute the real-time task.
This gives me two levels of priority (interrupt and foreground).

I would like to implement pre-emptive scheduling, but it appears
that real-mode is going to be a major problem.
Ideally, I would like to prevent the timer interrupt from occuring
while the processor is in real-mode.

Apparently CLI and STI don't work as expected. For instance, if the foreground
task executes in a loop as follows:
{
  ...
  asm("cli");
  printf(......);
  asm("sti");
}

the timer interrupt still goes off in real mode. On the other hand, if
I redirect the output of my program to a file  (xxx > xxx.lis), the
timer interrupt does NOT appear to go off in real-mode. wierd huh.

How can I implement critical sections if cli/sti doesn't work?

BTW, I can tell whether the interrupt goes off in real-mode because
the DS doesn't match my program's DS and selects an entry in the GDT
not the LDT. (All other segment registers (except CS) are also changed).

I presume that I can avoid real-mode for screen I/O since the video
memory is accessible from protected mode.

Some of my programs need access to network cards. Currently, I use packet
drivers. I can use these from protected mode, but of course, the packet
drivers are real-mode programs. This is potentially a worse problem
since you never know exactly when a packet might arrive.

Are there any protected mode network card drivers available for djgpp?

I'd be grateful for any advice
Russell Thamm



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum

- Raw text -


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