pg_control_priority.c
/*
 * Get the scheduling priority of the specified process.
 */
Get the scheduling priority of the specified process.
Get the scheduling priority of the specified process .
static int
GetProcessPriority(int pid, int elevel)
{
	int			priority = 0;
	int			save_errno = errno;
	errno = 0;
	priority = getpriority(PRIO_PROCESS, pid);
	if (errno != 0)
		ereport(elevel,
				(errmsg("could not get the scheduling priority of process %d: %m", pid)));
	errno = save_errno;
	return priority;
}
static int GetProcessPriority ( int pid , int elevel ) { int priority = 0 ; int save_errno = errno ; errno = 0 ; priority = getpriority ( PRIO_PROCESS , pid ) ; if ( errno != 0 ) ereport ( elevel , ( errmsg ( " " , pid ) ) ) ; errno = save_errno ; return priority ; }
Get the scheduling priority of the specified process.
Get the scheduling priority of the specified process .