From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 122 invoked from network); 15 Mar 1999 09:45:35 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 15 Mar 1999 09:45:35 -0000 Received: from zruty.comnets.rwth-aachen.de (zruty.comnets.rwth-aachen.de [137.226.4.16]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id EAA11503 for ; Mon, 15 Mar 1999 04:36:30 -0500 Received: from kirk.comnets.rwth-aachen.de (kirk [137.226.4.246]) by zruty.comnets.rwth-aachen.de (8.9.1/8.9.1) with ESMTP id KAA18590; Mon, 15 Mar 1999 10:35:39 +0100 (MET) Received: (ost@localhost) by kirk.comnets.rwth-aachen.de (8.6.12/COMNETS-1.0) id KAA19600; Mon, 15 Mar 1999 10:35:39 +0100 To: "B. James Phillippe" Cc: axp-list@redhat.com Subject: Re: Newbie to port-IO programming on Alpha References: Reply-To: Martin Ostermann x-no-archive: yes From: Martin Ostermann Date: 15 Mar 1999 10:35:39 +0100 In-Reply-To: "B. James Phillippe"'s message of "Sun, 14 Mar 1999 14:42:31 -0800 (PST)" Message-ID: <437lsjw0wk.fsf@comnets.rwth-aachen.de> X-Mailer: Gnus v5.5/Emacs 20.3 On Sun, 14 Mar 1999 14:42:31 -0800 (PST), "B. James Phillippe" 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