aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics/directfb/directfb/fusion.patch
blob: 1f81a6796ce97239d88a2c1cf9ac48d51fc0e117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
directfb: Fix for hangs in direct_test, fusion_skirmish on exit

Upstream-Status: Pending
Signed-off-by: Lauren Post <lauren.post@freescale.com>

--- a/lib/fusion/fusion.c	2013-01-18 22:57:11.000000000 +0800
+++ b/lib/fusion/fusion.c	2013-07-04 10:42:56.502699119 +0800
@@ -2853,9 +2853,14 @@
           direct_mutex_lock( &world->event_dispatcher_mutex );
 
           while (1) {
-               if (!world->event_dispatcher_buffers)
+               if (!world->event_dispatcher_buffers){
                     direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
-
+                    if (world->dispatch_stop) {
+                         D_DEBUG_AT( Fusion_Main_Dispatch, "  -> IGNORING (dispatch_stop!)\n" );
+                         direct_mutex_unlock( &world->event_dispatcher_mutex );
+                         return NULL;
+                    }
+               }
                buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;
                D_MAGIC_ASSERT( buf, FusionEventDispatcherBuffer );
 
@@ -2872,6 +2877,11 @@
 //D_INFO("waiting...\n");
                     D_ASSERT( buf->read_pos == buf->write_pos );
                     direct_waitqueue_wait( &world->event_dispatcher_cond, &world->event_dispatcher_mutex );
+		      if (world->dispatch_stop) {
+                         D_DEBUG_AT( Fusion_Main_Dispatch, "  -> IGNORING (dispatch_stop!)\n" );
+                         direct_mutex_unlock( &world->event_dispatcher_mutex );
+                         return NULL;
+                    }
                }
 
                buf = (FusionEventDispatcherBuffer *)world->event_dispatcher_buffers;