All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e
@ 2013-08-12 22:12 Eric Nelson
  2013-08-13  1:19 ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Nelson @ 2013-08-12 22:12 UTC (permalink / raw)
  To: meta-freescale; +Cc: neil

This patch adds a patch for Qt-Embedded to only
destroy semaphores in the process which created
them.

Original patch by Neil Jerram for the OpenMoko project:
	http://lists.openmoko.org/pipermail/community/2012-November/067806.html

See also Bug 31254:
	https://bugreports.qt-project.org/browse/QTBUG-31254

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 recipes-qt/qt4/qt4-embedded_4.8.5.bbappend         | 10 ++-
 ...-Only-destroy-semaphores-in-process-owner.patch | 77 ++++++++++++++++++++++
 2 files changed, 85 insertions(+), 2 deletions(-)
 create mode 100644 recipes-qt/qt4/qt4/0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch

diff --git a/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend b/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
index 4c4d0c9..05a6925 100644
--- a/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
+++ b/recipes-qt/qt4/qt4-embedded_4.8.5.bbappend
@@ -1,8 +1,14 @@
 #Freescale
 FILESEXTRAPATHS_prepend := "${THISDIR}/qt4:"
 
-SRC_URI_append_mx5 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch"
-SRC_URI_append_mx6 += "file://0001-Add-support-for-i.MX-codecs-to-phonon.patch"
+SRC_URI_append_mx5 += "\
+       file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \
+       file://0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch \
+"
+SRC_URI_append_mx6 += "\
+       file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \
+       file://0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch \
+"
 
 DEPENDS_append_mx5 = " virtual/kernel virtual/libgles2"
 PACKAGE_ARCH_mx5 = "${MACHINE_ARCH}"
