From b018239fefcd7164506a3e336bfc900af3d8eedf Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 6 Dec 2000 00:04:10 +0000 Subject: [PATCH] Build tsx11 layer as a separate shared library. --- Make.rules.in | 10 +- Makefile.in | 26 +- configure | 4 +- configure.in | 4 +- dlls/x11drv/Makefile.in | 5 +- dlls/x11drv/x11drv_main.c | 28 +- include/ts_shape.h | 3 + include/ts_xf86dga.h | 3 + include/ts_xf86dga2.h | 3 + include/ts_xf86vmode.h | 3 + include/ts_xlib.h | 3 + include/ts_xpm.h | 3 + include/ts_xresource.h | 3 + include/ts_xshm.h | 3 + include/ts_xutil.h | 3 + include/ts_xvideo.h | 3 + tools/make_X11wrappers | 12 +- tsx11/.cvsignore | 1 + tsx11/Makefile.in | 38 +- tsx11/locking.c | 10 + tsx11/ts_shape.c | 15 +- tsx11/ts_xf86dga.c | 57 +-- tsx11/ts_xf86dga2.c | 111 ++---- tsx11/ts_xf86vmode.c | 87 ++--- tsx11/ts_xlib.c | 771 +++++++++++++------------------------- tsx11/ts_xpm.c | 15 +- tsx11/ts_xresource.c | 39 +- tsx11/ts_xshm.c | 57 +-- tsx11/ts_xutil.c | 213 ++++------- tsx11/ts_xvideo.c | 141 +++---- 30 files changed, 630 insertions(+), 1044 deletions(-) create mode 100644 tsx11/locking.c diff --git a/Make.rules.in b/Make.rules.in index 6adca6951a6..f53cba8c577 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -60,8 +60,12 @@ WINEBUILD = $(TOPOBJDIR)/tools/winebuild/winebuild MAKEDEP = $(TOPOBJDIR)/tools/makedep WRC = $(TOPOBJDIR)/tools/wrc/wrc WMC = $(TOPOBJDIR)/tools/wmc/wmc -LDPATH = LD_LIBRARY_PATH="$(TOPOBJDIR):$$LD_LIBRARY_PATH" +LDPATH = LD_LIBRARY_PATH="$(TOPOBJDIR)/unicode:$$LD_LIBRARY_PATH" DLLDIR = $(TOPOBJDIR)/dlls +LIBWINE = -L$(TOPOBJDIR)/library -lwine +LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11 +LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode + @SET_MAKE@ # Installation infos @@ -175,7 +179,7 @@ DLLS = \ $(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ -r $< .spec.spec.c: - $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L $(DLLDIR) -o $@ -spec $< + $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) -o $@ -spec $< .c.glue.c: $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -o $@ -glue $< @@ -198,7 +202,7 @@ $(MODULE).tmp.o: $(OBJS) Makefile.in # Rule for main module spec file $(MODULE).spec.c: $(MODULE).spec $(RC_SRCS:.rc=.res) $(SYMBOLFILE) $(WINEBUILD) - $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L $(DLLDIR) $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MODULE).spec + $(LDPATH) $(WINEBUILD) @DLLFLAGS@ -L$(DLLDIR) $(SYMBOLFILE:%=-sym %) -o $@ -spec $(SRCDIR)/$(MODULE).spec # Rule to rebuild the resource compiler diff --git a/Makefile.in b/Makefile.in index e483b92433d..e6c5c6380d2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,8 +33,15 @@ LIBPROGRAMS = \ # Libraries (not dlls) to build LIBRARIES = \ library/libwine.$(LIBEXT) \ + tsx11/libwine_tsx11.$(LIBEXT) \ unicode/libwine_unicode.$(LIBEXT) +# Libraries symlinks to create at the top level +LIBSYMLINKS = \ + libwine.$(LIBEXT) \ + libwine_tsx11.$(LIBEXT) \ + libwine_unicode.$(LIBEXT) + # Sub-directories to run make depend/clean into SUBDIRS = \ debugger \ @@ -47,6 +54,7 @@ SUBDIRS = \ programs \ server \ tools \ + tsx11 \ unicode # Sub-directories to run make install into @@ -58,6 +66,7 @@ INSTALLSUBDIRS = \ library \ server \ tools \ + tsx11 \ unicode EMUOBJS = \ @@ -65,7 +74,7 @@ EMUOBJS = \ DLLOBJS = $(DLLS:%=dlls/lib%.@LIBEXT@) -all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) wine +all: Make.rules $(PROGRAMS) $(LIBPROGRAMS) $(LIBSYMLINKS) wine @echo "Wine build complete." WINAPI_CHECK_EXTRA_FLAGS = --global @@ -76,7 +85,7 @@ Make.rules: Make.rules.in configure @echo $? is newer than 'Make.rules', please rerun ./configure! @exit 1 -wine: libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) dlls $(EMUOBJS) +wine: dlls $(EMUOBJS) $(CC) -o wine $(EMUOBJS) $(DLL_LINK) $(LIBS) $(LDFLAGS) install:: all $(INSTALLSUBDIRS:%=%/__install__) @@ -94,6 +103,9 @@ $(EMUOBJS) $(DLLOBJS) $(PROGRAMS) $(LIBPROGRAMS) $(LIBRARIES): dummy libwine.$(LIBEXT): library/libwine.$(LIBEXT) $(RM) $@ && $(LN_S) library/libwine.$(LIBEXT) $@ +libwine_tsx11.$(LIBEXT): tsx11/libwine_tsx11.$(LIBEXT) + $(RM) $@ && $(LN_S) tsx11/libwine_tsx11.$(LIBEXT) $@ + libwine_unicode.$(LIBEXT): unicode/libwine_unicode.$(LIBEXT) $(RM) $@ && $(LN_S) unicode/libwine_unicode.$(LIBEXT) $@ @@ -103,14 +115,14 @@ $(DLLOBJS) $(PROGRAMS): tools $(EMUOBJS): tools dlls -$(LIBPROGRAMS): tools dlls libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) +$(LIBPROGRAMS): tools dlls -server tools: libwine_unicode.$(LIBEXT) +server tools: unicode/libwine_unicode.$(LIBEXT) -dlls: tools libwine.$(LIBEXT) libwine_unicode.$(LIBEXT) +dlls: tools $(LIBRARIES) checklink:: - $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c -L. -lwine -lwine_unicode $(LIBS) && $(RM) checklink + $(CC) -o checklink $(TOPSRCDIR)/library/checklink.c $(LIBWINE) $(LIBUNICODE) $(LIBS) && $(RM) checklink install_programs: dummy @cd programs && $(MAKE) install @@ -136,7 +148,7 @@ clean:: $(RM) wine distclean: clean - $(RM) config.* TAGS Make.rules dlls/Makedll.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher + $(RM) config.* TAGS Make.rules dlls/Makedll.rules programs/Makeprog.rules include/config.h documentation/wine.man documentation/wine.conf.man tools/winelauncher $(RM) `find . \( -name Makefile -o -size 0 \) -print` # We depend on configure above for checks, so we better don't use this rule. diff --git a/configure b/configure index 56e2994a2f7..930e7ba221e 100755 --- a/configure +++ b/configure @@ -4825,9 +4825,9 @@ DLLFLAGS="" if test "$LIBEXT" = "so"; then DLLFLAGS="-fPIC" - DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode" + DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)" else - DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode \$(X_LIBS) \$(XLIB)" + DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)" echo $ac_n "checking whether the linker supports --[no]-whole-archive (Linux)""... $ac_c" 1>&6 echo "configure:4833: checking whether the linker supports --[no]-whole-archive (Linux)" >&5 if eval "test \"`echo '$''{'ac_cv_c_whole_archive'+set}'`\" = set"; then diff --git a/configure.in b/configure.in index 228457613c8..9cb2e0e54a1 100644 --- a/configure.in +++ b/configure.in @@ -575,9 +575,9 @@ DLLFLAGS="" if test "$LIBEXT" = "so"; then DLLFLAGS="-fPIC" - DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode" + DLL_LINK="-L\$(DLLDIR) \$(IMPORTS:%=-l%) \$(LIBWINE) \$(LIBUNICODE)" else - DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) -L\$(TOPOBJDIR) -lwine -lwine_unicode \$(X_LIBS) \$(XLIB)" + DLL_LINK="-L\$(DLLDIR) \$(DLLS:%=-l%) \$(LIBWINE) \$(LIBUNICODE) \$(X_LIBS) \$(XLIB)" AC_CACHE_CHECK([whether the linker supports --[[no]]-whole-archive (Linux)], ac_cv_c_whole_archive, [saved_cflags=$CFLAGS diff --git a/dlls/x11drv/Makefile.in b/dlls/x11drv/Makefile.in index 080c3336b4e..3aff7283d4b 100644 --- a/dlls/x11drv/Makefile.in +++ b/dlls/x11drv/Makefile.in @@ -3,8 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = x11drv -SOVERSION = 1.0 -EXTRALIBS = $(X_LIBS) $(XLIB) +EXTRALIBS = $(LIBTSX11) $(X_LIBS) $(XLIB) IMPORTS = user32 gdi32 kernel32 C_SRCS = \ @@ -15,12 +14,10 @@ PROGRAMS = \ EXTRA_OBJS = \ $(TOPOBJDIR)/graphics/x11drv/x11drv.o \ - $(TOPOBJDIR)/tsx11/tsx11.o \ $(TOPOBJDIR)/windows/x11drv/x11drv.o SUBDIRS = \ $(TOPOBJDIR)/graphics/x11drv \ - $(TOPOBJDIR)/tsx11 \ $(TOPOBJDIR)/windows/x11drv @MAKE_DLL_RULES@ diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c index 63fb3cddeb8..b9fd7a0c02a 100644 --- a/dlls/x11drv/x11drv_main.c +++ b/dlls/x11drv/x11drv_main.c @@ -34,6 +34,8 @@ DEFAULT_DEBUG_CHANNEL(x11drv); static XKeyboardState keyboard_state; +static void (*old_tsx11_lock)(void); +static void (*old_tsx11_unlock)(void); Display *display; Screen *screen; @@ -54,6 +56,21 @@ static int error_handler(Display *display, XErrorEvent *error_evt) return 0; } +/*********************************************************************** + * lock_tsx11 + */ +static void lock_tsx11(void) +{ + RtlEnterCriticalSection( &X11DRV_CritSection ); +} + +/*********************************************************************** + * unlock_tsx11 + */ +static void unlock_tsx11(void) +{ + RtlLeaveCriticalSection( &X11DRV_CritSection ); +} /*********************************************************************** * get_server_startup @@ -256,6 +273,12 @@ static void process_attach(void) get_server_startup(); setup_options(); + /* setup TSX11 locking */ + old_tsx11_lock = wine_tsx11_lock; + old_tsx11_unlock = wine_tsx11_unlock; + wine_tsx11_lock = lock_tsx11; + wine_tsx11_unlock = unlock_tsx11; + /* Open display */ if (!(display = TSXOpenDisplay( Options.display ))) @@ -339,8 +362,11 @@ static void process_detach(void) /* cleanup GDI */ X11DRV_GDI_Finalize(); -#if 0 /* FIXME */ + /* restore TSX11 locking */ + wine_tsx11_lock = old_tsx11_lock; + wine_tsx11_unlock = old_tsx11_unlock; +#if 0 /* FIXME */ /* close the display */ XCloseDisplay( display ); display = NULL; diff --git a/include/ts_shape.h b/include/ts_shape.h index a802340421d..353599900a3 100644 --- a/include/ts_shape.h +++ b/include/ts_shape.h @@ -16,6 +16,9 @@ #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern void TSXShapeCombineRectangles(Display*, Window, int, int, int, XRectangle*, int, int, int); extern void TSXShapeCombineMask(Display*, Window, int, int, int, Pixmap, int); diff --git a/include/ts_xf86dga.h b/include/ts_xf86dga.h index 39efc010114..289a3ce65e8 100644 --- a/include/ts_xf86dga.h +++ b/include/ts_xf86dga.h @@ -16,6 +16,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern Bool TSXF86DGAQueryVersion(Display*,int*,int*); extern Bool TSXF86DGAQueryExtension(Display*,int*,int*); extern Status TSXF86DGAGetVideo(Display*,int,char**,int*,int*,int*); diff --git a/include/ts_xf86dga2.h b/include/ts_xf86dga2.h index 3c746873516..f68760a6c05 100644 --- a/include/ts_xf86dga2.h +++ b/include/ts_xf86dga2.h @@ -16,6 +16,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern Bool TSXDGAQueryVersion(Display*, int*, int*); extern Bool TSXDGAQueryExtension(Display*, int*, int*); extern XDGAMode* TSXDGAQueryModes(Display*, int, int*); diff --git a/include/ts_xf86vmode.h b/include/ts_xf86vmode.h index 65d72647c75..29ba711a6b3 100644 --- a/include/ts_xf86vmode.h +++ b/include/ts_xf86vmode.h @@ -19,6 +19,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern Bool TSXF86VidModeQueryVersion(Display*,int*,int*); extern Bool TSXF86VidModeQueryExtension(Display*,int*,int*); extern Bool TSXF86VidModeGetModeLine(Display*,int,int*,XF86VidModeModeLine*); diff --git a/include/ts_xlib.h b/include/ts_xlib.h index 1a72980d561..a479550bd28 100644 --- a/include/ts_xlib.h +++ b/include/ts_xlib.h @@ -14,6 +14,9 @@ #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern XFontStruct * TSXLoadQueryFont(Display*, const char*); extern XModifierKeymap * TSXGetModifierMapping(Display*); extern XImage * TSXCreateImage(Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int); diff --git a/include/ts_xpm.h b/include/ts_xpm.h index a12eb679aee..12950eee739 100644 --- a/include/ts_xpm.h +++ b/include/ts_xpm.h @@ -15,6 +15,9 @@ #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern int TSXpmCreatePixmapFromData(Display *, Drawable, char **, Pixmap *, Pixmap *, XpmAttributes *); extern int TSXpmAttributesSize(void); diff --git a/include/ts_xresource.h b/include/ts_xresource.h index 73953f210bf..2202090c910 100644 --- a/include/ts_xresource.h +++ b/include/ts_xresource.h @@ -15,6 +15,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern XrmQuark TSXrmUniqueQuark(void); extern int TSXrmGetResource(XrmDatabase, const char*, const char*, char**, XrmValue*); extern XrmDatabase TSXrmGetFileDatabase(const char*); diff --git a/include/ts_xshm.h b/include/ts_xshm.h index f1b02191a04..b54294fddc9 100644 --- a/include/ts_xshm.h +++ b/include/ts_xshm.h @@ -16,6 +16,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern Bool TSXShmQueryExtension(Display *); extern Bool TSXShmQueryVersion(Display *, int *, int *, Bool *); extern int TSXShmPixmapFormat(Display *); diff --git a/include/ts_xutil.h b/include/ts_xutil.h index a5bc7236aed..2389447381c 100644 --- a/include/ts_xutil.h +++ b/include/ts_xutil.h @@ -16,6 +16,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern XClassHint * TSXAllocClassHint(void); extern XSizeHints * TSXAllocSizeHints(void); extern XWMHints * TSXAllocWMHints(void); diff --git a/include/ts_xvideo.h b/include/ts_xvideo.h index a8ff73a452e..d92acdee054 100644 --- a/include/ts_xvideo.h +++ b/include/ts_xvideo.h @@ -18,6 +18,9 @@ #include #include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + extern int TSXvQueryExtension(Display*, unsigned int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*); extern int TSXvQueryAdaptors(Display*, Window, unsigned int*, XvAdaptorInfo**); extern int TSXvQueryEncodings(Display*, XvPortID, unsigned int*, XvEncodingInfo**); diff --git a/tools/make_X11wrappers b/tools/make_X11wrappers index 7edaf5e94e3..4f058011369 100755 --- a/tools/make_X11wrappers +++ b/tools/make_X11wrappers @@ -112,6 +112,9 @@ foreach $name (@dolist) { $pre_file $x11_incl#include +extern void (*wine_tsx11_lock)(void); +extern void (*wine_tsx11_unlock)(void); + END print OUTC < -#include "debugtools.h" #include "ts_$lcname.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); END if($name eq "xpm") { # Handle as special case. @@ -487,13 +487,11 @@ sub raw_output_fn { # print OUTH "#define $fn_name TS$fn_name\n"; print OUTC "{\n"; print OUTC " $resultdecl;\n" if $resultdecl; - print OUTC " TRACE(\"Call $fn_name\\n\");\n"; - print OUTC " EnterCriticalSection( &X11DRV_CritSection );\n"; + print OUTC " wine_tsx11_lock();\n"; print OUTC " "; print OUTC "r = " if $resultdecl; print OUTC "$fn_name($actuals);\n"; - print OUTC " LeaveCriticalSection( &X11DRV_CritSection );\n"; - print OUTC " TRACE(\"Ret $fn_name\\n\");\n"; + print OUTC " wine_tsx11_unlock();\n"; print OUTC " return r;\n" if $resultdecl; print OUTC "}\n"; $want{$fn_name} = 2; diff --git a/tsx11/.cvsignore b/tsx11/.cvsignore index f3c7a7c5da6..ad2f3b8e04c 100644 --- a/tsx11/.cvsignore +++ b/tsx11/.cvsignore @@ -1 +1,2 @@ Makefile +libwine_tsx11.so.1.0 diff --git a/tsx11/Makefile.in b/tsx11/Makefile.in index 7bd5dd06b16..d8cd6c5d220 100644 --- a/tsx11/Makefile.in +++ b/tsx11/Makefile.in @@ -3,9 +3,14 @@ TOPSRCDIR = @top_srcdir@ TOPOBJDIR = .. SRCDIR = @srcdir@ VPATH = @srcdir@ -MODULE = tsx11 +LIBEXT = @LIBEXT@ +MODULE = none +SOVERSION = 1.0 +SONAME = libwine_tsx11.so +EXTRALIBS = $(X_LIBS) $(XLIB) C_SRCS = \ + locking.c \ ts_xf86dga.c \ ts_xf86dga2.c \ ts_xf86vmode.c \ @@ -17,11 +22,36 @@ C_SRCS = \ ts_shape.c \ ts_xpm.c -all: $(MODULE).o +all: libwine_tsx11.$(LIBEXT) @MAKE_RULES@ -$(MODULE).o: $(OBJS) Makefile.in $(TOPSRCDIR)/Make.rules.in - $(LDCOMBINE) $(OBJS) -o $@ +libwine_tsx11.so.$(SOVERSION): $(OBJS) + $(LDSHARED) $(OBJS) -o $@ + +libwine_tsx11.so: libwine_tsx11.so.$(SOVERSION) + $(RM) $@ && $(LN_S) libwine_tsx11.so.$(SOVERSION) $@ + +libwine_tsx11.a: $(OBJS) + $(RM) $@ + $(AR) $@ $(OBJS) + $(RANLIB) $@ + +install_so: libwine_tsx11.so.$(SOVERSION) + [ -d $(libdir) ] || $(MKDIR) $(libdir) + $(INSTALL_PROGRAM) libwine_tsx11.so.$(SOVERSION) $(libdir)/libwine_tsx11.so.$(SOVERSION) + cd $(libdir) && $(RM) libwine_tsx11.so && $(LN_S) libwine_tsx11.so.$(SOVERSION) libwine_tsx11.so + +install_a: libwine_tsx11.a + [ -d $(libdir) ] || $(MKDIR) $(libdir) + $(INSTALL_DATA) libwine_tsx11.a $(libdir)/libwine_tsx11.a + +install:: all $(LIBEXT:%=install_%) + +uninstall:: + cd $(libdir) && $(RM) libwine_tsx11.a libwine_tsx11.so libwine_tsx11.so.$(SOVERSION) + +clean:: + $(RM) libwine_tsx11.so.$(SOVERSION) ### Dependencies: diff --git a/tsx11/locking.c b/tsx11/locking.c new file mode 100644 index 00000000000..3f77e0075f9 --- /dev/null +++ b/tsx11/locking.c @@ -0,0 +1,10 @@ +/* + * Thread-safe X11 locking stubs + */ + +static void nop(void) +{ +} + +void (*wine_tsx11_lock)(void) = nop; +void (*wine_tsx11_unlock)(void) = nop; diff --git a/tsx11/ts_shape.c b/tsx11/ts_shape.c index d82b11a5587..f64f5306df0 100644 --- a/tsx11/ts_shape.c +++ b/tsx11/ts_shape.c @@ -11,28 +11,21 @@ #include -#include "debugtools.h" #include "ts_shape.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); void TSXShapeCombineRectangles(Display* a0, Window a1, int a2, int a3, int a4, XRectangle* a5, int a6, int a7, int a8) { - TRACE("Call XShapeCombineRectangles\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XShapeCombineRectangles(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShapeCombineRectangles\n"); + wine_tsx11_unlock(); } void TSXShapeCombineMask(Display* a0, Window a1, int a2, int a3, int a4, Pixmap a5, int a6) { - TRACE("Call XShapeCombineMask\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XShapeCombineMask(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShapeCombineMask\n"); + wine_tsx11_unlock(); } #endif /* defined(HAVE_LIBXSHAPE) */ diff --git a/tsx11/ts_xf86dga.c b/tsx11/ts_xf86dga.c index d8b6c8dc0c6..dfe46d84c74 100644 --- a/tsx11/ts_xf86dga.c +++ b/tsx11/ts_xf86dga.c @@ -11,108 +11,87 @@ #include #include -#include "debugtools.h" #include "ts_xf86dga.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); Bool TSXF86DGAQueryVersion(Display*a0,int*a1,int*a2) { Bool r; - TRACE("Call XF86DGAQueryVersion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAQueryVersion(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAQueryVersion\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86DGAQueryExtension(Display*a0,int*a1,int*a2) { Bool r; - TRACE("Call XF86DGAQueryExtension\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAQueryExtension(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAQueryExtension\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGAGetVideo(Display*a0,int a1,char**a2,int*a3,int*a4,int*a5) { Status r; - TRACE("Call XF86DGAGetVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAGetVideo(a0,a1,a2,a3,a4,a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAGetVideo\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGADirectVideo(Display*a0,int a1,int a2) { Status r; - TRACE("Call XF86DGADirectVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGADirectVideo(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGADirectVideo\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGAGetViewPortSize(Display*a0,int a1,int *a2,int *a3) { Status r; - TRACE("Call XF86DGAGetViewPortSize\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAGetViewPortSize(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAGetViewPortSize\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGASetViewPort(Display*a0,int a1,int a2,int a3) { Status r; - TRACE("Call XF86DGASetViewPort\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGASetViewPort(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGASetViewPort\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGAInstallColormap(Display*a0,int a1,Colormap a2) { Status r; - TRACE("Call XF86DGAInstallColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAInstallColormap(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAInstallColormap\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGAQueryDirectVideo(Display*a0,int a1,int *a2) { Status r; - TRACE("Call XF86DGAQueryDirectVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAQueryDirectVideo(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAQueryDirectVideo\n"); + wine_tsx11_unlock(); return r; } Status TSXF86DGAViewPortChanged(Display*a0,int a1,int a2) { Status r; - TRACE("Call XF86DGAViewPortChanged\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86DGAViewPortChanged(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86DGAViewPortChanged\n"); + wine_tsx11_unlock(); return r; } diff --git a/tsx11/ts_xf86dga2.c b/tsx11/ts_xf86dga2.c index 888e5beee36..6ad371436d7 100644 --- a/tsx11/ts_xf86dga2.c +++ b/tsx11/ts_xf86dga2.c @@ -11,188 +11,149 @@ #include #include -#include "debugtools.h" #include "ts_xf86dga2.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); Bool TSXDGAQueryVersion(Display* a0, int* a1, int* a2) { Bool r; - TRACE("Call XDGAQueryVersion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGAQueryVersion( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAQueryVersion\n"); + wine_tsx11_unlock(); return r; } Bool TSXDGAQueryExtension(Display* a0, int* a1, int* a2) { Bool r; - TRACE("Call XDGAQueryExtension\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGAQueryExtension( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAQueryExtension\n"); + wine_tsx11_unlock(); return r; } XDGAMode* TSXDGAQueryModes(Display* a0, int a1, int* a2) { XDGAMode* r; - TRACE("Call XDGAQueryModes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGAQueryModes( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAQueryModes\n"); + wine_tsx11_unlock(); return r; } XDGADevice* TSXDGASetMode(Display* a0, int a1, int a2) { XDGADevice* r; - TRACE("Call XDGASetMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGASetMode( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGASetMode\n"); + wine_tsx11_unlock(); return r; } Bool TSXDGAOpenFramebuffer(Display* a0, int a1) { Bool r; - TRACE("Call XDGAOpenFramebuffer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGAOpenFramebuffer( a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAOpenFramebuffer\n"); + wine_tsx11_unlock(); return r; } void TSXDGACloseFramebuffer(Display* a0, int a1) { - TRACE("Call XDGACloseFramebuffer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGACloseFramebuffer( a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGACloseFramebuffer\n"); + wine_tsx11_unlock(); } void TSXDGASetViewport(Display* a0, int a1, int a2, int a3, int a4) { - TRACE("Call XDGASetViewport\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGASetViewport( a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGASetViewport\n"); + wine_tsx11_unlock(); } void TSXDGAInstallColormap(Display* a0, int a1, Colormap a2) { - TRACE("Call XDGAInstallColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGAInstallColormap( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAInstallColormap\n"); + wine_tsx11_unlock(); } Colormap TSXDGACreateColormap(Display* a0, int a1, XDGADevice* a2, int a3) { Colormap r; - TRACE("Call XDGACreateColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGACreateColormap( a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGACreateColormap\n"); + wine_tsx11_unlock(); return r; } void TSXDGASelectInput(Display* a0, int a1, long a2) { - TRACE("Call XDGASelectInput\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGASelectInput( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGASelectInput\n"); + wine_tsx11_unlock(); } void TSXDGAFillRectangle(Display* a0, int a1, int a2, int a3, unsigned int a4, unsigned int a5, unsigned long a6) { - TRACE("Call XDGAFillRectangle\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGAFillRectangle( a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAFillRectangle\n"); + wine_tsx11_unlock(); } void TSXDGACopyArea(Display* a0, int a1, int a2, int a3, unsigned int a4, unsigned int a5, int a6, int a7) { - TRACE("Call XDGACopyArea\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGACopyArea( a0, a1, a2, a3, a4, a5, a6, a7); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGACopyArea\n"); + wine_tsx11_unlock(); } void TSXDGACopyTransparentArea(Display* a0, int a1, int a2, int a3, unsigned int a4, unsigned int a5, int a6, int a7, unsigned long a8) { - TRACE("Call XDGACopyTransparentArea\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGACopyTransparentArea( a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGACopyTransparentArea\n"); + wine_tsx11_unlock(); } int TSXDGAGetViewportStatus(Display* a0, int a1) { int r; - TRACE("Call XDGAGetViewportStatus\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGAGetViewportStatus( a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAGetViewportStatus\n"); + wine_tsx11_unlock(); return r; } void TSXDGASync(Display* a0, int a1) { - TRACE("Call XDGASync\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGASync( a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGASync\n"); + wine_tsx11_unlock(); } Bool TSXDGASetClientVersion(Display* a0) { Bool r; - TRACE("Call XDGASetClientVersion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDGASetClientVersion( a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGASetClientVersion\n"); + wine_tsx11_unlock(); return r; } void TSXDGAChangePixmapMode(Display* a0, int a1, int* a2, int* a3, int a4) { - TRACE("Call XDGAChangePixmapMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGAChangePixmapMode( a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAChangePixmapMode\n"); + wine_tsx11_unlock(); } void TSXDGAKeyEventToXKeyEvent(XDGAKeyEvent* a0, XKeyEvent* a1) { - TRACE("Call XDGAKeyEventToXKeyEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XDGAKeyEventToXKeyEvent( a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDGAKeyEventToXKeyEvent\n"); + wine_tsx11_unlock(); } #endif /* defined(HAVE_LIBXXF86DGA2) */ diff --git a/tsx11/ts_xf86vmode.c b/tsx11/ts_xf86vmode.c index 4f5729112b4..7a3aa895044 100644 --- a/tsx11/ts_xf86vmode.c +++ b/tsx11/ts_xf86vmode.c @@ -14,163 +14,132 @@ #include #include -#include "debugtools.h" #include "ts_xf86vmode.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); Bool TSXF86VidModeQueryVersion(Display*a0,int*a1,int*a2) { Bool r; - TRACE("Call XF86VidModeQueryVersion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeQueryVersion(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeQueryVersion\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeQueryExtension(Display*a0,int*a1,int*a2) { Bool r; - TRACE("Call XF86VidModeQueryExtension\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeQueryExtension(a0,a2,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeQueryExtension\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeGetModeLine(Display*a0,int a1,int*a2,XF86VidModeModeLine*a3) { Bool r; - TRACE("Call XF86VidModeGetModeLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeGetModeLine(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeGetModeLine\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeGetAllModeLines(Display*a0,int a1,int*a2,XF86VidModeModeInfo***a3) { Bool r; - TRACE("Call XF86VidModeGetAllModeLines\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeGetAllModeLines(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeGetAllModeLines\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeAddModeLine(Display*a0,int a1,XF86VidModeModeInfo*a2,XF86VidModeModeInfo*a3) { Bool r; - TRACE("Call XF86VidModeAddModeLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeAddModeLine(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeAddModeLine\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeDeleteModeLine(Display*a0,int a1,XF86VidModeModeInfo*a2) { Bool r; - TRACE("Call XF86VidModeDeleteModeLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeDeleteModeLine(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeDeleteModeLine\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeModModeLine(Display*a0,int a1,XF86VidModeModeLine*a2) { Bool r; - TRACE("Call XF86VidModeModModeLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeModModeLine(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeModModeLine\n"); + wine_tsx11_unlock(); return r; } Status TSXF86VidModeValidateModeLine(Display*a0,int a1,XF86VidModeModeInfo*a2) { Status r; - TRACE("Call XF86VidModeValidateModeLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeValidateModeLine(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeValidateModeLine\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeSwitchMode(Display*a0,int a1,int a2) { Bool r; - TRACE("Call XF86VidModeSwitchMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeSwitchMode(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeSwitchMode\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeSwitchToMode(Display*a0,int a1,XF86VidModeModeInfo*a2) { Bool r; - TRACE("Call XF86VidModeSwitchToMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeSwitchToMode(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeSwitchToMode\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeLockModeSwitch(Display*a0,int a1,int a2) { Bool r; - TRACE("Call XF86VidModeLockModeSwitch\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeLockModeSwitch(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeLockModeSwitch\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeGetMonitor(Display*a0,int a1,XF86VidModeMonitor*a2) { Bool r; - TRACE("Call XF86VidModeGetMonitor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeGetMonitor(a0,a1,a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeGetMonitor\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeGetViewPort(Display*a0,int a1,int*a2,int*a3) { Bool r; - TRACE("Call XF86VidModeGetViewPort\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeGetViewPort(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeGetViewPort\n"); + wine_tsx11_unlock(); return r; } Bool TSXF86VidModeSetViewPort(Display*a0,int a1,int a2,int a3) { Bool r; - TRACE("Call XF86VidModeSetViewPort\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XF86VidModeSetViewPort(a0,a1,a2,a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XF86VidModeSetViewPort\n"); + wine_tsx11_unlock(); return r; } diff --git a/tsx11/ts_xlib.c b/tsx11/ts_xlib.c index 68857a1594f..8685180ac12 100644 --- a/tsx11/ts_xlib.c +++ b/tsx11/ts_xlib.c @@ -9,1404 +9,1147 @@ #include -#include "debugtools.h" #include "ts_xlib.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); XFontStruct * TSXLoadQueryFont(Display* a0, const char* a1) { XFontStruct * r; - TRACE("Call XLoadQueryFont\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XLoadQueryFont(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XLoadQueryFont\n"); + wine_tsx11_unlock(); return r; } XModifierKeymap * TSXGetModifierMapping(Display* a0) { XModifierKeymap * r; - TRACE("Call XGetModifierMapping\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetModifierMapping(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetModifierMapping\n"); + wine_tsx11_unlock(); return r; } XImage * TSXCreateImage(Display* a0, Visual* a1, unsigned int a2, int a3, int a4, char* a5, unsigned int a6, unsigned int a7, int a8, int a9) { XImage * r; - TRACE("Call XCreateImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateImage(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateImage\n"); + wine_tsx11_unlock(); return r; } XImage * TSXGetImage(Display* a0, Drawable a1, int a2, int a3, unsigned int a4, unsigned int a5, unsigned long a6, int a7) { XImage * r; - TRACE("Call XGetImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetImage(a0, a1, a2, a3, a4, a5, a6, a7); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetImage\n"); + wine_tsx11_unlock(); return r; } XImage * TSXGetSubImage(Display* a0, Drawable a1, int a2, int a3, unsigned int a4, unsigned int a5, unsigned long a6, int a7, XImage* a8, int a9, int a10) { XImage * r; - TRACE("Call XGetSubImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetSubImage(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetSubImage\n"); + wine_tsx11_unlock(); return r; } Display * TSXOpenDisplay(const char* a0) { Display * r; - TRACE("Call XOpenDisplay\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XOpenDisplay(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XOpenDisplay\n"); + wine_tsx11_unlock(); return r; } void TSXrmInitialize(void) { - TRACE("Call XrmInitialize\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XrmInitialize(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmInitialize\n"); + wine_tsx11_unlock(); } char * TSXGetAtomName(Display* a0, Atom a1) { char * r; - TRACE("Call XGetAtomName\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetAtomName(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetAtomName\n"); + wine_tsx11_unlock(); return r; } char * TSXKeysymToString(KeySym a0) { char * r; - TRACE("Call XKeysymToString\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XKeysymToString(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XKeysymToString\n"); + wine_tsx11_unlock(); return r; } Atom TSXInternAtom(Display* a0, const char* a1, int a2) { Atom r; - TRACE("Call XInternAtom\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XInternAtom(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XInternAtom\n"); + wine_tsx11_unlock(); return r; } Colormap TSXCopyColormapAndFree(Display* a0, Colormap a1) { Colormap r; - TRACE("Call XCopyColormapAndFree\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCopyColormapAndFree(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCopyColormapAndFree\n"); + wine_tsx11_unlock(); return r; } Colormap TSXCreateColormap(Display* a0, Window a1, Visual* a2, int a3) { Colormap r; - TRACE("Call XCreateColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateColormap(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateColormap\n"); + wine_tsx11_unlock(); return r; } Cursor TSXCreatePixmapCursor(Display* a0, Pixmap a1, Pixmap a2, XColor* a3, XColor* a4, unsigned int a5, unsigned int a6) { Cursor r; - TRACE("Call XCreatePixmapCursor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreatePixmapCursor(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreatePixmapCursor\n"); + wine_tsx11_unlock(); return r; } Cursor TSXCreateFontCursor(Display* a0, unsigned int a1) { Cursor r; - TRACE("Call XCreateFontCursor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateFontCursor(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateFontCursor\n"); + wine_tsx11_unlock(); return r; } GC TSXCreateGC(Display* a0, Drawable a1, unsigned long a2, XGCValues* a3) { GC r; - TRACE("Call XCreateGC\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateGC(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateGC\n"); + wine_tsx11_unlock(); return r; } Pixmap TSXCreatePixmap(Display* a0, Drawable a1, unsigned int a2, unsigned int a3, unsigned int a4) { Pixmap r; - TRACE("Call XCreatePixmap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreatePixmap(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreatePixmap\n"); + wine_tsx11_unlock(); return r; } Pixmap TSXCreateBitmapFromData(Display* a0, Drawable a1, const char* a2, unsigned int a3, unsigned int a4) { Pixmap r; - TRACE("Call XCreateBitmapFromData\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateBitmapFromData(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateBitmapFromData\n"); + wine_tsx11_unlock(); return r; } Window TSXGetSelectionOwner(Display* a0, Atom a1) { Window r; - TRACE("Call XGetSelectionOwner\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetSelectionOwner(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetSelectionOwner\n"); + wine_tsx11_unlock(); return r; } Window TSXCreateWindow(Display* a0, Window a1, int a2, int a3, unsigned int a4, unsigned int a5, unsigned int a6, int a7, unsigned int a8, Visual* a9, unsigned long a10, XSetWindowAttributes* a11) { Window r; - TRACE("Call XCreateWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateWindow(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateWindow\n"); + wine_tsx11_unlock(); return r; } char ** TSXListFonts(Display* a0, const char* a1, int a2, int* a3) { char ** r; - TRACE("Call XListFonts\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XListFonts(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XListFonts\n"); + wine_tsx11_unlock(); return r; } KeySym TSXKeycodeToKeysym(Display* a0, unsigned int a1, int a2) { KeySym r; - TRACE("Call XKeycodeToKeysym\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XKeycodeToKeysym(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XKeycodeToKeysym\n"); + wine_tsx11_unlock(); return r; } KeySym TSXLookupKeysym(XKeyEvent* a0, int a1) { KeySym r; - TRACE("Call XLookupKeysym\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XLookupKeysym(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XLookupKeysym\n"); + wine_tsx11_unlock(); return r; } KeySym * TSXGetKeyboardMapping(Display* a0, unsigned int a1, int a2, int* a3) { KeySym * r; - TRACE("Call XGetKeyboardMapping\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetKeyboardMapping(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetKeyboardMapping\n"); + wine_tsx11_unlock(); return r; } char * TSXResourceManagerString(Display* a0) { char * r; - TRACE("Call XResourceManagerString\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XResourceManagerString(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XResourceManagerString\n"); + wine_tsx11_unlock(); return r; } int TSXInitThreads(void) { int r; - TRACE("Call XInitThreads\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XInitThreads(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XInitThreads\n"); + wine_tsx11_unlock(); return r; } XPixmapFormatValues * TSXListPixmapFormats(Display* a0, int* a1) { XPixmapFormatValues * r; - TRACE("Call XListPixmapFormats\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XListPixmapFormats(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XListPixmapFormats\n"); + wine_tsx11_unlock(); return r; } int * TSXListDepths(Display* a0, int a1, int* a2) { int * r; - TRACE("Call XListDepths\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XListDepths(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XListDepths\n"); + wine_tsx11_unlock(); return r; } int TSXReconfigureWMWindow(Display* a0, Window a1, int a2, unsigned int a3, XWindowChanges* a4) { int r; - TRACE("Call XReconfigureWMWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XReconfigureWMWindow(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XReconfigureWMWindow\n"); + wine_tsx11_unlock(); return r; } int TSXSetWMProtocols(Display* a0, Window a1, Atom* a2, int a3) { int r; - TRACE("Call XSetWMProtocols\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetWMProtocols(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetWMProtocols\n"); + wine_tsx11_unlock(); return r; } int TSXIconifyWindow(Display* a0, Window a1, int a2) { int r; - TRACE("Call XIconifyWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XIconifyWindow(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XIconifyWindow\n"); + wine_tsx11_unlock(); return r; } int TSXSetTransientForHint(Display* a0, Window a1, Window a2) { int r; - TRACE("Call XSetTransientForHint\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetTransientForHint(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetTransientForHint\n"); + wine_tsx11_unlock(); return r; } int TSXActivateScreenSaver(Display* a0) { int r; - TRACE("Call XActivateScreenSaver\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XActivateScreenSaver(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XActivateScreenSaver\n"); + wine_tsx11_unlock(); return r; } int TSXAllocColor(Display* a0, Colormap a1, XColor* a2) { int r; - TRACE("Call XAllocColor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAllocColor(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAllocColor\n"); + wine_tsx11_unlock(); return r; } int TSXAllocColorCells(Display* a0, Colormap a1, int a2, unsigned long* a3, unsigned int a4, unsigned long* a5, unsigned int a6) { int r; - TRACE("Call XAllocColorCells\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAllocColorCells(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAllocColorCells\n"); + wine_tsx11_unlock(); return r; } int TSXBell(Display* a0, int a1) { int r; - TRACE("Call XBell\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XBell(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XBell\n"); + wine_tsx11_unlock(); return r; } int TSXChangeGC(Display* a0, GC a1, unsigned long a2, XGCValues* a3) { int r; - TRACE("Call XChangeGC\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XChangeGC(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XChangeGC\n"); + wine_tsx11_unlock(); return r; } int TSXChangeKeyboardControl(Display* a0, unsigned long a1, XKeyboardControl* a2) { int r; - TRACE("Call XChangeKeyboardControl\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XChangeKeyboardControl(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XChangeKeyboardControl\n"); + wine_tsx11_unlock(); return r; } int TSXChangeProperty(Display* a0, Window a1, Atom a2, Atom a3, int a4, int a5, const unsigned char* a6, int a7) { int r; - TRACE("Call XChangeProperty\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XChangeProperty(a0, a1, a2, a3, a4, a5, a6, a7); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XChangeProperty\n"); + wine_tsx11_unlock(); return r; } int TSXChangeWindowAttributes(Display* a0, Window a1, unsigned long a2, XSetWindowAttributes* a3) { int r; - TRACE("Call XChangeWindowAttributes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XChangeWindowAttributes(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XChangeWindowAttributes\n"); + wine_tsx11_unlock(); return r; } int TSXCheckTypedEvent(Display* a0, int a1, XEvent* a2) { int r; - TRACE("Call XCheckTypedEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCheckTypedEvent(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCheckTypedEvent\n"); + wine_tsx11_unlock(); return r; } int TSXCheckTypedWindowEvent(Display* a0, Window a1, int a2, XEvent* a3) { int r; - TRACE("Call XCheckTypedWindowEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCheckTypedWindowEvent(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCheckTypedWindowEvent\n"); + wine_tsx11_unlock(); return r; } int TSXCheckWindowEvent(Display* a0, Window a1, long a2, XEvent* a3) { int r; - TRACE("Call XCheckWindowEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCheckWindowEvent(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCheckWindowEvent\n"); + wine_tsx11_unlock(); return r; } int TSXConvertSelection(Display* a0, Atom a1, Atom a2, Atom a3, Window a4, Time a5) { int r; - TRACE("Call XConvertSelection\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XConvertSelection(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XConvertSelection\n"); + wine_tsx11_unlock(); return r; } int TSXCopyArea(Display* a0, Drawable a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9) { int r; - TRACE("Call XCopyArea\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCopyArea(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCopyArea\n"); + wine_tsx11_unlock(); return r; } int TSXCopyPlane(Display* a0, Drawable a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned long a10) { int r; - TRACE("Call XCopyPlane\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCopyPlane(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCopyPlane\n"); + wine_tsx11_unlock(); return r; } int TSXDefineCursor(Display* a0, Window a1, Cursor a2) { int r; - TRACE("Call XDefineCursor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDefineCursor(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDefineCursor\n"); + wine_tsx11_unlock(); return r; } int TSXDeleteProperty(Display* a0, Window a1, Atom a2) { int r; - TRACE("Call XDeleteProperty\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDeleteProperty(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDeleteProperty\n"); + wine_tsx11_unlock(); return r; } int TSXDestroyWindow(Display* a0, Window a1) { int r; - TRACE("Call XDestroyWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDestroyWindow(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDestroyWindow\n"); + wine_tsx11_unlock(); return r; } int TSXDisplayKeycodes(Display* a0, int* a1, int* a2) { int r; - TRACE("Call XDisplayKeycodes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDisplayKeycodes(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDisplayKeycodes\n"); + wine_tsx11_unlock(); return r; } int TSXDrawArc(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6, int a7, int a8) { int r; - TRACE("Call XDrawArc\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawArc(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawArc\n"); + wine_tsx11_unlock(); return r; } int TSXDrawLine(Display* a0, Drawable a1, GC a2, int a3, int a4, int a5, int a6) { int r; - TRACE("Call XDrawLine\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawLine(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawLine\n"); + wine_tsx11_unlock(); return r; } int TSXDrawLines(Display* a0, Drawable a1, GC a2, XPoint* a3, int a4, int a5) { int r; - TRACE("Call XDrawLines\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawLines(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawLines\n"); + wine_tsx11_unlock(); return r; } int TSXDrawPoint(Display* a0, Drawable a1, GC a2, int a3, int a4) { int r; - TRACE("Call XDrawPoint\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawPoint(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawPoint\n"); + wine_tsx11_unlock(); return r; } int TSXDrawRectangle(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6) { int r; - TRACE("Call XDrawRectangle\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawRectangle(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawRectangle\n"); + wine_tsx11_unlock(); return r; } int TSXDrawSegments(Display* a0, Drawable a1, GC a2, XSegment* a3, int a4) { int r; - TRACE("Call XDrawSegments\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawSegments(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawSegments\n"); + wine_tsx11_unlock(); return r; } int TSXDrawString16(Display* a0, Drawable a1, GC a2, int a3, int a4, const XChar2b* a5, int a6) { int r; - TRACE("Call XDrawString16\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawString16(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawString16\n"); + wine_tsx11_unlock(); return r; } int TSXDrawText16(Display* a0, Drawable a1, GC a2, int a3, int a4, XTextItem16* a5, int a6) { int r; - TRACE("Call XDrawText16\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDrawText16(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDrawText16\n"); + wine_tsx11_unlock(); return r; } int TSXFillArc(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6, int a7, int a8) { int r; - TRACE("Call XFillArc\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFillArc(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFillArc\n"); + wine_tsx11_unlock(); return r; } int TSXFillPolygon(Display* a0, Drawable a1, GC a2, XPoint* a3, int a4, int a5, int a6) { int r; - TRACE("Call XFillPolygon\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFillPolygon(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFillPolygon\n"); + wine_tsx11_unlock(); return r; } int TSXFillRectangle(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6) { int r; - TRACE("Call XFillRectangle\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFillRectangle(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFillRectangle\n"); + wine_tsx11_unlock(); return r; } int TSXFlush(Display* a0) { int r; - TRACE("Call XFlush\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFlush(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFlush\n"); + wine_tsx11_unlock(); return r; } int TSXFree(void* a0) { int r; - TRACE("Call XFree\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFree(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFree\n"); + wine_tsx11_unlock(); return r; } int TSXFreeColormap(Display* a0, Colormap a1) { int r; - TRACE("Call XFreeColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeColormap(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeColormap\n"); + wine_tsx11_unlock(); return r; } int TSXFreeColors(Display* a0, Colormap a1, unsigned long* a2, int a3, unsigned long a4) { int r; - TRACE("Call XFreeColors\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeColors(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeColors\n"); + wine_tsx11_unlock(); return r; } int TSXFreeCursor(Display* a0, Cursor a1) { int r; - TRACE("Call XFreeCursor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeCursor(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeCursor\n"); + wine_tsx11_unlock(); return r; } int TSXFreeFont(Display* a0, XFontStruct* a1) { int r; - TRACE("Call XFreeFont\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeFont(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeFont\n"); + wine_tsx11_unlock(); return r; } int TSXFreeFontNames(char** a0) { int r; - TRACE("Call XFreeFontNames\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeFontNames(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeFontNames\n"); + wine_tsx11_unlock(); return r; } int TSXFreeGC(Display* a0, GC a1) { int r; - TRACE("Call XFreeGC\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeGC(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeGC\n"); + wine_tsx11_unlock(); return r; } int TSXFreeModifiermap(XModifierKeymap* a0) { int r; - TRACE("Call XFreeModifiermap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreeModifiermap(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreeModifiermap\n"); + wine_tsx11_unlock(); return r; } int TSXFreePixmap(Display* a0, Pixmap a1) { int r; - TRACE("Call XFreePixmap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFreePixmap(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFreePixmap\n"); + wine_tsx11_unlock(); return r; } int TSXGetFontProperty(XFontStruct* a0, Atom a1, unsigned long* a2) { int r; - TRACE("Call XGetFontProperty\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetFontProperty(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetFontProperty\n"); + wine_tsx11_unlock(); return r; } int TSXGetGeometry(Display* a0, Drawable a1, Window* a2, int* a3, int* a4, unsigned int* a5, unsigned int* a6, unsigned int* a7, unsigned int* a8) { int r; - TRACE("Call XGetGeometry\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetGeometry(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetGeometry\n"); + wine_tsx11_unlock(); return r; } int TSXGetInputFocus(Display* a0, Window* a1, int* a2) { int r; - TRACE("Call XGetInputFocus\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetInputFocus(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetInputFocus\n"); + wine_tsx11_unlock(); return r; } int TSXGetKeyboardControl(Display* a0, XKeyboardState* a1) { int r; - TRACE("Call XGetKeyboardControl\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetKeyboardControl(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetKeyboardControl\n"); + wine_tsx11_unlock(); return r; } int TSXGetScreenSaver(Display* a0, int* a1, int* a2, int* a3, int* a4) { int r; - TRACE("Call XGetScreenSaver\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetScreenSaver(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetScreenSaver\n"); + wine_tsx11_unlock(); return r; } int TSXGetWindowProperty(Display* a0, Window a1, Atom a2, long a3, long a4, int a5, Atom a6, Atom* a7, int* a8, unsigned long* a9, unsigned long* a10, unsigned char** a11) { int r; - TRACE("Call XGetWindowProperty\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetWindowProperty(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetWindowProperty\n"); + wine_tsx11_unlock(); return r; } int TSXGetWindowAttributes(Display* a0, Window a1, XWindowAttributes* a2) { int r; - TRACE("Call XGetWindowAttributes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetWindowAttributes(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetWindowAttributes\n"); + wine_tsx11_unlock(); return r; } int TSXGrabKeyboard(Display* a0, Window a1, int a2, int a3, int a4, Time a5) { int r; - TRACE("Call XGrabKeyboard\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGrabKeyboard(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGrabKeyboard\n"); + wine_tsx11_unlock(); return r; } int TSXGrabPointer(Display* a0, Window a1, int a2, unsigned int a3, int a4, int a5, Window a6, Cursor a7, Time a8) { int r; - TRACE("Call XGrabPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGrabPointer(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGrabPointer\n"); + wine_tsx11_unlock(); return r; } int TSXGrabServer(Display* a0) { int r; - TRACE("Call XGrabServer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGrabServer(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGrabServer\n"); + wine_tsx11_unlock(); return r; } int TSXInstallColormap(Display* a0, Colormap a1) { int r; - TRACE("Call XInstallColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XInstallColormap(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XInstallColormap\n"); + wine_tsx11_unlock(); return r; } KeyCode TSXKeysymToKeycode(Display* a0, KeySym a1) { KeyCode r; - TRACE("Call XKeysymToKeycode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XKeysymToKeycode(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XKeysymToKeycode\n"); + wine_tsx11_unlock(); return r; } int TSXMapWindow(Display* a0, Window a1) { int r; - TRACE("Call XMapWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XMapWindow(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XMapWindow\n"); + wine_tsx11_unlock(); return r; } int TSXNextEvent(Display* a0, XEvent* a1) { int r; - TRACE("Call XNextEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XNextEvent(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XNextEvent\n"); + wine_tsx11_unlock(); return r; } int TSXParseGeometry(const char* a0, int* a1, int* a2, unsigned int* a3, unsigned int* a4) { int r; - TRACE("Call XParseGeometry\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XParseGeometry(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XParseGeometry\n"); + wine_tsx11_unlock(); return r; } int TSXPending(Display* a0) { int r; - TRACE("Call XPending\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XPending(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XPending\n"); + wine_tsx11_unlock(); return r; } int TSXPutBackEvent(Display* a0, XEvent* a1) { int r; - TRACE("Call XPutBackEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XPutBackEvent(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XPutBackEvent\n"); + wine_tsx11_unlock(); return r; } int TSXPutImage(Display* a0, Drawable a1, GC a2, XImage* a3, int a4, int a5, int a6, int a7, unsigned int a8, unsigned int a9) { int r; - TRACE("Call XPutImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XPutImage(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XPutImage\n"); + wine_tsx11_unlock(); return r; } int TSXQueryColor(Display* a0, Colormap a1, XColor* a2) { int r; - TRACE("Call XQueryColor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XQueryColor(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XQueryColor\n"); + wine_tsx11_unlock(); return r; } int TSXQueryKeymap(Display* a0, char* a1) { int r; - TRACE("Call XQueryKeymap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XQueryKeymap(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XQueryKeymap\n"); + wine_tsx11_unlock(); return r; } int TSXQueryPointer(Display* a0, Window a1, Window* a2, Window* a3, int* a4, int* a5, int* a6, int* a7, unsigned int* a8) { int r; - TRACE("Call XQueryPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XQueryPointer(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XQueryPointer\n"); + wine_tsx11_unlock(); return r; } int TSXQueryTree(Display* a0, Window a1, Window* a2, Window* a3, Window** a4, unsigned int* a5) { int r; - TRACE("Call XQueryTree\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XQueryTree(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XQueryTree\n"); + wine_tsx11_unlock(); return r; } int TSXRefreshKeyboardMapping(XMappingEvent* a0) { int r; - TRACE("Call XRefreshKeyboardMapping\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XRefreshKeyboardMapping(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XRefreshKeyboardMapping\n"); + wine_tsx11_unlock(); return r; } int TSXResetScreenSaver(Display* a0) { int r; - TRACE("Call XResetScreenSaver\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XResetScreenSaver(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XResetScreenSaver\n"); + wine_tsx11_unlock(); return r; } int TSXRestackWindows(Display* a0, Window* a1, int a2) { int r; - TRACE("Call XRestackWindows\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XRestackWindows(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XRestackWindows\n"); + wine_tsx11_unlock(); return r; } int TSXSendEvent(Display* a0, Window a1, int a2, long a3, XEvent* a4) { int r; - TRACE("Call XSendEvent\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSendEvent(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSendEvent\n"); + wine_tsx11_unlock(); return r; } int TSXSetArcMode(Display* a0, GC a1, int a2) { int r; - TRACE("Call XSetArcMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetArcMode(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetArcMode\n"); + wine_tsx11_unlock(); return r; } int TSXSetBackground(Display* a0, GC a1, unsigned long a2) { int r; - TRACE("Call XSetBackground\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetBackground(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetBackground\n"); + wine_tsx11_unlock(); return r; } int TSXSetClipMask(Display* a0, GC a1, Pixmap a2) { int r; - TRACE("Call XSetClipMask\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetClipMask(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetClipMask\n"); + wine_tsx11_unlock(); return r; } int TSXSetClipOrigin(Display* a0, GC a1, int a2, int a3) { int r; - TRACE("Call XSetClipOrigin\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetClipOrigin(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetClipOrigin\n"); + wine_tsx11_unlock(); return r; } int TSXSetClipRectangles(Display* a0, GC a1, int a2, int a3, XRectangle* a4, int a5, int a6) { int r; - TRACE("Call XSetClipRectangles\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetClipRectangles(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetClipRectangles\n"); + wine_tsx11_unlock(); return r; } int TSXSetDashes(Display* a0, GC a1, int a2, const char* a3, int a4) { int r; - TRACE("Call XSetDashes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetDashes(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetDashes\n"); + wine_tsx11_unlock(); return r; } int TSXSetFillStyle(Display* a0, GC a1, int a2) { int r; - TRACE("Call XSetFillStyle\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetFillStyle(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetFillStyle\n"); + wine_tsx11_unlock(); return r; } int TSXSetFont(Display* a0, GC a1, Font a2) { int r; - TRACE("Call XSetFont\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetFont(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetFont\n"); + wine_tsx11_unlock(); return r; } int TSXSetForeground(Display* a0, GC a1, unsigned long a2) { int r; - TRACE("Call XSetForeground\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetForeground(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetForeground\n"); + wine_tsx11_unlock(); return r; } int TSXSetFunction(Display* a0, GC a1, int a2) { int r; - TRACE("Call XSetFunction\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetFunction(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetFunction\n"); + wine_tsx11_unlock(); return r; } int TSXSetGraphicsExposures(Display* a0, GC a1, int a2) { int r; - TRACE("Call XSetGraphicsExposures\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetGraphicsExposures(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetGraphicsExposures\n"); + wine_tsx11_unlock(); return r; } int TSXSetIconName(Display* a0, Window a1, const char* a2) { int r; - TRACE("Call XSetIconName\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetIconName(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetIconName\n"); + wine_tsx11_unlock(); return r; } int TSXSetInputFocus(Display* a0, Window a1, int a2, Time a3) { int r; - TRACE("Call XSetInputFocus\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetInputFocus(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetInputFocus\n"); + wine_tsx11_unlock(); return r; } int TSXSetLineAttributes(Display* a0, GC a1, unsigned int a2, int a3, int a4, int a5) { int r; - TRACE("Call XSetLineAttributes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetLineAttributes(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetLineAttributes\n"); + wine_tsx11_unlock(); return r; } int TSXSetScreenSaver(Display* a0, int a1, int a2, int a3, int a4) { int r; - TRACE("Call XSetScreenSaver\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetScreenSaver(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetScreenSaver\n"); + wine_tsx11_unlock(); return r; } int TSXSetSelectionOwner(Display* a0, Atom a1, Window a2, Time a3) { int r; - TRACE("Call XSetSelectionOwner\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetSelectionOwner(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetSelectionOwner\n"); + wine_tsx11_unlock(); return r; } int TSXSetSubwindowMode(Display* a0, GC a1, int a2) { int r; - TRACE("Call XSetSubwindowMode\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetSubwindowMode(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetSubwindowMode\n"); + wine_tsx11_unlock(); return r; } int TSXSetWindowColormap(Display* a0, Window a1, Colormap a2) { int r; - TRACE("Call XSetWindowColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetWindowColormap(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetWindowColormap\n"); + wine_tsx11_unlock(); return r; } int TSXStoreColor(Display* a0, Colormap a1, XColor* a2) { int r; - TRACE("Call XStoreColor\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XStoreColor(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XStoreColor\n"); + wine_tsx11_unlock(); return r; } int TSXStoreName(Display* a0, Window a1, const char* a2) { int r; - TRACE("Call XStoreName\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XStoreName(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XStoreName\n"); + wine_tsx11_unlock(); return r; } int TSXSync(Display* a0, int a1) { int r; - TRACE("Call XSync\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSync(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSync\n"); + wine_tsx11_unlock(); return r; } int TSXTextExtents16(XFontStruct* a0, const XChar2b* a1, int a2, int* a3, int* a4, int* a5, XCharStruct* a6) { int r; - TRACE("Call XTextExtents16\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XTextExtents16(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XTextExtents16\n"); + wine_tsx11_unlock(); return r; } int TSXTextWidth16(XFontStruct* a0, const XChar2b* a1, int a2) { int r; - TRACE("Call XTextWidth16\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XTextWidth16(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XTextWidth16\n"); + wine_tsx11_unlock(); return r; } int TSXUngrabKeyboard(Display* a0, Time a1) { int r; - TRACE("Call XUngrabKeyboard\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUngrabKeyboard(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUngrabKeyboard\n"); + wine_tsx11_unlock(); return r; } int TSXUngrabPointer(Display* a0, Time a1) { int r; - TRACE("Call XUngrabPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUngrabPointer(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUngrabPointer\n"); + wine_tsx11_unlock(); return r; } int TSXUngrabServer(Display* a0) { int r; - TRACE("Call XUngrabServer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUngrabServer(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUngrabServer\n"); + wine_tsx11_unlock(); return r; } int TSXUninstallColormap(Display* a0, Colormap a1) { int r; - TRACE("Call XUninstallColormap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUninstallColormap(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUninstallColormap\n"); + wine_tsx11_unlock(); return r; } int TSXUnmapWindow(Display* a0, Window a1) { int r; - TRACE("Call XUnmapWindow\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUnmapWindow(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUnmapWindow\n"); + wine_tsx11_unlock(); return r; } int TSXWarpPointer(Display* a0, Window a1, Window a2, int a3, int a4, unsigned int a5, unsigned int a6, int a7, int a8) { int r; - TRACE("Call XWarpPointer\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XWarpPointer(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XWarpPointer\n"); + wine_tsx11_unlock(); return r; } XIM TSXOpenIM(Display* a0, struct _XrmHashBucketRec* a1, char* a2, char* a3) { XIM r; - TRACE("Call XOpenIM\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XOpenIM(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XOpenIM\n"); + wine_tsx11_unlock(); return r; } int (*TSXSynchronize(Display *a0, Bool a1))(Display *) { int (*r)(Display *); - TRACE("Call XSynchronize\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSynchronize(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSynchronize\n"); + wine_tsx11_unlock(); return r; } @@ -1414,11 +1157,9 @@ extern void _XInitImageFuncPtrs(XImage *); void TS_XInitImageFuncPtrs(XImage *a0) { - TRACE("Call _XInitImageFuncPtrs\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); _XInitImageFuncPtrs(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret _XInitImageFuncPtrs\n"); + wine_tsx11_unlock(); } diff --git a/tsx11/ts_xpm.c b/tsx11/ts_xpm.c index 31e4ec467a1..1cd0899110d 100644 --- a/tsx11/ts_xpm.c +++ b/tsx11/ts_xpm.c @@ -10,31 +10,24 @@ #include -#include "debugtools.h" #include "ts_xpm.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); int TSXpmCreatePixmapFromData(Display *a0, Drawable a1, char **a2, Pixmap *a3, Pixmap *a4, XpmAttributes *a5) { int r; - TRACE("Call XpmCreatePixmapFromData\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XpmCreatePixmapFromData(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XpmCreatePixmapFromData\n"); + wine_tsx11_unlock(); return r; } int TSXpmAttributesSize(void) { int r; - TRACE("Call XpmAttributesSize\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XpmAttributesSize(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XpmAttributesSize\n"); + wine_tsx11_unlock(); return r; } diff --git a/tsx11/ts_xresource.c b/tsx11/ts_xresource.c index 15a782a95c1..ae0e6e3cc4b 100644 --- a/tsx11/ts_xresource.c +++ b/tsx11/ts_xresource.c @@ -10,72 +10,57 @@ #include #include -#include "debugtools.h" #include "ts_xresource.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); XrmQuark TSXrmUniqueQuark(void) { XrmQuark r; - TRACE("Call XrmUniqueQuark\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XrmUniqueQuark(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmUniqueQuark\n"); + wine_tsx11_unlock(); return r; } int TSXrmGetResource(XrmDatabase a0, const char* a1, const char* a2, char** a3, XrmValue* a4) { int r; - TRACE("Call XrmGetResource\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XrmGetResource(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmGetResource\n"); + wine_tsx11_unlock(); return r; } XrmDatabase TSXrmGetFileDatabase(const char* a0) { XrmDatabase r; - TRACE("Call XrmGetFileDatabase\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XrmGetFileDatabase(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmGetFileDatabase\n"); + wine_tsx11_unlock(); return r; } XrmDatabase TSXrmGetStringDatabase(const char* a0) { XrmDatabase r; - TRACE("Call XrmGetStringDatabase\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XrmGetStringDatabase(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmGetStringDatabase\n"); + wine_tsx11_unlock(); return r; } void TSXrmMergeDatabases(XrmDatabase a0, XrmDatabase* a1) { - TRACE("Call XrmMergeDatabases\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XrmMergeDatabases(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmMergeDatabases\n"); + wine_tsx11_unlock(); } void TSXrmParseCommand(XrmDatabase* a0, XrmOptionDescList a1, int a2, const char* a3, int* a4, char** a5) { - TRACE("Call XrmParseCommand\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XrmParseCommand(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XrmParseCommand\n"); + wine_tsx11_unlock(); } diff --git a/tsx11/ts_xshm.c b/tsx11/ts_xshm.c index f54b290d995..4baeed6c55e 100644 --- a/tsx11/ts_xshm.c +++ b/tsx11/ts_xshm.c @@ -11,108 +11,87 @@ #include #include -#include "debugtools.h" #include "ts_xshm.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); Bool TSXShmQueryExtension(Display *a0) { Bool r; - TRACE("Call XShmQueryExtension\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmQueryExtension(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmQueryExtension\n"); + wine_tsx11_unlock(); return r; } Bool TSXShmQueryVersion(Display *a0, int *a1, int *a2, Bool *a3) { Bool r; - TRACE("Call XShmQueryVersion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmQueryVersion(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmQueryVersion\n"); + wine_tsx11_unlock(); return r; } int TSXShmPixmapFormat(Display *a0) { int r; - TRACE("Call XShmPixmapFormat\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmPixmapFormat(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmPixmapFormat\n"); + wine_tsx11_unlock(); return r; } Status TSXShmAttach(Display *a0, XShmSegmentInfo *a1) { Status r; - TRACE("Call XShmAttach\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmAttach(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmAttach\n"); + wine_tsx11_unlock(); return r; } Status TSXShmDetach(Display *a0, XShmSegmentInfo *a1) { Status r; - TRACE("Call XShmDetach\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmDetach(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmDetach\n"); + wine_tsx11_unlock(); return r; } Status TSXShmPutImage(Display *a0, Drawable a1, GC a2, XImage *a3, int a4, int a5, int a6, int a7, unsigned int a8, unsigned int a9, Bool a10) { Status r; - TRACE("Call XShmPutImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmPutImage(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmPutImage\n"); + wine_tsx11_unlock(); return r; } Status TSXShmGetImage(Display *a0, Drawable a1, XImage *a2, int a3, int a4, unsigned long a5) { Status r; - TRACE("Call XShmGetImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmGetImage(a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmGetImage\n"); + wine_tsx11_unlock(); return r; } XImage * TSXShmCreateImage(Display *a0, Visual *a1, unsigned int a2, int a3, char *a4, XShmSegmentInfo *a5, unsigned int a6, unsigned int a7) { XImage * r; - TRACE("Call XShmCreateImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmCreateImage(a0, a1, a2, a3, a4, a5, a6, a7); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmCreateImage\n"); + wine_tsx11_unlock(); return r; } Pixmap TSXShmCreatePixmap(Display *a0, Drawable a1, char *a2, XShmSegmentInfo *a3, unsigned int a4, unsigned int a5, unsigned int a6) { Pixmap r; - TRACE("Call XShmCreatePixmap\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShmCreatePixmap(a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShmCreatePixmap\n"); + wine_tsx11_unlock(); return r; } diff --git a/tsx11/ts_xutil.c b/tsx11/ts_xutil.c index 212fa6f8a7b..8deb364b791 100644 --- a/tsx11/ts_xutil.c +++ b/tsx11/ts_xutil.c @@ -11,390 +11,317 @@ #include #include -#include "debugtools.h" #include "ts_xutil.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); XClassHint * TSXAllocClassHint(void) { XClassHint * r; - TRACE("Call XAllocClassHint\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAllocClassHint(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAllocClassHint\n"); + wine_tsx11_unlock(); return r; } XSizeHints * TSXAllocSizeHints(void) { XSizeHints * r; - TRACE("Call XAllocSizeHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAllocSizeHints(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAllocSizeHints\n"); + wine_tsx11_unlock(); return r; } XWMHints * TSXAllocWMHints(void) { XWMHints * r; - TRACE("Call XAllocWMHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAllocWMHints(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAllocWMHints\n"); + wine_tsx11_unlock(); return r; } int TSXClipBox(Region a0, XRectangle* a1) { int r; - TRACE("Call XClipBox\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XClipBox(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XClipBox\n"); + wine_tsx11_unlock(); return r; } Region TSXCreateRegion(void) { Region r; - TRACE("Call XCreateRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XCreateRegion(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XCreateRegion\n"); + wine_tsx11_unlock(); return r; } int TSXDeleteContext(Display* a0, XID a1, XContext a2) { int r; - TRACE("Call XDeleteContext\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDeleteContext(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDeleteContext\n"); + wine_tsx11_unlock(); return r; } int TSXDestroyRegion(Region a0) { int r; - TRACE("Call XDestroyRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDestroyRegion(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDestroyRegion\n"); + wine_tsx11_unlock(); return r; } int TSXEmptyRegion(Region a0) { int r; - TRACE("Call XEmptyRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XEmptyRegion(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XEmptyRegion\n"); + wine_tsx11_unlock(); return r; } int TSXEqualRegion(Region a0, Region a1) { int r; - TRACE("Call XEqualRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XEqualRegion(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XEqualRegion\n"); + wine_tsx11_unlock(); return r; } int TSXFindContext(Display* a0, XID a1, XContext a2, XPointer* a3) { int r; - TRACE("Call XFindContext\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XFindContext(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XFindContext\n"); + wine_tsx11_unlock(); return r; } XVisualInfo * TSXGetVisualInfo(Display* a0, long a1, XVisualInfo* a2, int* a3) { XVisualInfo * r; - TRACE("Call XGetVisualInfo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetVisualInfo(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetVisualInfo\n"); + wine_tsx11_unlock(); return r; } XWMHints * TSXGetWMHints(Display* a0, Window a1) { XWMHints * r; - TRACE("Call XGetWMHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetWMHints(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetWMHints\n"); + wine_tsx11_unlock(); return r; } int TSXGetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, long* a3, Atom a4) { int r; - TRACE("Call XGetWMSizeHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XGetWMSizeHints(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XGetWMSizeHints\n"); + wine_tsx11_unlock(); return r; } int TSXIntersectRegion(Region a0, Region a1, Region a2) { int r; - TRACE("Call XIntersectRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XIntersectRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XIntersectRegion\n"); + wine_tsx11_unlock(); return r; } int TSXLookupString(XKeyEvent* a0, char* a1, int a2, KeySym* a3, XComposeStatus* a4) { int r; - TRACE("Call XLookupString\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XLookupString(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XLookupString\n"); + wine_tsx11_unlock(); return r; } int TSXOffsetRegion(Region a0, int a1, int a2) { int r; - TRACE("Call XOffsetRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XOffsetRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XOffsetRegion\n"); + wine_tsx11_unlock(); return r; } int TSXPointInRegion(Region a0, int a1, int a2) { int r; - TRACE("Call XPointInRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XPointInRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XPointInRegion\n"); + wine_tsx11_unlock(); return r; } Region TSXPolygonRegion(XPoint* a0, int a1, int a2) { Region r; - TRACE("Call XPolygonRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XPolygonRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XPolygonRegion\n"); + wine_tsx11_unlock(); return r; } int TSXRectInRegion(Region a0, int a1, int a2, unsigned int a3, unsigned int a4) { int r; - TRACE("Call XRectInRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XRectInRegion(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XRectInRegion\n"); + wine_tsx11_unlock(); return r; } int TSXSaveContext(Display* a0, XID a1, XContext a2, const char* a3) { int r; - TRACE("Call XSaveContext\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSaveContext(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSaveContext\n"); + wine_tsx11_unlock(); return r; } int TSXSetClassHint(Display* a0, Window a1, XClassHint* a2) { int r; - TRACE("Call XSetClassHint\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetClassHint(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetClassHint\n"); + wine_tsx11_unlock(); return r; } int TSXSetWMHints(Display* a0, Window a1, XWMHints* a2) { int r; - TRACE("Call XSetWMHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetWMHints(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetWMHints\n"); + wine_tsx11_unlock(); return r; } void TSXSetWMProperties(Display* a0, Window a1, XTextProperty* a2, XTextProperty* a3, char** a4, int a5, XSizeHints* a6, XWMHints* a7, XClassHint* a8) { - TRACE("Call XSetWMProperties\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XSetWMProperties(a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetWMProperties\n"); + wine_tsx11_unlock(); } void TSXSetWMSizeHints(Display* a0, Window a1, XSizeHints* a2, Atom a3) { - TRACE("Call XSetWMSizeHints\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XSetWMSizeHints(a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetWMSizeHints\n"); + wine_tsx11_unlock(); } int TSXSetRegion(Display* a0, GC a1, Region a2) { int r; - TRACE("Call XSetRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSetRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSetRegion\n"); + wine_tsx11_unlock(); return r; } int TSXShrinkRegion(Region a0, int a1, int a2) { int r; - TRACE("Call XShrinkRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XShrinkRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XShrinkRegion\n"); + wine_tsx11_unlock(); return r; } int TSXStringListToTextProperty(char** a0, int a1, XTextProperty* a2) { int r; - TRACE("Call XStringListToTextProperty\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XStringListToTextProperty(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XStringListToTextProperty\n"); + wine_tsx11_unlock(); return r; } int TSXSubtractRegion(Region a0, Region a1, Region a2) { int r; - TRACE("Call XSubtractRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSubtractRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSubtractRegion\n"); + wine_tsx11_unlock(); return r; } int TSXUnionRectWithRegion(XRectangle* a0, Region a1, Region a2) { int r; - TRACE("Call XUnionRectWithRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUnionRectWithRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUnionRectWithRegion\n"); + wine_tsx11_unlock(); return r; } int TSXUnionRegion(Region a0, Region a1, Region a2) { int r; - TRACE("Call XUnionRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUnionRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUnionRegion\n"); + wine_tsx11_unlock(); return r; } int TSXXorRegion(Region a0, Region a1, Region a2) { int r; - TRACE("Call XXorRegion\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XXorRegion(a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XXorRegion\n"); + wine_tsx11_unlock(); return r; } int TSXDestroyImage(struct _XImage *a0) { int r; - TRACE("Call XDestroyImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XDestroyImage(a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XDestroyImage\n"); + wine_tsx11_unlock(); return r; } struct _XImage * TSXSubImage(struct _XImage *a0, int a1, int a2, unsigned int a3, unsigned int a4) { struct _XImage * r; - TRACE("Call XSubImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XSubImage(a0, a1, a2, a3, a4); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XSubImage\n"); + wine_tsx11_unlock(); return r; } int TSXAddPixel(struct _XImage *a0, long a1) { int r; - TRACE("Call XAddPixel\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XAddPixel(a0, a1); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XAddPixel\n"); + wine_tsx11_unlock(); return r; } XContext TSXUniqueContext(void) { XContext r; - TRACE("Call XUniqueContext\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XUniqueContext(); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XUniqueContext\n"); + wine_tsx11_unlock(); return r; } diff --git a/tsx11/ts_xvideo.c b/tsx11/ts_xvideo.c index affc3d08a5f..cfa88d45096 100644 --- a/tsx11/ts_xvideo.c +++ b/tsx11/ts_xvideo.c @@ -13,258 +13,209 @@ #include #include -#include "debugtools.h" #include "ts_xvideo.h" -#include "x11drv.h" -DEFAULT_DEBUG_CHANNEL(x11); int TSXvQueryExtension(Display* a0, unsigned int* a1, unsigned int* a2, unsigned int* a3, unsigned int* a4, unsigned int* a5) { int r; - TRACE("Call XvQueryExtension\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvQueryExtension( a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvQueryExtension\n"); + wine_tsx11_unlock(); return r; } int TSXvQueryAdaptors(Display* a0, Window a1, unsigned int* a2, XvAdaptorInfo** a3) { int r; - TRACE("Call XvQueryAdaptors\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvQueryAdaptors( a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvQueryAdaptors\n"); + wine_tsx11_unlock(); return r; } int TSXvQueryEncodings(Display* a0, XvPortID a1, unsigned int* a2, XvEncodingInfo** a3) { int r; - TRACE("Call XvQueryEncodings\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvQueryEncodings( a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvQueryEncodings\n"); + wine_tsx11_unlock(); return r; } int TSXvPutVideo(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11) { int r; - TRACE("Call XvPutVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvPutVideo( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvPutVideo\n"); + wine_tsx11_unlock(); return r; } int TSXvPutStill(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11) { int r; - TRACE("Call XvPutStill\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvPutStill( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvPutStill\n"); + wine_tsx11_unlock(); return r; } int TSXvGetVideo(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11) { int r; - TRACE("Call XvGetVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvGetVideo( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvGetVideo\n"); + wine_tsx11_unlock(); return r; } int TSXvGetStill(Display* a0, XvPortID a1, Drawable a2, GC a3, int a4, int a5, unsigned int a6, unsigned int a7, int a8, int a9, unsigned int a10, unsigned int a11) { int r; - TRACE("Call XvGetStill\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvGetStill( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvGetStill\n"); + wine_tsx11_unlock(); return r; } int TSXvStopVideo(Display* a0, XvPortID a1, Drawable a2) { int r; - TRACE("Call XvStopVideo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvStopVideo( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvStopVideo\n"); + wine_tsx11_unlock(); return r; } int TSXvGrabPort(Display* a0, XvPortID a1, Time a2) { int r; - TRACE("Call XvGrabPort\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvGrabPort( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvGrabPort\n"); + wine_tsx11_unlock(); return r; } int TSXvUngrabPort(Display* a0, XvPortID a1, Time a2) { int r; - TRACE("Call XvUngrabPort\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvUngrabPort( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvUngrabPort\n"); + wine_tsx11_unlock(); return r; } int TSXvSelectVideoNotify(Display* a0, Drawable a1, Bool a2) { int r; - TRACE("Call XvSelectVideoNotify\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvSelectVideoNotify( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvSelectVideoNotify\n"); + wine_tsx11_unlock(); return r; } int TSXvSelectPortNotify(Display* a0, XvPortID a1, Bool a2) { int r; - TRACE("Call XvSelectPortNotify\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvSelectPortNotify( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvSelectPortNotify\n"); + wine_tsx11_unlock(); return r; } int TSXvSetPortAttribute(Display* a0, XvPortID a1, Atom a2, int a3) { int r; - TRACE("Call XvSetPortAttribute\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvSetPortAttribute( a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvSetPortAttribute\n"); + wine_tsx11_unlock(); return r; } int TSXvGetPortAttribute(Display* a0, XvPortID a1, Atom a2, int* a3) { int r; - TRACE("Call XvGetPortAttribute\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvGetPortAttribute( a0, a1, a2, a3); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvGetPortAttribute\n"); + wine_tsx11_unlock(); return r; } int TSXvQueryBestSize(Display* a0, XvPortID a1, Bool a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6, unsigned int* a7, unsigned int* a8) { int r; - TRACE("Call XvQueryBestSize\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvQueryBestSize( a0, a1, a2, a3, a4, a5, a6, a7, a8); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvQueryBestSize\n"); + wine_tsx11_unlock(); return r; } XvAttribute* TSXvQueryPortAttributes(Display* a0, XvPortID a1, int* a2) { XvAttribute* r; - TRACE("Call XvQueryPortAttributes\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvQueryPortAttributes( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvQueryPortAttributes\n"); + wine_tsx11_unlock(); return r; } void TSXvFreeAdaptorInfo(XvAdaptorInfo* a0) { - TRACE("Call XvFreeAdaptorInfo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XvFreeAdaptorInfo( a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvFreeAdaptorInfo\n"); + wine_tsx11_unlock(); } void TSXvFreeEncodingInfo(XvEncodingInfo* a0) { - TRACE("Call XvFreeEncodingInfo\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); XvFreeEncodingInfo( a0); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvFreeEncodingInfo\n"); + wine_tsx11_unlock(); } XvImageFormatValues * TSXvListImageFormats(Display* a0, XvPortID a1, int* a2) { XvImageFormatValues * r; - TRACE("Call XvListImageFormats\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvListImageFormats( a0, a1, a2); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvListImageFormats\n"); + wine_tsx11_unlock(); return r; } XvImage * TSXvCreateImage(Display* a0, XvPortID a1, int a2, char* a3, int a4, int a5) { XvImage * r; - TRACE("Call XvCreateImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvCreateImage( a0, a1, a2, a3, a4, a5); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvCreateImage\n"); + wine_tsx11_unlock(); return r; } int TSXvPutImage(Display* a0, XvPortID a1, Drawable a2, GC a3, XvImage* a4, int a5, int a6, unsigned int a7, unsigned int a8, int a9, int a10, unsigned int a11, unsigned int a12) { int r; - TRACE("Call XvPutImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvPutImage( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvPutImage\n"); + wine_tsx11_unlock(); return r; } int TSXvShmPutImage(Display* a0, XvPortID a1, Drawable a2, GC a3, XvImage* a4, int a5, int a6, unsigned int a7, unsigned int a8, int a9, int a10, unsigned int a11, unsigned int a12, Bool a13) { int r; - TRACE("Call XvShmPutImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvShmPutImage( a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvShmPutImage\n"); + wine_tsx11_unlock(); return r; } XvImage * TSXvShmCreateImage(Display* a0, XvPortID a1, int a2, char* a3, int a4, int a5, XShmSegmentInfo* a6) { XvImage * r; - TRACE("Call XvShmCreateImage\n"); - EnterCriticalSection( &X11DRV_CritSection ); + wine_tsx11_lock(); r = XvShmCreateImage( a0, a1, a2, a3, a4, a5, a6); - LeaveCriticalSection( &X11DRV_CritSection ); - TRACE("Ret XvShmCreateImage\n"); + wine_tsx11_unlock(); return r; }