syscall(2) function

Lee Ward lee at doc.cs.unm.edu
Tue Feb 28 09:52:20 AEST 1989


In article <9742 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <3740 at ucdavis.ucdavis.edu> kerchen at iris.ucdavis.edu (Paul Kerchen) writes:
>>Is the system call "syscall()" necessary?
>
>It's not a system call, just a library function.
>Of course it is not necessary in any logical sense.
>I don't even think it's particularly useful these days;
>the last time I saw it used was on a Sixth Edition UNIX system.


It still has uses...

#include <stdio.h>

/* 4.{2,3} reset UBA - BSD VAX */

#define	RESUBA		119

main(argc, argv)
	int	argc;
	char	*argv[];
{

	if (argc != 2) {
		fprintf(stderr, "Usage: %s UBA#\n", argv[0]);
		exit(1);
	}

	exit (syscall(RESUBA, atoi(argv[1])));
}
			--Lee (Ward)



More information about the Comp.unix.wizards mailing list