Age | Commit message (Collapse) | Author | Files | Lines |
|
This allows the server to call GetTimeInMillis() after each request is
processed to avoid needing setitimer. -dumbSched now turns off the
setitimer.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
A client which is ready, but hasn't run for a while, should receive
the same benefit as one which has simply been idle for a while. Use
the smart_stop_tick to see how long it has been since a client has
run instead of smart_check_tick, which got reset each time a client
was ready, even if it didn't get to run.
Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
|
|
req_fds and SetReqFds in include/dixstruct.h
ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This adds two interfaces:
void SetReqFds(ClientPtr client, int req_fds)
Marks the number of file descriptors expected for this
request. Call this before any request processing so that
any un-retrieved file descriptors will be closed
automatically.
int ReadFdFromClient(ClientPtr client)
Reads the next queued file descriptor from the connection. If
this request is not expecting any more file descriptors, or
if there are no more file descriptors available from the
connection, then this will return -1.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
And now that we have the accessors, localize it. No functional changes, just
preparing for a future change.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
It's already not optional at configure time, this just makes it so at
build time too.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
see ARM related bug reports [1-3]
[1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I
[2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673
[3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field
from a signed int to a signed int 2-bit bitfield. The ClientState enum that is
expected to be assigned to this field has four values: ClientStateInitial (0),
ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3).
However, because this bitfield is signed, ClientStateRetained becomes -2 when
assigned, and ClientStateGone becomes -1. This causes warnings:
test.c:54:10: error: case label value exceeds maximum value for type [-Werror]
test.c:55:10: error: case label value exceeds maximum value for type [-Werror]
The code here is a switch statement:
53 switch (client->clientState) {
54 case ClientStateGone:
55 case ClientStateRetained:
56 [...]
57 break;
58
59 default:
60 [...]
61 break;
62 }
It also causes bizarre problems like this:
client->clientState = ClientStateGone;
assert(client->clientState == ClientStateGone); // this assert fails
Also change the signedness of nearby bitfields to match.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Pick smaller types where possible, including bitfielding some Bools and
small enums, then shuffle the result to be hole-free. 192 -> 128 bytes
on LP64, 144 -> 96 bytes on ILP32.
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Preparation work for per-device idle counters.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: James Jones <jajones@nvidia.com>
|
|
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:
-bap
-psl
-T PrivatePtr
-T pmWait
-T _XFUNCPROTOBEGIN
-T _XFUNCPROTOEND
-T _X_EXPORT
The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.
The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.
The comparison was done with this script:
dir1=$1
dir2=$2
for dir in $dir1 $dir2; do
(cd $dir && find . -name '*.o' | while read file; do
dir=`dirname $file`
base=`basename $file .o`
dump=$dir/$base.dump
objdump -d $file > $dump
done)
done
find $dir1 -name '*.dump' | while read dump; do
otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
diff -u $dump $otherdump
done
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This reverts commit f702372822dadb1fef92cfc25086481f640147b3.
ABI change pended for 1.13
|
|
This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96.
ABI change pended for 1.13
|
|
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
sizeof(ClientRec) ILP32 LP64
before 120 184
after 104 136
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
The record extension needs the major and minor opcodes in the reply
hook, but the request buffer may have been freed by the time the hook
is invoked. Saving the request major and minor codes as the request is
executed avoids fetching from the defunct request buffer.
This patch also eliminates the public MinorOpcodeOfRequest function,
inlining it into Dispatch. Usages of that function have been replaced
with direct access to the new ClientRec field.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
Appears to be leftover from the Kerberos code deleted in 2007
(commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e).
Nothing left ever set clientState to ClientStateAuthenticating
Skipped over 1 to preserve existing enum numbering.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Appear to be leftovers from the XC-QUERY-SECURITY code deleted in 2007
(commit 375864cb74cced40ae688078b1f7750998972535).
Nothing left ever set clientState to ClientStateCheckingSecurity.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
An interface is provided for figuring out the PID and process name of
a client. Make some existing functionality from SELinux and IA
extensions available for general use.
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
When ResetCurrentRequest is called, or IgnoreClient is called when a
client has input pending, IgnoredClientsWithInput will be set. However,
a subsequent IgnoreClient request will clear the client fd from that fd
set, potentially causing the client to hang.
So add an Ignore/Attend count, and only apply the ignore logic on the
first ignore and the attend logic on the last attend. This is
consistent with the comments for these functions; callers must pair
them.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27035.
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
For AtomError, this should fix a clang warning; in the other cases it's
just good documentation.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef.
Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
No more #ifdef XKB, because you can't disable the build, and no more
noXkbExtension either.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
|
|
Avoids preprocessor collision with xfixeswire.h
|
|
Now that the code has been fixed so that Unmap means unmap and not "don't
remap", 'remap' was confusing to have in the function names/parameters, so
change it to simple 'map'.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Conflicts:
Xext/EVI.c
Xext/appgroup.c
Xext/cup.c
Xext/mitmisc.c
Xext/sampleEVI.c
dix/window.c
|
|
|
|
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.
Conflicts:
Xi/opendev.c
dix/devices.c
dix/dixfonts.c
dix/getevents.c
dix/resource.c
dix/window.c
hw/xfree86/common/xf86Xinput.c
mi/mipointer.c
xkb/ddxBeep.c
xkb/ddxCtrls.c
xkb/ddxKeyClick.c
xkb/ddxList.c
xkb/ddxLoad.c
xkb/xkb.c
xkb/xkbAccessX.c
xkb/xkbEvents.c
xkb/xkbInit.c
xkb/xkbPrKeyEv.c
xkb/xkbUtils.c
|
|
|
|
Conflicts:
XTrap/xtrapddmi.c
Xext/security.c
Xext/xprint.c
Xext/xtest.c
Xext/xvdisp.c
Xi/exevents.c
Xi/grabdevb.c
Xi/grabdevk.c
Xi/opendev.c
Xi/ungrdev.c
Xi/ungrdevb.c
Xi/ungrdevk.c
dix/cursor.c
dix/devices.c
dix/dixutils.c
dix/events.c
dix/getevents.c
dix/main.c
dix/window.c
hw/xfree86/ramdac/xf86Cursor.c
include/dix.h
include/input.h
include/inputstr.h
mi/midispcur.c
mi/miinitext.c
mi/misprite.c
render/animcur.c
xfixes/cursor.c
xkb/xkbAccessX.c
|
|
Conflicts:
Xi/extinit.c
Xi/grabdev.c
Xi/setmode.c
Xi/ungrdev.c
dix/devices.c
dix/events.c
dix/getevents.c
include/dix.h
mi/midispcur.c
mi/misprite.c
xkb/xkbActions.c
xkb/xkbEvents.c
xkb/xkbPrKeyEv.c
|
|
Conflicts:
dix/dispatch.c
dix/property.c
hw/xfree86/common/xf86VidMode.c
include/xkbsrv.h
render/glyph.c
xkb/xkbActions.c
|
|
The smart scheduler itimer currently always fires after each request
(which in turn causes the CPU to wake out of idle, burning precious
power). Rather than doing this, just stop the timer before going into
the select() portion of the WaitFor loop. It's a cheap system call, and
it will only get called if there's no more commands batched up from the
active fd.
This change also allows some of the functions to be simplified;
setitimer() will only fail if it's passed invalid data, and we don't do
that... so make it void and remove all the conditional code that deals
with failure.
The change also allows us to remove a few variables that were used for
housekeeping between the signal handler and the main loop.
Signed-off-by: Keith Packard <keithp@koto.keithp.com>
|
|
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
|
|
simply bypass the cached values so they are unused.
|
|
Conflicts:
dix/devices.c
hw/xfree86/common/xf86Xinput.c
hw/xfree86/loader/xf86sym.c
mi/mieq.c
|
|
Before you complain, this code hasn't seen material change since at least
X11R6. It certainly does not build with any modern version of Kerberos.
Anybody wanting krb5 auth to their X server should probably be using
GSSAPI instead of internal krb5 API anyway.
|
|
ambiguious request. PickPointer and PickKeyboard are used for getting
the appropriate pointer when situation is unclear.
Fix some issues with InitializeSprite.
dix, xfree86: Remove last traces of InitSprite.
|
|
|
|
XACE-modular
|
|
|
|
|