Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Martin Ostermann <ost@comnets.rwth-aachen.de>
To: "B. James Phillippe" <bryan@terran.org>
Cc: axp-list@redhat.com
Subject: Re: Newbie to port-IO programming on Alpha
Date: 15 Mar 1999 10:35:39 +0100	[thread overview]
Message-ID: <437lsjw0wk.fsf@comnets.rwth-aachen.de> (raw)
In-Reply-To: "B. James Phillippe"'s message of "Sun, 14 Mar 1999 14:42:31 -0800 (PST)"

On Sun, 14 Mar 1999 14:42:31 -0800 (PST), "B. James Phillippe" <bryan@terran.org> said:
> The kernel IO functions are the only IO functions, unless you write your
> own architecture-dependent version for every CPU you plan to support in
> your code.  

Well, that was already done some years ago. I helped to wipe some
bugs out of it... 

Anyway, the CPU isn't the problem, but the glue logic, which is
different on about any Alpha system type. After all, that's the reason
we speak of different system types at all.

> There are no IO definitions in the standard library, and it

This is wrong, there are IO functions in (g)libc for Linux/Alpha. The
Xservers (XFree) use them, for example. Clock as well. I don't know 
about glibc on other systems, including Linux/x86, though.

Your right, if you mean that i/o is not defined in Posix, and you
cannot expect that you problem will work on any Unix system. But I
what I was talking about was to ensure that it will work on any
Linux/Alpha system!

> doesn't make sense for there to be any; IO is inherently
> architecture-dependent. 

Yes, IO is architecture dependent, this is exactly the reason you don't 
wont to compile for just one type. This is a good reason to have it in
the library. Note again, we're talking about the Alpha system type,
not any issues between different CPU architectures. 

Glibc on Linux/Alpha looks upon first use at  /proc/cpuinfo, or
/etc/systype to determine the type of the system, and than uses a
specific function for the type it determines. Well, it would also make
sense if would be possible to install a HW specific version of the
library, but most people believe it's not worth the trouble, so it
wasn't done that way. 

> And what do you mean "if they compile at all"?

Just what I said. There are '#ifdef KERNEL' constructs in those
files. Architecture dependend files get included too, and not every
architecture was tested to compile outside the kernel. Maybe they all
do compile knowadays, but that would be luck, IMHO.

I don't have access to my Alpha right know, thus I cannot point to the
exact location of those definitions in (g)libc, but I guess you'll
find them if you look hard enough. 

Martin
-- 
Martin Ostermann                | mailto:ost+sig0@comnets.rwth-aachen.de
Communication Networks          | http://www.comnets.rwth-aachen.de/~ost
Aachen University of Technology | phone: ++49/241/807917
Germany                         | fax: ++49/241/8890378


  parent reply	other threads:[~1999-03-15  9:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-14  3:36 Newbie to port-IO programming on Alpha Brendan Miller
1999-03-14  9:15 ` B. James Phillippe
1999-03-14 12:50   ` Martin Ostermann
1999-03-14 22:42     ` B. James Phillippe
1999-03-15  5:11       ` QuickCam supported on Alpha? (was: Newbie to port-IO programming on Alpha) Brendan Miller
1999-03-15 13:44         ` Christopher C Chimelis
1999-03-16 18:07         ` Philip Blundell
     [not found]         ` <E10MfXZ-0008AV-00@kings-cross.london.uk.eu.org>
1999-03-29  6:37           ` Brendan Miller
     [not found]             ` <E10RZUl-0007TN-00@fountain.nexus.co.uk>
1999-03-29 16:50               ` Brendan Miller
1999-03-29 17:10                 ` Phil Blundell
1999-03-30  3:11                   ` Brendan Miller
1999-03-30  8:58                     ` Phil Blundell
1999-04-06  5:19                       ` QuickCam supported on Alpha?2 Brendan Miller
1999-04-06  9:03                         ` Phil Blundell
1999-03-15  9:35       ` Martin Ostermann [this message]
1999-03-15 17:18         ` Newbie to port-IO programming on Alpha B. James Phillippe
1999-03-16 13:21           ` Maciej W. Rozycki
1999-03-16 17:25             ` B. James Phillippe
1999-03-16 18:07           ` Philip Blundell
1999-03-14  9:53 ` Bart Warmerdam
read-only archive

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