From owner-freebsd-hackers Fri Oct 27 13:34:56 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id NAA18771 for hackers-outgoing; Fri, 27 Oct 1995 13:34:56 -0700 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id NAA18762 for ; Fri, 27 Oct 1995 13:34:50 -0700 Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA23654; Fri, 27 Oct 1995 16:33:51 -0400 Date: Fri, 27 Oct 1995 16:33:51 -0400 From: "Garrett A. Wollman" Message-Id: <9510272033.AA23654@halloran-eldar.lcs.mit.edu> To: Terry Lambert Cc: hackers@freebsd.org Subject: Re: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] In-Reply-To: <199510272009.NAA23809@phaeton.artisoft.com> References: <199510271903.FAA24658@godzilla.zeta.org.au> <199510272009.NAA23809@phaeton.artisoft.com> Sender: owner-hackers@freebsd.org Precedence: bulk [CC list trimmed. I don't read -hackers.] < said: > But this implies that if there is not a prototype in scope, a function > that uses a type that is not correct without a prototype in scope should > not generate a bogus call reference. Not at all. IT IS THE CALLER'S RESPONSIBILITY TO PASS THE CORRECT TYPES AND ALWAYS HAS BEEN. In particular, it is incorrect to call lseek() with a `where' argument of any type other than `off_t', and if a prototype is not in scope, the the programmer damn well better use a cast to ensure that the correct type is being used. >> [Bruce wrote:] >> Consider a 68K compiler that passes the first 2 pointer args (if any) >> in a0-a1 and the first 2 integer args (if any) in d0-d1 and the other >> args on the stack. How are you going to push the args in syscall()? >> Hint: you'll need to know the arg types of all syscalls. > That's an evil way to pass arguments, then. 8-(. That's a fast way to pass arguments on a slow architecture. If you don't like it, tough, because I /know/ that there are compilers out there that do this, or something nearly like it. (And don't forget the SPARC, where under Sun's compiler all aggregates are passed by hidden reference.) -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant