Device Drivers for MicroVax under Ultrix
Michael F. Angelo
angelo at jvnca.csc.org
Wed Aug 17 23:05:27 AEST 1988
> 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 at jvnca.csc.org
More information about the Comp.unix.ultrix
mailing list