Problem with pritospl()

Bob Posert bob%psitech at uunet.uu.net
Sat Jun 16 03:09:35 AEST 1990


I'm having problems with using pritospl() in a device driver for SunOS
Release 4.0.3-GFX-Rev.1 on a SPARCstation 330GX.  The following is in
/usr/[include | sys]/sundev/mbvar.h:

	/*
	 * Convert interrupt prio to SR
	 */
	#ifdef  sun386

	#ifdef  SUN386
	#define pritospl(n)     (n)
	#define spltopri(n)     (n)
	#else   SUN386
	extern u_char splmasks[];
	#define pritospl(n)     (splmasks[n] | ((n) << 8))
	#define spltopri(n)     (((n) & 0xff00) >> 8)
	#endif  SUN386

	#endif  sun386

which leaves pritospl() undefined.  It looks like the second version is
the one for non-386 machines.  But, when it is used in building a kernel,
ld complains about not finding splmasks.

Ok, you other device driver writers, what did you do?  e-mail & I'll
summarize, or post.

Thanks in advance,
Bob
...!uunet!psitech!bob  <- should work   might work -> bob%psitech at uunet.uu.net



More information about the Comp.sys.sun mailing list