summaryrefslogtreecommitdiff
path: root/Xext/shmint.h
AgeCommit message (Collapse)AuthorFilesLines
2013-11-14xext: Fix shmint.h to not use headers outside of sdk_HEADERSKeith Packard1-7/+1
shmint.h is part of sdk_HEADERS, and so can't use anything not included in sdk_HEADERS. busfault.h includes dix-config.h which is not. Leave the use of struct busfault in shmint.h and move the include of busfault.h to shm.c. protocol-versions.h is not part of sdk_HEADERS, so instead of using that, just use XTRANS_SEND_FDS to choose whether to expose the fd passing requests directly. Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Knut Petersen <Knut_Petersen@t-online.de> Reviewed-by: Julien Cristau <jcristau@debian.org> v2: also avoid using protocol-versions.h
2013-11-11Trap SIGBUS to handle truncated shared memory segmentsKeith Packard1-0/+5
If a client passes a section of memory via file descriptor and then subsequently truncates that file, the underlying pages will be freed and the addresses invalidated. Subsequent accesses to the page will fail with a SIGBUS error. Trap that SIGBUS, figure out which segment was causing the error and then allocate new pages to fill in for that region. Mark the offending shared segment as invalid and free the resource ID so that the client will be able to tell when subsequently attempting to use the segment. Signed-off-by: Keith Packard <keithp@keithp.com> v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis) v3: Also catch errors in ShmCreateSegment Conflicts: include/dix-config.h.in include/xorg-config.h.in
2013-11-11Xext: Enable MIT-SHM FD-passing request definitions only when possibleKeith Packard1-1/+16
Check to see if xtrans FD passing is available and use that to advertise the appropriate version of the SHM extension Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-10-31Add support for MIT-SHM AttachFd requestKeith Packard1-0/+1
This passes a file descriptor from the client to the server, which is then mmap'd Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-10-31Xext: Move MIT-SHM 'ShmDesc' to shmint.hKeith Packard1-0/+9
This data structure is required to use shared memory objects in any extension. That includes the Xv extension, which (before this patch) duplicated the definition of this structure in its own code. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2012-03-21Introduce a consistent coding styleKeith Packard1-7/+7
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>
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer1-2/+28
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade1-2/+6
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-08-28MIT-SHM pixmaps, if they exist, are ZPixmap.Adam Jackson1-3/+0
2008-08-28Reimplement ShmPutImage.Adam Jackson1-3/+0
There's no reason to not just dispatch this straight into the GC. As a bonus, if you do so, damage wraps correctly, and thus swcursor works. The side effect is it's no longer possible to override ShmPutImage with ShmRegisterFuncs(). Also remove the (broken) damage tracking for same from EXA, since it didn't work right, and is now superfluous.
2007-08-24Export fbShmPutImage to modules.Michel Dänzer1-0/+3
To be used by EXA.
2007-06-29Death to RCS tags.Adam Jackson1-2/+0
2005-12-28Merge from xserver a header for shm's server internal functions, which areEric Anholt1-0/+44
called by DDXes. Desired by XGL, and should be used in other locations, probably.