- RFE: Need workaround for bug 467 ("Xfree86 smart scheduler breaks Xprt")
This commit is contained in:
parent
0d0097350f
commit
102cb14a5d
|
@ -287,6 +287,24 @@ static char *configFileName = (char *)NULL;
|
|||
static Bool freeDefaultFontPath = FALSE;
|
||||
static char *origFontPath = (char *)NULL;
|
||||
|
||||
static Bool xprintInitGlobalsCalled = FALSE;
|
||||
/*
|
||||
* This function is responsible for doing initalisation of any global
|
||||
* variables at an very early point of server startup (even before
|
||||
* |ProcessCommandLine()|.
|
||||
*/
|
||||
void XprintInitGlobals(void)
|
||||
{
|
||||
xprintInitGlobalsCalled = TRUE;
|
||||
|
||||
#ifdef SMART_SCHEDULE
|
||||
/* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX
|
||||
* (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467
|
||||
* ("Xfree86's "smart scheduler" breaks Xprt") */
|
||||
SmartScheduleDisable = TRUE;
|
||||
#endif /* SMART_SCHEDULE */
|
||||
}
|
||||
|
||||
/*
|
||||
* XprintUseMsg() prints usage for the Xprint-specific options
|
||||
*/
|
||||
|
@ -1272,6 +1290,18 @@ PrinterInitOutput(
|
|||
char **driverNames;
|
||||
char *configDir;
|
||||
|
||||
/* This should NEVER happen, but... */
|
||||
if( !xprintInitGlobalsCalled )
|
||||
{
|
||||
FatalError("Internal error: XprintInitGlobals() not called.");
|
||||
}
|
||||
#ifdef SMART_SCHEDULE
|
||||
if( SmartScheduleDisable != TRUE )
|
||||
{
|
||||
FatalError("Internal error: XF86 smart scheduler incompatible to Xprint DDX.");
|
||||
}
|
||||
#endif /* SMART_SCHEDULE */
|
||||
|
||||
/*
|
||||
* this little test is just a warning at startup to make sure
|
||||
* that the config directory exists.
|
||||
|
|
|
@ -229,6 +229,12 @@ GetTimeInMillis(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
XprintInitGlobals();
|
||||
}
|
||||
|
||||
/****************************************
|
||||
* ddxUseMsg()
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.1.4.4.2.3 2004/03/08 00:36:56 alanc Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/dix/dispatch.c,v 1.1.4.4.2.3.6.1 2004/04/17 02:34:47 gisburn Exp $ */
|
||||
/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */
|
||||
/************************************************************
|
||||
|
||||
|
@ -253,14 +253,7 @@ FlushClientCaches(id)
|
|||
#define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */
|
||||
#define SMART_SCHEDULE_MAX_SLICE 200 /* ms */
|
||||
|
||||
#ifdef XPRINT
|
||||
/* Somehow the XF86 "smart scheduler" completely kills the Xprint DDX
|
||||
* (see http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=467
|
||||
* ("Xfree86's "smart scheduler" breaks Xprt") */
|
||||
Bool SmartScheduleDisable = TRUE;
|
||||
#else
|
||||
Bool SmartScheduleDisable = FALSE;
|
||||
#endif /* XPRINT */
|
||||
long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
||||
long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL;
|
||||
long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.1.4.5.2.3 2004/03/04 20:16:04 kaleb Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.1.4.5.2.4 2004/03/08 00:36:56 alanc Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */
|
||||
/***********************************************************
|
||||
|
||||
|
@ -251,6 +251,8 @@ main(int argc, char *argv[], char *envp[])
|
|||
|
||||
display = "0";
|
||||
|
||||
InitGlobals();
|
||||
|
||||
/* Quartz support on Mac OS X requires that the Cocoa event loop be in
|
||||
* the main thread. This allows the X server main to be called again
|
||||
* from another thread. */
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* holders shall not be used in advertising or otherwise to promote the sale,
|
||||
* use or other dealings in this Software without prior written authorization.
|
||||
*/
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/darwin/darwin.c,v 1.1.4.2.4.2 2004/04/02 21:47:13 eich Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/hw/darwin/darwin.c,v 1.1.4.2.4.1.6.2 2004/04/12 12:20:59 gisburn Exp $ */
|
||||
/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.55 2003/11/15 00:07:09 torrey Exp $ */
|
||||
|
||||
#include "X.h"
|
||||
|
@ -697,6 +697,10 @@ void OsVendorInit(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* ddxProcessArgument --
|
||||
|
|
|
@ -273,6 +273,11 @@ ddxUseMsg()
|
|||
#endif
|
||||
}
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument(int argc, char *argv[], int i)
|
||||
{
|
||||
|
|
|
@ -1295,6 +1295,11 @@ xf86SetLogVerbosity(int verb)
|
|||
return save;
|
||||
}
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* ddxProcessArgument --
|
||||
* Process device-dependent command line args. Returns 0 if argument is
|
||||
|
|
|
@ -47,6 +47,11 @@ int xnestNumScreens = 0;
|
|||
Bool xnestDoDirectColormaps = False;
|
||||
Window xnestParentWindow = 0;
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument (int argc, char *argv[], int i)
|
||||
{
|
||||
|
|
|
@ -394,6 +394,11 @@ ddxUseMsg (void)
|
|||
/* Compare the current option with the string. */
|
||||
#define IS_OPTION(name) (strcmp (argv[i], name) == 0)
|
||||
|
||||
/* ddxInitGlobals - called by |InitGlobals| from os/util.c */
|
||||
void ddxInitGlobals(void)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ddxProcessArgument (int argc, char *argv[], int i)
|
||||
{
|
||||
|
|
|
@ -231,6 +231,8 @@ extern SIGVAL GiveUp(int /*sig*/);
|
|||
|
||||
extern void UseMsg(void);
|
||||
|
||||
extern void InitGlobals(void);
|
||||
|
||||
extern void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
|
||||
|
||||
extern int set_font_authorizations(
|
||||
|
@ -412,6 +414,8 @@ extern XID GenerateAuthorization(
|
|||
extern void ExpandCommandLine(int * /*pargc*/, char *** /*pargv*/);
|
||||
#endif
|
||||
|
||||
extern void ddxInitGlobals(void);
|
||||
|
||||
extern int ddxProcessArgument(int /*argc*/, char * /*argv*/ [], int /*i*/);
|
||||
|
||||
extern void ddxUseMsg(void);
|
||||
|
|
13
os/utils.c
13
os/utils.c
|
@ -1,4 +1,4 @@
|
|||
/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.1.4.6.2.5 2004/03/24 01:09:51 alanc Exp $ */
|
||||
/* $XdotOrg: xc/programs/Xserver/os/utils.c,v 1.1.4.6.2.4.6.2 2004/04/12 12:21:07 gisburn Exp $ */
|
||||
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
|
||||
/*
|
||||
|
||||
|
@ -575,6 +575,17 @@ VerifyDisplayName(const char *d)
|
|||
return( 1 );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is responsible for doing initalisation of any global
|
||||
* variables at an very early point of server startup (even before
|
||||
* |ProcessCommandLine()|.
|
||||
*/
|
||||
void InitGlobals(void)
|
||||
{
|
||||
ddxInitGlobals();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This function parses the command line. Handles device-independent fields
|
||||
* and allows ddx to handle additional fields. It is not allowed to modify
|
||||
|
|
Loading…
Reference in New Issue