[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#433031: Fwd: broken threading on alpha, hangs uselessly on startup



Hello,

On Monday 16 July 2007 10:27:23 Simon Hausmann wrote:
> ----------  Forwarded Message  ----------
>
> Subject: broken threading on alpha, hangs uselessly on startup
> Date: Saturday 14 July 2007
> From: Fathi Boudra <fboudra@free.fr>
> To: Simon Hausmann <simon.hausmann@trolltech.com>
>
> hi simon,
>
> this a forwarded bug report for Qt4 on alpha:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=433031
>
> We have a prospective patch, but we need more eyeballs on it;
> do you know who implemented the recent changes on
> src/corelib/arch/qatomic_alpha.h ?
>
> it could be nice to forward the bug report to the right person.

I'm the guilty party that did the copy+paste error in qatomic_alpha.h :(. The 
correct patch should look like this (fetch-and-add is supposed to return the 
original value before the addition):

--- src/corelib/arch/qatomic_alpha.h Mon Jul 16 08:55:06 2007
+++ src/corelib/arch/qatomic_alpha.h Mon Jul 16 08:55:06 2007
@@ -180,7 +180,7 @@
                  : "=&r" (old), "=&r" (tmp), "+m"(*ptr)
                  : "r" (value)
                  : "memory");
-    return old != -1;
+    return old;
 }

 inline int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value)
@@ -198,7 +198,7 @@
                  : "=&r" (old), "=&r" (tmp), "+m"(*ptr)
                  : "r" (value)
                  : "memory");
-    return old != -1;
+    return old;
 }

 inline int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value)
@@ -216,7 +216,7 @@
                  : "=&r" (old), "=&r" (tmp), "+m"(*ptr)
                  : "r" (value)
                  : "memory");
-    return old != -1;
+    return old;
 }

 #else // !Q_CC_GNU

Could you give that a try and see if it works?

-- 
Bradley T. Hughes - bhughes at trolltech.com
Trolltech ASA - Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway



Reply to: