plock()

John Opalko, N7KBT jgo at mcgp1.UUCP
Tue Dec 11 08:51:40 AEST 1990


The plock() system call doesn't give your process a high priority, but it
does prevent it from being swapped out.

    SYNOPSIS
	#include <sys/lock.h>

	int plock (op)
	int op;


    Op specifies the following:

	PROCLOCK - lock text and data segments into memory (process lock)

	TXTLOCK  - lock text segment into memory (text lock)

	DATLOCK  - lock data segment into memory (data lock)

	UNLOCK   - remove locks


As you might suspect, you have to be root to use this hummer and, as usual,
it returns 0 if successful and -1 if not, with the obligatory setting
of errno.


Hope this helps.



More information about the Comp.unix.questions mailing list