comp.lang.ada
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
Subject: Re: question re Ada equivalent of C function
Date: 1998/02/22
Date: 1998-02-22T00:00:00+00:00	[thread overview]
Message-ID: <m3vhu7twno.fsf@fred.muc.de> (raw)
In-Reply-To: dewar.888162643@merv


dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> 
> I am not suggesting that everyone move to OS/2, just pointing out that
> the chain of reasoning that X is a "real operating system", therefore
> X cannot allow you to directly access an IO port is misleading.

Linux allows this too, although only if you have root rights. Just
call the iopl() system call then to gain access to the io ports you
need.  

Often it is better design to write a small kernel level driver 
stub though to access the hardware and control it over a device from the
user program. For example it is pretty bad to disable interrupts in
user programs (it is possible with some ugly tricks, but will probably
break on SMP machines) - and often accesses to io ports require that for
race-free operation. Overall doing io port accesses in a kernel level 
driver is better in most cases.

-Andi




  reply	other threads:[~1998-02-22  0:00 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-21  0:00 question re Ada equivalent of C function David Fisher
1998-02-21  0:00 ` Brian Rogoff
1998-02-21  0:00   ` Robert Dewar
1998-02-22  0:00     ` Brian Rogoff
1998-02-21  0:00   ` Jerry van Dijk
1998-02-21  0:00     ` David Fisher
1998-02-22  0:00       ` Simon Wright
1998-02-22  0:00         ` Simon Wright
1998-02-22  0:00       ` Jerry van Dijk
1998-02-22  0:00         ` Robert Dewar
1998-02-22  0:00           ` Andi Kleen [this message]
1998-02-22  0:00   ` Nick Roberts
1998-02-22  0:00     ` frc
1998-02-21  0:00 ` Corey Ashford
1998-02-22  0:00   ` Nick Roberts
1998-02-21  0:00 ` Robert Dewar
1998-02-22  0:00 ` Larry Kilgallen
1998-02-22  0:00   ` Robert Dewar
1998-02-22  0:00   ` frc
1998-02-22  0:00     ` Linux/POSIX packages for GNAT Markus Kuhn
1998-02-22  0:00       ` Robert Dewar
1998-02-23  0:00         ` Markus Kuhn
1998-02-23  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-24  0:00               ` question re Ada equivalent of C function Dale Stanbrough
1998-02-23  0:00         ` Linux/POSIX packages for GNAT Andi Kleen
1998-02-22  0:00           ` Robert Dewar
1998-02-23  0:00             ` Markus Kuhn
1998-02-23  0:00               ` Robert Dewar
1998-02-22  0:00       ` Andi Kleen
1998-02-22  0:00         ` Samuel Tardieu
1998-02-23  0:00           ` Nick Roberts
1998-02-23  0:00             ` Samuel Tardieu
1998-03-05  0:00             ` Testing exception handlers James M. Darlack
1998-02-22  0:00         ` Linux/POSIX packages for GNAT Markus Kuhn
1998-02-22  0:00           ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox