Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!CERNVM.BITNET!JCV From: JCV@CERNVM.BITNET.UUCP Newsgroups: mod.computers.vax Subject: (none) Message-ID: <8701290526.AA02333@ucbvax.Berkeley.EDU> Date: Thu, 29-Jan-87 00:39:08 EST Article-I.D.: ucbvax.8701290526.AA02333 Posted: Thu Jan 29 00:39:08 1987 Date-Received: Fri, 30-Jan-87 01:44:45 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 23 Approved: info-vax@sri-kl.arpa Subject: Re: Argument lists for system services The reason for a fixed/required number of arguments for the system services is efficiency. As they are called hundreds or thousands of times per second, the necessary access checking of the argument list and the arguments themselves must be fast. For that reason, the CMKRNL/CMEXEC handlers have a fixed array indexed by CMKRNL/CMEXEC number, which contains the required number of arguments. The actual number of arguments (the byte at (AP)) is checked against this value. Then, the argument list is PROBERed using the value from the array. A system service is therefore guaranteed to be able to look at its argument list as it expects without risking a crash. (For the same efficiency reason, only 'simple' string descriptors are supported.) By the way, a 0 in the argument list does not always indicate an optional argument: For parameters passed by value (most notorious: QIO's EFN), you get that value (which you could call a default, if you want). If you do a number of asynchronous I/O's using that default EFN and then wait on it, a n y I/O terminating will set that EFN, and you have to check the IOSBs to find out which one it was (that's what they're there for).