lwp_rtprio man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

RTPRIO(2)		    BSD System Calls Manual		     RTPRIO(2)

NAME
     rtprio, lwp_rtprio — examine or modify a process/lwp realtime or idle
     priority

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/types.h>
     #include <sys/rtprio.h>

     int
     rtprio(int function, pid_t pid, struct rtprio *rtp);

     int
     lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp);

DESCRIPTION
     rtprio() is used to lookup or change the realtime or idle priority of a
     process.

     function specifies the operation to be performed.	RTP_LOOKUP to lookup
     the current priority, and RTP_SET to set the priority.  pid specifies the
     process to be used, 0 for the current process.

     *rtp is a pointer to a struct rtprio which is used to specify the prior‐
     ity and priority type.  This structure has the following form:

     struct rtprio {
	     u_short type;
	     u_short prio;
     };

     The value of the type field may be RTP_PRIO_REALTIME for realtime priori‐
     ties, RTP_PRIO_NORMAL for normal priorities, and RTP_PRIO_IDLE for idle
     priorities.  The priority specified by the prio field ranges between 0
     and RTP_PRIO_MAX (usually 31).  0 is the highest possible priority.

     Realtime and idle priority is inherited through fork() and exec().

     A realtime process can only be preempted by a process of equal or higher
     priority, or by an interrupt; idle priority processes will run only when
     no other real/normal priority process is runnable.	 Higher real/idle pri‐
     ority processes preempt lower real/idle priority processes.  Processes of
     equal real/idle priority are run round-robin.

     The lwp_rtprio() function is the lwp counterpart of rtprio().  It takes
     one additional argument, tid, specifying the lwp to be used, -1 for the
     current lwp.

RETURN VALUES
     The rtprio() and lwp_rtprio() functions return the value 0 if successful;
     otherwise the value -1 is returned and the global variable errno is set
     to indicate the error.

ERRORS
     rtprio() and lwp_rtprio() will fail if

     [EINVAL]		The specified prio was out of range.

     [EPERM]		The calling process is not allowed to set the realtime
			priority.  Only root is allowed to change the realtime
			priority of any process, and non-root may only change
			the idle priority of the current process.

     [ESRCH]		The specified process was not found.

SEE ALSO
     nice(1), ps(1), rtprio(1), setpriority(2), nice(3), renice(8)

AUTHORS
     The original author was Henrik Vestergaard Draboel ⟨hvd@terry.ping.dk⟩.
     This implementation was substantially rewritten by David Greenman.

BSD			       December 14, 2007			   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net