Unexport xf86SetPriority
This commit is contained in:
parent
89d7b88f32
commit
fc5e8dc4a2
|
@ -251,7 +251,6 @@ extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num,
|
||||||
void (*BlankScreen)(ScrnInfoPtr, Bool),
|
void (*BlankScreen)(ScrnInfoPtr, Bool),
|
||||||
IOADDRESS vertsyncreg, int maskval,
|
IOADDRESS vertsyncreg, int maskval,
|
||||||
int knownclkindex, int knownclkvalue);
|
int knownclkindex, int knownclkvalue);
|
||||||
extern _X_EXPORT void xf86SetPriority(Bool up);
|
|
||||||
extern _X_EXPORT const char *xf86GetVisualName(int visual);
|
extern _X_EXPORT const char *xf86GetVisualName(int visual);
|
||||||
extern _X_EXPORT int xf86GetVerbosity(void);
|
extern _X_EXPORT int xf86GetVerbosity(void);
|
||||||
extern _X_EXPORT Pix24Flags xf86GetPix24(void);
|
extern _X_EXPORT Pix24Flags xf86GetPix24(void);
|
||||||
|
|
|
@ -1959,6 +1959,30 @@ xf86MatchPciInstances(const char *driverName, int vendorID,
|
||||||
return numFound;
|
return numFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
xf86SetPriority(Bool up)
|
||||||
|
{
|
||||||
|
static int saved_nice;
|
||||||
|
|
||||||
|
if (up) {
|
||||||
|
#ifdef HAS_SETPRIORITY
|
||||||
|
saved_nice = getpriority(PRIO_PROCESS, 0);
|
||||||
|
setpriority(PRIO_PROCESS, 0, -20);
|
||||||
|
#endif
|
||||||
|
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
||||||
|
saved_nice = nice(0);
|
||||||
|
nice(-20 - saved_nice);
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifdef HAS_SETPRIORITY
|
||||||
|
setpriority(PRIO_PROCESS, 0, saved_nice);
|
||||||
|
#endif
|
||||||
|
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
||||||
|
nice(20 + saved_nice);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xf86GetClocks -- get the dot-clocks via a BIG BAD hack ...
|
* xf86GetClocks -- get the dot-clocks via a BIG BAD hack ...
|
||||||
*/
|
*/
|
||||||
|
@ -2053,30 +2077,6 @@ finish:
|
||||||
(*ClockFunc)(pScrn, CLK_REG_RESTORE);
|
(*ClockFunc)(pScrn, CLK_REG_RESTORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
xf86SetPriority(Bool up)
|
|
||||||
{
|
|
||||||
static int saved_nice;
|
|
||||||
|
|
||||||
if (up) {
|
|
||||||
#ifdef HAS_SETPRIORITY
|
|
||||||
saved_nice = getpriority(PRIO_PROCESS, 0);
|
|
||||||
setpriority(PRIO_PROCESS, 0, -20);
|
|
||||||
#endif
|
|
||||||
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
|
||||||
saved_nice = nice(0);
|
|
||||||
nice(-20 - saved_nice);
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
#ifdef HAS_SETPRIORITY
|
|
||||||
setpriority(PRIO_PROCESS, 0, saved_nice);
|
|
||||||
#endif
|
|
||||||
#if defined(SYSV) || defined(SVR4) || defined(linux)
|
|
||||||
nice(20 + saved_nice);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
xf86GetVisualName(int visual)
|
xf86GetVisualName(int visual)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user