diff --git a/recipes-qt/qt4/qt4/0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch b/recipes-qt/qt4/qt4/0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch
new file mode 100644
index 0000000..d67a746
--- /dev/null
+++ b/recipes-qt/qt4/qt4/0001-QWSLock-Only-destroy-semaphores-in-process-owner.patch
@@ -0,0 +1,77 @@
+From 9af565935d16ecf8a8c04b5ea850ddb34a7c1294 Mon Sep 17 00:00:00 2001
+From: Eric Nelson <eric.nelson@boundarydevices.com>
+Date: Mon, 12 Aug 2013 11:54:05 -0700
+Subject: [PATCH] QWSLock: Only destroy semaphores in process owner
+
+This fixes the case when QT_POSIX_IPC is not defined.
+
+Original patch by Neil Jerram for the OpenMoko project:
+	http://lists.openmoko.org/pipermail/community/2012-November/067806.html
+
+See also Bug 31254:
+	https://bugreports.qt-project.org/browse/QTBUG-31254
+
+Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
+---
+ src/gui/embedded/qwslock.cpp | 13 +++++++++----
+ src/gui/embedded/qwslock_p.h |  2 +-
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/src/gui/embedded/qwslock.cpp b/src/gui/embedded/qwslock.cpp
+index 3f8f306..cd6a48d 100644
+--- a/src/gui/embedded/qwslock.cpp
++++ b/src/gui/embedded/qwslock.cpp
+@@ -83,9 +83,12 @@ QWSLock::QWSLock(int id) : semId(id)
+     QWSSignalHandler::instance()->addWSLock(this);
+ #endif
+ 
++    owned = false;
++
+ #ifndef QT_POSIX_IPC
+     if (semId == -1) {
+         semId = semget(IPC_PRIVATE, 3, IPC_CREAT | 0666);
++        owned = true;
+         if (semId == -1) {
+             perror("QWSLock::QWSLock");
+             qFatal("Unable to create semaphore");
+@@ -100,7 +103,6 @@ QWSLock::QWSLock(int id) : semId(id)
+     }
+ #else
+     sems[0] = sems[1] = sems[2] = SEM_FAILED;
+-    owned = false;
+ 
+     if (semId == -1) {
+         // ### generate really unique IDs
+@@ -134,9 +136,12 @@ QWSLock::~QWSLock()
+ 
+     if (semId != -1) {
+ #ifndef QT_POSIX_IPC
+-        qt_semun semval;
+-        semval.val = 0;
+-        semctl(semId, 0, IPC_RMID, semval);
++
++        if (owned) {
++            qt_semun semval;
++            semval.val = 0;
++            semctl(semId, 0, IPC_RMID, semval);
++        }
+         semId = -1;
+ #else
+         // emulate the SEM_UNDO behavior for the BackingStore lock
+diff --git a/src/gui/embedded/qwslock_p.h b/src/gui/embedded/qwslock_p.h
+index ead7b89..d16b3d5 100644
+--- a/src/gui/embedded/qwslock_p.h
++++ b/src/gui/embedded/qwslock_p.h
+@@ -86,8 +86,8 @@ private:
+     int lockCount[2];
+ #ifdef QT_POSIX_IPC
+     sem_t *sems[3];
+-    bool owned;
+ #endif
++    bool owned;
+ };
+ 
+ QT_END_NAMESPACE
+-- 
+1.8.1.2
+
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e
  2013-08-12 22:12 [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e Eric Nelson
@ 2013-08-13  1:19 ` Otavio Salvador
  2013-08-16 23:12   ` Eric Nelson
  0 siblings, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2013-08-13  1:19 UTC (permalink / raw)
  To: Eric Nelson; +Cc: meta-freescale, neil

On Mon, Aug 12, 2013 at 7:12 PM, Eric Nelson
<eric.nelson@boundarydevices.com> wrote:
> This patch adds a patch for Qt-Embedded to only
> destroy semaphores in the process which created
> them.
>
> Original patch by Neil Jerram for the OpenMoko project:
>         http://lists.openmoko.org/pipermail/community/2012-November/067806.html
>
> See also Bug 31254:
>         https://bugreports.qt-project.org/browse/QTBUG-31254
>
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>

I agree with the change but this should be send against OE-Core as it
is not BSP specific. Please patch the QtE recipe there.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e
  2013-08-13  1:19 ` Otavio Salvador
@ 2013-08-16 23:12   ` Eric Nelson
  2013-08-17  2:19     ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Nelson @ 2013-08-16 23:12 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale, neil

On 08/12/2013 06:19 PM, Otavio Salvador wrote:
> On Mon, Aug 12, 2013 at 7:12 PM, Eric Nelson
> <eric.nelson@boundarydevices.com> wrote:
>> This patch adds a patch for Qt-Embedded to only
>> destroy semaphores in the process which created
>> them.
>>
>> Original patch by Neil Jerram for the OpenMoko project:
>>          http://lists.openmoko.org/pipermail/community/2012-November/067806.html
>>
>> See also Bug 31254:
>>          https://bugreports.qt-project.org/browse/QTBUG-31254
>>
>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>
> I agree with the change but this should be send against OE-Core as it
> is not BSP specific. Please patch the QtE recipe there.
>

Thanks again for the advice, Otavio.

I'll send this up-stream as soon as I get out from under water and
figure out where it goes.

BTW, I have another patch for Qt-embedded that applies to the media
player integration in Rogerio Pimentel's patch.

I presume that this is the right list for that.

Please confirm,


Eric


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e
  2013-08-16 23:12   ` Eric Nelson
@ 2013-08-17  2:19     ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2013-08-17  2:19 UTC (permalink / raw)
  To: Eric Nelson; +Cc: meta-freescale, neil

On Fri, Aug 16, 2013 at 8:12 PM, Eric Nelson
<eric.nelson@boundarydevices.com> wrote:
> On 08/12/2013 06:19 PM, Otavio Salvador wrote:
>>
>> On Mon, Aug 12, 2013 at 7:12 PM, Eric Nelson
>> <eric.nelson@boundarydevices.com> wrote:
>>>
>>> This patch adds a patch for Qt-Embedded to only
>>> destroy semaphores in the process which created
>>> them.
>>>
>>> Original patch by Neil Jerram for the OpenMoko project:
>>>
>>> http://lists.openmoko.org/pipermail/community/2012-November/067806.html
>>>
>>> See also Bug 31254:
>>>          https://bugreports.qt-project.org/browse/QTBUG-31254
>>>
>>> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
>>
>>
>> I agree with the change but this should be send against OE-Core as it
>> is not BSP specific. Please patch the QtE recipe there.
>>
>
> Thanks again for the advice, Otavio.
>
> I'll send this up-stream as soon as I get out from under water and
> figure out where it goes.

Great :-)

> BTW, I have another patch for Qt-embedded that applies to the media
> player integration in Rogerio Pimentel's patch.
>
> I presume that this is the right list for that.
>
> Please confirm,

Absolutely! :-) I am looking forward to your patches :-)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-17  2:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12 22:12 [meta-fsl-arm][PATCH] recipes-qt: add fix for QWSLock on qt4e Eric Nelson
2013-08-13  1:19 ` Otavio Salvador
2013-08-16 23:12   ` Eric Nelson
2013-08-17  2:19     ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.