efl - evas - sw engine - donmt free spinlock because cache always needed
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 29 Mar 2016 03:09:40 +0000 (12:09 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Tue, 29 Mar 2016 03:11:10 +0000 (12:11 +0900)
never free the shm pool cache spinlock as it is alwasy needed once
initiialized. this likely fixes a bsd hardlock issues

@fix

src/modules/evas/engines/software_x11/evas_xlib_outbuf.c

index d556595acfac488c49010e8f871436e1e2b524f8..52dffd6a5da64cfa71b726c003064e147fbd5358 100644 (file)
@@ -26,6 +26,7 @@ struct _Outbuf_Region
    int              h;
 };
 
+static Eina_Bool shmpool_initted = EINA_FALSE;
 static Eina_List *shmpool = NULL;
 static int shmsize = 0;
 static int shmmemlimit = 20 * 1024 * 1024;
@@ -150,7 +151,11 @@ _clear_xob(int psync)
 void
 evas_software_xlib_outbuf_init(void)
 {
-   eina_spinlock_new(&shmpool_lock);
+   if (!shmpool_initted)
+     {
+        shmpool_initted = EINA_TRUE;
+        eina_spinlock_new(&shmpool_lock);
+     }
 }
 
 void
@@ -192,7 +197,6 @@ evas_software_xlib_outbuf_free(Outbuf *buf)
    eina_array_flush(&buf->priv.onebuf_regions);
    free(buf);
    _clear_xob(0);
-   eina_spinlock_free(&shmpool_lock);
 }
 
 Outbuf *