summaryrefslogtreecommitdiff
path: root/include/dixstruct.h
AgeCommit message (Collapse)AuthorFilesLines
2015-12-01Remove non-smart scheduler. Don't require setitimer.Keith Packard1-1/+5
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>
2015-07-08dix: Unexport various implementation detailsAdam Jackson1-13/+10
Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-01-23dix: Praise clients which haven't run for a while, rather than idle clientsKeith Packard1-1/+0
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>
2014-01-12Replace 'pointer' type with 'void *'Keith Packard1-5/+5
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>
2013-11-11Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't setKeith Packard1-0/+4
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>
2013-10-31Add interfaces to get FDs from clients over the socketKeith Packard1-0/+8
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>
2013-10-18dix: provide accessor methods for the last device event timePeter Hutterer1-1/+0
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>
2013-09-10dix: FIXES is not optionalAdam Jackson1-11/+0
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>
2013-04-23dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architecturesAndreas Müller1-1/+1
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>
2013-01-08dix: Make small bitfields that store enums unsignedAaron Plattner1-6/+6
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>
2012-09-20dix: Repack ClientRecAdam Jackson1-20/+18
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>
2012-09-20dix: Pull client-is-local flag up to the ClientRecAdam Jackson1-0/+1
Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-03-22Change lastDeviceIdleTime to be per-devicePeter Hutterer1-1/+1
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>
2012-03-21Introduce a consistent coding styleKeith Packard1-81/+84
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>
2012-01-12Revert "dix: Repack ClientRec"Keith Packard1-14/+15
This reverts commit f702372822dadb1fef92cfc25086481f640147b3. ABI change pended for 1.13
2012-01-12Revert "dix: Pull client-is-local flag up to the ClientRec"Keith Packard1-1/+0
This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. ABI change pended for 1.13
2012-01-06dix: Pull client-is-local flag up to the ClientRecAdam Jackson1-0/+1
Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-01-06dix: Repack ClientRecAdam Jackson1-15/+14
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>
2011-12-01Save major/minor opcodes in ClientRec for RecordAReplyKeith Packard1-0/+1
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>
2011-09-20Remove unused ClientStateAuthenticatingAlan Coopersmith1-2/+2
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>
2011-09-19Remove unused ClientStateCheckingSecurity & ClientStateCheckedSecurityAlan Coopersmith1-3/+2
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>
2010-12-23os: Add facilities for client ID tracking.Rami Ylimäki1-0/+2
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>
2010-09-10os: simplify smart scheduler init processTiago Vignatti1-1/+1
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>
2010-06-30OS support: fix writeable client vs IgnoreClient behaviorJesse Barnes1-0/+1
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>
2010-05-22Declare functions that unconditionally call FatalError as _X_NORETURN.Jamey Sharp1-1/+1
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>
2010-04-26include: remove couple of unused structures fields and bump ABITiago Vignatti1-4/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-05-27Remove reference to non-existing requestLog and requestLogIndexNicolai Hähnle1-4/+0
These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-31Document which bits of ClientRec are currently unusedAdam Jackson1-9/+4
2009-01-22XKB: Make XKB mandatoryDaniel Stone1-2/+0
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>
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-19/+19
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).
2008-09-23Rename SaveSetMap() to SaveSetShouldMap().Adam Jackson1-2/+2
Avoids preprocessor collision with xfixeswire.h
2008-09-22Change 'remap' to 'map' in saveset functions/macrosOwen Taylor1-5/+5
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>
2008-08-11The smart scheduler is not optional.Mathieu Bérard1-4/+0
2008-04-22Merge branch 'master' into mpxPeter Hutterer1-3/+1
Conflicts: Xext/EVI.c Xext/appgroup.c Xext/cup.c Xext/mitmisc.c Xext/sampleEVI.c dix/window.c
2008-04-18Death to APPGROUP.Adam Jackson1-3/+1
2008-03-04Merge branch 'master' into mpxPeter Hutterer1-1/+0
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
2008-02-14Rip out useless indirection in the callback list management.Adam Jackson1-1/+0
2008-01-03Merge branch 'master' into mpxPeter Hutterer1-5/+2
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
2007-11-07Merge branch 'master' into mpxPeter Hutterer1-4/+2
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
2007-11-05Merge branch 'master' into XACE-SELINUXEamon Walsh1-4/+2
Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c
2007-10-30reduce wakeups from smart schedulerArjan van de Ven1-4/+2
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>
2007-08-28devPrivates rework: since API is already broken, switch everythingEamon Walsh1-1/+2
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.
2007-08-14dix: remove caching of drawables and graphics contexts. The security checksEamon Walsh1-4/+0
simply bypass the cached values so they are unused.
2007-06-19Merge branch 'master' into mpxPeter Hutterer1-4/+0
Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c
2007-06-04Remove the old Kerberos 5 authentication code.Adam Jackson1-4/+0
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.
2007-03-02dix: Add ClientPointer to client, used for picking which pointer to use inPeter Hutterer1-0/+2
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.
2006-08-21Merge branch 'XACE-modular' into my-XACE-modularEamon Walsh1-2/+0
2006-08-10Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into ↵Alan Coopersmith1-2/+0
XACE-modular
2006-08-02Rebase Security extension to use devPrivates for storing security state.Eamon Walsh1-3/+0
2006-07-21Remove RCS tags. Fix Xprint makefile braindamage.Adam Jackson1-2/+0