Changeset e4e9182903c4915dd0c1e73eff6b325f0d3be54d

Show
Ignore:
Timestamp:
03/30/08 16:15:09 (5 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1206886509 +0300
git-parent:

[30267d389073ee38e29728d0246ef5106e9e1f1a]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1206885955 +0300
Message:

Do NOT destroy the "libvlc"/global/bank/whatever lock variable.

The whole point of a global lock is that it is... global. Destroying it
every time it's released is severe brain damage, as we end up taking a
different lock all the time (or worse destroying the lock while another
threads is competing for it).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/libvlc-common.c

    r68996a0 re4e9182  
    178178    } 
    179179    vlc_mutex_unlock( lockval.p_address ); 
    180     var_Destroy( p_libvlc_global, "libvlc" ); 
    181180 
    182181    /* Allocate a libvlc instance object */ 
     
    10571056    } 
    10581057    vlc_mutex_unlock( lockval.p_address ); 
    1059     var_Destroy( p_libvlc_global, "libvlc" ); 
    10601058 
    10611059    msg_Flush( p_libvlc ); 
  • src/modules/modules.c

    r30267d3 re4e9182  
    148148 
    149149    vlc_mutex_unlock( lockval.p_address ); 
    150     var_Destroy( p_libvlc_global, "libvlc" ); 
    151  
    152150} 
    153151 
     
    173171    { 
    174172        vlc_mutex_unlock( lockval.p_address ); 
    175         var_Destroy( p_libvlc_global, "libvlc" ); 
    176173        return; 
    177174    } 
     
    179176    { 
    180177        vlc_mutex_unlock( lockval.p_address ); 
    181         var_Destroy( p_libvlc_global, "libvlc" ); 
    182178        return; 
    183179    } 
    184180    vlc_mutex_unlock( lockval.p_address ); 
    185     var_Destroy( p_libvlc_global, "libvlc" ); 
    186181 
    187182    /* Save the configuration */ 
     
    262257    { 
    263258        vlc_mutex_unlock( lockval.p_address ); 
    264         var_Destroy( p_libvlc_global, "libvlc" ); 
    265259        return; 
    266260    } 
    267261    p_libvlc_global->p_module_bank->b_builtins = VLC_TRUE; 
    268262    vlc_mutex_unlock( lockval.p_address ); 
    269     var_Destroy( p_libvlc_global, "libvlc" ); 
    270263 
    271264    msg_Dbg( p_this, "checking builtin modules" ); 
     
    293286    { 
    294287        vlc_mutex_unlock( lockval.p_address ); 
    295         var_Destroy( p_libvlc_global, "libvlc" ); 
    296288        return; 
    297289    } 
    298290    p_libvlc_global->p_module_bank->b_plugins = VLC_TRUE; 
    299291    vlc_mutex_unlock( lockval.p_address ); 
    300     var_Destroy( p_libvlc_global, "libvlc" ); 
    301292 
    302293    msg_Dbg( p_this, "checking plugin modules" );