X Strike Force XFree86 SVN commit: rev 648 - branches/4.3.0/sid/debian/patches
Author: branden
Date: 2003-10-11 00:37:54 -0500 (Sat, 11 Oct 2003)
New Revision: 648
Removed:
branches/4.3.0/sid/debian/patches/064_fix_Xinput_deadlock.diff
Modified:
branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD.diff
Log:
Merge updated and improved fix for #191463 (fix hangs when threaded
apps use XInput library) from trunk. Described in 4.2.1-12 changelog.
Modified: branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD.diff
===================================================================
--- branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD.diff 2003-10-09 20:31:16 UTC (rev 647)
+++ branches/4.3.0/sid/debian/patches/000_stolen_from_HEAD.diff 2003-10-11 05:37:54 UTC (rev 648)
@@ -8,6 +8,13 @@
* Fix Xv regression in trident driver.
* Implement two missing relocations in the ia64 module loader.
+(xc/lib/Xi/XExtInt.c,
+ xc/lib/Xi/XGetVers.c,
+ xc/lib/Xi/XIint.h):
+ 282. Fixing deadlock in libXi - when is called _XLockDisplay() twice -
+ when calling a Xi function that calls XGetExtensionVersion() (Bugzilla
+ #260, Bastien Nocera, Owen Taylor).
+
diff -urN xc.orig/config/imake/imake.c xc/config/imake/imake.c
--- xc.orig/config/imake/imake.c 2002-12-17 09:48:27.000000000 +1100
+++ xc/config/imake/imake.c 2003-04-09 01:58:14.000000000 +1000
@@ -562,3 +569,83 @@
}
}
return lookup;
+--- xc/lib/Xi/XGetVers.c 2002-10-16 02:37:29.000000000 +0200
++++ xc/lib/Xi/XGetVers.c 2003-07-08 13:58:15.000000000 +0200
+@@ -71,12 +71,33 @@
+ char *name;
+ #endif
+ {
++ XExtensionVersion *ext;
++
++ LockDisplay (dpy);
++ ext = _XiGetExtensionVersion (dpy, name);
++ if (ext != NoSuchExtension) { /* This is unlocked in _XiCheckExtInit() */
++ UnlockDisplay (dpy);
++ SyncHandle();
++ }
++ return (ext);
++ }
++
++XExtensionVersion
++#if NeedFunctionPrototypes
++*_XiGetExtensionVersion (
++ register Display *dpy,
++ _Xconst char *name)
++#else
++*_XiGetExtensionVersion (dpy, name)
++ register Display *dpy;
++ char *name;
++#endif
++ {
+ xGetExtensionVersionReq *req;
+ xGetExtensionVersionReply rep;
+ XExtensionVersion *ext;
+ XExtDisplayInfo *info = XInput_find_display (dpy);
+
+- LockDisplay (dpy);
+ if (_XiCheckExtInit(dpy, Dont_Check) == -1)
+ return ((XExtensionVersion *) NoSuchExtension);
+
+@@ -89,8 +110,6 @@
+
+ if (! _XReply (dpy, (xReply *) &rep, 0, xTrue))
+ {
+- UnlockDisplay(dpy);
+- SyncHandle();
+ return (XExtensionVersion *) NULL;
+ }
+ ext = (XExtensionVersion *) Xmalloc (sizeof (XExtensionVersion));
+@@ -103,8 +122,6 @@
+ ext->minor_version = rep.minor_version;
+ }
+ }
+- UnlockDisplay(dpy);
+- SyncHandle();
+ return (ext);
+ }
+
+--- xc/lib/Xi/XIint.h 2001-08-01 02:44:39.000000000 +0200
++++ xc/lib/Xi/XIint.h 2003-07-08 13:58:15.000000000 +0200
+@@ -21,4 +21,11 @@
+ #endif
+ );
+
++extern XExtensionVersion * _XiGetExtensionVersion(
++#if NeedFunctionPrototypes
++ Display*,
++ _Xconst char*
++#endif
++);
++
+ #endif
+--- xc/lib/Xi/XExtInt.c 2002-10-16 02:37:28.000000000 +0200
++++ xc/lib/Xi/XExtInt.c 2003-07-08 13:58:15.000000000 +0200
+@@ -196,7 +196,7 @@
+ return (-1);
+ }
+ ((XInputData *) info->data)->vers =
+- XGetExtensionVersion (dpy, "XInputExtension");
++ _XiGetExtensionVersion (dpy, "XInputExtension");
+ }
+
+ if (versions[version_index].major_version > Dont_Check)
Deleted: branches/4.3.0/sid/debian/patches/064_fix_Xinput_deadlock.diff
===================================================================
--- branches/4.3.0/sid/debian/patches/064_fix_Xinput_deadlock.diff 2003-10-09 20:31:16 UTC (rev 647)
+++ branches/4.3.0/sid/debian/patches/064_fix_Xinput_deadlock.diff 2003-10-11 05:37:54 UTC (rev 648)
@@ -1,89 +0,0 @@
-$Id$
-
-This patch by Bastien Nocera, reviewed by Owen Taylor.
-
-See <http://bugs.xfree86.org/cgi-bin/bugzilla/show_bug.cgi?id=260>.
-
-Hasn't appeared in XFree86 CVS as of 2003-06-26.
-
-diff -urN xc/lib/Xi/XExtInt.c xc/lib/Xi/XExtInt.c
---- xc/lib/Xi/XExtInt.c 2002-10-16 01:37:28.000000000 +0100
-+++ xc/lib/Xi/XExtInt.c 2003-06-24 00:09:49.000000000 +0100
-@@ -196,7 +196,7 @@
- return (-1);
- }
- ((XInputData *) info->data)->vers =
-- XGetExtensionVersion (dpy, "XInputExtension");
-+ _XiGetExtensionVersion (dpy, "XInputExtension");
- }
-
- if (versions[version_index].major_version > Dont_Check)
-diff -urN xc/lib/Xi/XGetVers.c xc/lib/Xi/XGetVers.c
---- xc/lib/Xi/XGetVers.c 2002-10-16 01:37:29.000000000 +0100
-+++ xc/lib/Xi/XGetVers.c 2003-06-24 18:25:10.000000000 +0100
-@@ -71,12 +71,31 @@
- char *name;
- #endif
- {
-+ XExtensionVersion *ext;
-+
-+ LockDisplay (dpy);
-+ ext = _XiGetExtensionVersion (dpy, name);
-+ UnlockDisplay (dpy);
-+ SyncHandle();
-+ return (ext);
-+ }
-+
-+XExtensionVersion
-+#if NeedFunctionPrototypes
-+*_XiGetExtensionVersion (
-+ register Display *dpy,
-+ _Xconst char *name)
-+#else
-+*_XiGetExtensionVersion (dpy, name)
-+ register Display *dpy;
-+ char *name;
-+#endif
-+ {
- xGetExtensionVersionReq *req;
- xGetExtensionVersionReply rep;
- XExtensionVersion *ext;
- XExtDisplayInfo *info = XInput_find_display (dpy);
-
-- LockDisplay (dpy);
- if (_XiCheckExtInit(dpy, Dont_Check) == -1)
- return ((XExtensionVersion *) NoSuchExtension);
-
-@@ -89,8 +108,6 @@
-
- if (! _XReply (dpy, (xReply *) &rep, 0, xTrue))
- {
-- UnlockDisplay(dpy);
-- SyncHandle();
- return (XExtensionVersion *) NULL;
- }
- ext = (XExtensionVersion *) Xmalloc (sizeof (XExtensionVersion));
-@@ -103,8 +120,6 @@
- ext->minor_version = rep.minor_version;
- }
- }
-- UnlockDisplay(dpy);
-- SyncHandle();
- return (ext);
- }
-
-diff -urN xc/lib/Xi/XIint.h xc/lib/Xi/XIint.h
---- xc/lib/Xi/XIint.h 2001-08-01 01:44:39.000000000 +0100
-+++ xc/lib/Xi/XIint.h 2003-06-24 00:09:49.000000000 +0100
-@@ -21,4 +21,11 @@
- #endif
- );
-
-+extern XExtensionVersion * _XiGetExtensionVersion(
-+#if NeedFunctionPrototypes
-+ Display*,
-+ _Xconst char*
-+#endif
-+);
-+
- #endif
Reply to: