[comp.sources.misc] v03i073: donice system call for Nuxi VAX-11

loic@uunet.uu.net@axis.UUCP (07/05/88)

Posting-number: Volume 3, Issue 73
Submitted-by: "A. Nonymous" <loic@uunet.uu.net@axis.UUCP>
Archive-name: donice

  The renice command dynamically change the nice value of a process.
It uses a hiden system call (donice). Here is a library function
to use it.
  It will work on NUXI-V.2 distribution 1.2 for VAX-11.

------------------------------------------------------------------------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	donice.s
# This archive created: Sun Jul  3 21:22:45 1988
#
export PATH; PATH=/bin:$PATH
if test -f 'donice.s'
then
	echo shar: will not over-write existing file "'donice.s'"
else
cat << \SHAR_EOF > 'donice.s'
	.file	"donice.c"
	.data
	.text
	.align	4
	.globl	_donice
_donice:
	halt
	halt
	chmk	$0x38
	bgequ	.L13
	jmp	_donice
.L13:
	ret
	.data
SHAR_EOF
chmod 644 'donice.s'
fi # end of overwriting check
#	End of shell archive
exit 0