Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!beta!hc!ames!amelia!msf From: msf@amelia (Michael S. Fischbein) Newsgroups: comp.unix.questions Subject: Re: System V manuals (was Re: What real non-UNIX 'C' compilers...) Message-ID: <3124@ames.arpa> Date: Fri, 16-Oct-87 07:32:46 EDT Article-I.D.: ames.3124 Posted: Fri Oct 16 07:32:46 1987 Date-Received: Sat, 17-Oct-87 18:30:07 EDT References: <855@sugar.UUCP> <29930@sun.uucp> <867@sugar.UUCP> <30458@sun.uucp> <129@nusdhub.UUCP> <31054@sun.uucp> Sender: usenet@ames.arpa Reply-To: msf@amelia.UUCP (Michael S. Fischbein) Organization: NASA Langley Research Center, Hampton, VA Lines: 44 In article <31054@sun.uucp> guy%gorodish@Sun.COM (Guy Harris) writes (Quoting an earlier article): >> > Why does the SVID stick read() and fread() in the same place? >> > I have no idea why they were stuck in the >same place; it certainly doesn't reflect the way this stuff is actually >packaged. If there is some notion that the stuff in BA_OS should represent >"system calls" (whatever that means - on *some* systems it means "routines >consisting of a tiny wrapper around a trap", but not on others), "fread" - and >"fopen", which is also in BA_OS - certainly doesn't belong there; To quote from SVID, v1, section 3.1, which lists BA_OS routines: "Table 3-1 lists the Operating System Service Routines whose run-time behaviour must be supported by any implementation of the Base System" Both read(2) and fread(3) are in the list [1]. Note the SVID does not mention any distinction between the UNIX manual chapter 2 and chapter 3 routines; which is where is implementation dependent; what is required is that the semantics of the call are supported. The programmer does not need to be concerned with chapter 2 / chapter 3 dichotomies unless efficiency is a paramount concern; and then portability would be ignored anyway. Note also that FREAD(BA_OS) is in the first set of routines on the list, which "... should fulfill the needs of most application-programs," and READ(BA_OS) is in the second set, which "should be used by application- programs only when some special need requires it." I don't read the SVID as requiring any routine to be a "trap" vs a "system call." In fact, there could conceivably be implementations fully SVID conformant with NO traps, just real live subroutine calls with the traps buried fairly deeply. Think about hosted systems, for example. [1] More properly and pedantically, routines with calling semantics identical to read in chapter 2 of the UNIX Programmer's Manual and fread of chapter 3. mike Michael Fischbein msf@prandtl.nas.nasa.gov ...!seismo!decuac!csmunix!icase!msf These are my opinions and not necessarily official views of any organization.