Path: utzoo!attcan!uunet!cos!hadron!decuac!felix!info-ultrix
From: angelo@jvnca.csc.org (Michael F. Angelo)
Newsgroups: comp.unix.ultrix
Subject: Re: Device Drivers for MicroVax under Ultrix
Message-ID: <54075@felix.UUCP>
Date: 17 Aug 88 13:05:27 GMT
References: <51452@felix.UUCP> <52120@felix.UUCP>
Sender: info-ultrix@felix.UUCP
Reply-To: angelo@jvnca.csc.org (Michael F. Angelo)
Organization: John Von Neumann Center, Princeton, NJ
Lines: 41
Approved: zemon@felix.UUCP
Reply-Path:



> There was only one real hitch.  When I tried to relink the new kernel,
> the symbols spl6(), splx(), (set processor priority) came up
> undefined.

I think what you want to do, is fake the make - ie ( if the file were named:
x.c ):

	/bin/cc -I. -c -S -DKERNEL x.c
	/lib/c2 x.s | ../vax/inline/inline | as -o x.o

	Then load the driver with the rest of the Kernel.

>  By doing "nm /vmunix | grep pri" I discovered the two symbols getpriority
and setpriority.

According to the man pages, getpriority/ setpriority ( section 2
of the man):
	getpriority - returns the highest prio of any specified proc.
	setpriority - sets the prio of all the specified processes.

	If I remember correctly, spl6 should return the previous
value ( an int ).  After you are done, you should do an splx.
ie:
	register x;
	x= spl6();
	....
	...
	splx(x);

hence:
		splx( x=spl6());

Will set the prio to spl6 and store the value in x.  It will then reset
the priority back to what it was previously.


-- 
		Michael F. Angelo
		angelo@jvnca.csc.org