what about eina_file_win32.c ?

Vincent

On Wed, Mar 14, 2012 at 4:35 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> eina: fix dead lock issue. This is hidding a bug with eina_hash_pointer_new.
>
>
> Author:       cedric
> Date:         2012-03-14 08:35:12 -0700 (Wed, 14 Mar 2012)
> New Revision: 69338
> Trac:         http://trac.enlightenment.org/e/changeset/69338
>
> Modified:
>  trunk/eina/src/lib/eina_file.c
>
> Modified: trunk/eina/src/lib/eina_file.c
> ===================================================================
> --- trunk/eina/src/lib/eina_file.c      2012-03-14 13:22:20 UTC (rev 69337)
> +++ trunk/eina/src/lib/eina_file.c      2012-03-14 15:35:12 UTC (rev 69338)
> @@ -1058,7 +1058,7 @@
>
>    eina_hash_del(_eina_file_cache, file->filename, file);
>    _eina_file_real_close(file);
> -
> +
>    eina_lock_release(&_eina_file_lock_cache);
>  }
>
> @@ -1225,7 +1225,7 @@
>         unsigned long int key[2];
>
>         em = eina_hash_find(file->rmap, &map);
> -        if (!em) return ;
> +        if (!em) goto on_exit;
>
>         em->refcount--;
>
> @@ -1246,17 +1246,25 @@
>  eina_file_map_faulted(Eina_File *file, void *map)
>  {
>    Eina_File_Map *em;
> +   Eina_Bool r = EINA_FALSE;
>
>    EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
>
>    eina_lock_take(&file->lock);
>
> -   if (file->global_map == map) return file->global_faulty;
> +   if (file->global_map == map)
> +     {
> +        r = file->global_faulty;
> +     }
> +   else
> +     {
> +        em = eina_hash_find(file->rmap, &map);
> +        if (em) r = em->faulty;
> +     }
>
> -   em = eina_hash_find(file->rmap, &map);
> -   if (!em) return EINA_FALSE;
> +   eina_lock_release(&file->lock);
>
> -   return em->faulty;
> +   return r;
>  }
>
>  EAPI Eina_Iterator *
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to