thread: remove vlc_cond_destroy()
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 20 Feb 2020 19:49:07 +0000 (21:49 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 21 Feb 2020 17:17:53 +0000 (19:17 +0200)
65 files changed:
include/vlc_cxx_helpers.hpp
include/vlc_threads.h
lib/media.c
lib/media_list_player.c
modules/access/dshow/dshow.cpp
modules/access/dtv/bdagraph.cpp
modules/access/http/h2conn.c
modules/access/http/h2output.c
modules/audio_output/audiotrack.c
modules/audio_output/auhal.c
modules/audio_output/directsound.c
modules/audio_output/kai.c
modules/audio_output/waveout.c
modules/codec/dmo/dmo.c
modules/codec/omxil/mediacodec.c
modules/codec/omxil/omxil_utils.h
modules/codec/omxil/utils.c
modules/codec/videotoolbox.c
modules/control/globalhotkeys/win32.c
modules/demux/adaptive/PlaylistManager.cpp
modules/demux/adaptive/http/Chunk.cpp
modules/demux/adaptive/http/Downloader.cpp
modules/demux/mkv/events.cpp
modules/gui/skins2/commands/cmd_callbacks.hpp
modules/hw/mmal/mmal_cma.c
modules/lua/extension.c
modules/lua/libs/dialog.c
modules/lua/services_discovery.c
modules/misc/audioscrobbler.c
modules/misc/fingerprinter.c
modules/services_discovery/podcast.c
modules/stream_filter/decomp.c
modules/stream_filter/hds/hds.c
modules/stream_filter/prefetch.c
modules/stream_out/sdi/DBMSDIOutput.cpp
modules/stream_out/sdi/SDIStream.cpp
modules/stream_out/transcode/encoder/video.c
modules/video_output/decklink.cpp
modules/video_output/ios.m
modules/video_output/win32/events.c
modules/video_output/win32/inhibit.c
modules/visualization/goom.c
src/clock/clock.c
src/input/decoder.c
src/input/es_out_timeshift.c
src/input/input.c
src/input/vlm.c
src/interface/dialog.c
src/libvlccore.sym
src/misc/addons.c
src/misc/background_worker.c
src/misc/fifo.c
src/misc/interrupt.c
src/misc/objects.c
src/misc/picture_pool.c
src/misc/threads.c
src/network/httpd.c
src/os2/thread.c
src/player/player.c
src/posix/timer.c
src/stream_output/sap.c
src/test/timer.c
src/video_output/control.c
src/video_output/snapshot.c
src/video_output/vout_subpictures.c

index 6717540..5c55ff0 100644 (file)
@@ -309,10 +309,6 @@ public:
     {
         vlc_cond_init( &m_cond );
     }
-    ~condition_variable()
-    {
-        vlc_cond_destroy( &m_cond );
-    }
     void signal() noexcept
     {
         vlc_cond_signal( &m_cond );
index c87eac7..d04da93 100644 (file)
@@ -457,14 +457,6 @@ VLC_API void vlc_cond_init(vlc_cond_t *);
  */
 void vlc_cond_init_daytime(vlc_cond_t *);
 
-/**
- * Deinitializes a condition variable.
- *
- * No threads shall be waiting or signaling the condition, otherwise the
- * behavior is undefined.
- */
-VLC_API void vlc_cond_destroy(vlc_cond_t *);
-
 /**
  * Wakes up one thread waiting on a condition variable.
  *
index b2277e5..c1af395 100644 (file)
@@ -562,8 +562,6 @@ void libvlc_media_release( libvlc_media_t *p_md )
 
     input_item_Release( p_md->p_input_item );
 
-    vlc_cond_destroy( &p_md->parsed_cond );
-
     /* Construct the event */
     libvlc_event_t event;
     event.type = libvlc_MediaFreed;
index 6e02a80..2e7405c 100644 (file)
@@ -497,7 +497,6 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
     return p_mlp;
 error:
     libvlc_event_manager_destroy(&p_mlp->event_manager);
-    vlc_cond_destroy(&p_mlp->seek_pending);
     free(p_mlp);
     return NULL;
 }
@@ -541,7 +540,6 @@ void libvlc_media_list_player_release(libvlc_media_list_player_t * p_mlp)
     unlock(p_mlp);
 
     libvlc_event_manager_destroy(&p_mlp->event_manager);
-    vlc_cond_destroy(&p_mlp->seek_pending);
     free(p_mlp->current_playing_item_path);
     free(p_mlp);
 }
index d977070..02871d9 100644 (file)
@@ -816,8 +816,6 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
 
     vlc_delete_all( p_sys->pp_streams );
 
-    vlc_cond_destroy( &p_sys->wait );
-
     vlc_mta_release( p_this );
 
     free( p_sys );
index 62a6133..e0d4ab2 100644 (file)
@@ -321,7 +321,6 @@ BDAOutput::BDAOutput( vlc_object_t *p_access ) :
 BDAOutput::~BDAOutput()
 {
     Empty();
-    vlc_cond_destroy( &wait );
 }
 
 void BDAOutput::Push( block_t *p_block )
index 20c7e5b..258a0c8 100644 (file)
@@ -391,7 +391,6 @@ static void vlc_h2_stream_close(struct vlc_http_stream *stream, bool aborted)
         free(f);
     }
 
-    vlc_cond_destroy(&s->recv_wait);
     free(s);
 
     if (destroy)
@@ -464,7 +463,6 @@ static struct vlc_http_stream *vlc_h2_stream_open(struct vlc_http_conn *c,
 
 error:
     vlc_mutex_unlock(&conn->lock);
-    vlc_cond_destroy(&s->recv_wait);
     free(s);
     return NULL;
 }
index 1d038ec..9d0df4c 100644 (file)
@@ -322,7 +322,6 @@ struct vlc_h2_output *vlc_h2_output_create(struct vlc_tls *tls, bool client)
                                  : vlc_h2_output_thread;
     if (vlc_clone(&out->thread, cb, out, VLC_THREAD_PRIORITY_INPUT))
     {
-        vlc_cond_destroy(&out->wait);
         free(out);
         out = NULL;
     }
@@ -339,7 +338,6 @@ void vlc_h2_output_destroy(struct vlc_h2_output *out)
     vlc_cancel(out->thread);
     vlc_join(out->thread, NULL);
 
-    vlc_cond_destroy(&out->wait);
     /* Flush queues in case the thread was terminated within poll() and some
      * packets were still queued. */
     vlc_h2_output_flush_unlocked(out);
index 683e16a..7e49388 100644 (file)
@@ -2246,7 +2246,5 @@ Close( vlc_object_t *obj )
     audio_output_t *p_aout = (audio_output_t *) obj;
     aout_sys_t *p_sys = p_aout->sys;
 
-    vlc_cond_destroy(&p_sys->aout_cond);
-    vlc_cond_destroy(&p_sys->thread_cond);
     free( p_sys );
 }
index 434de23..ab614c9 100644 (file)
@@ -878,8 +878,6 @@ out:
     if (ret != VLC_SUCCESS)
         retValue = false;
 
-    vlc_cond_destroy(&w.cond);
-
     return retValue;
 }
 
index 9f3ec04..582771d 100644 (file)
@@ -552,7 +552,6 @@ static HRESULT Stop( aout_stream_sys_t *p_sys )
     vlc_mutex_unlock( &p_sys->lock );
     vlc_cancel( p_sys->eraser_thread );
     vlc_join( p_sys->eraser_thread, NULL );
-    vlc_cond_destroy( &p_sys->cond );
 
     if( p_sys->p_notify != NULL )
     {
@@ -659,10 +658,7 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
             fmt.i_frame_length = A52_FRAME_NB;
         }
         else
-        {
-            vlc_cond_destroy(&sys->cond);
             return E_FAIL;
-        }
     }
 
     if( hr != DS_OK )
@@ -805,8 +801,6 @@ static HRESULT Start( vlc_object_t *obj, aout_stream_sys_t *sys,
     return DS_OK;
 
 error:
-    vlc_cond_destroy(&sys->cond);
-
     if( sys->p_notify != NULL )
     {
         IDirectSoundNotify_Release( sys->p_notify );
index b565619..9680293 100644 (file)
@@ -371,8 +371,6 @@ static void DestroyBuffer( audio_output_t *aout )
     aout_sys_t     *sys = aout->sys;
     audio_buffer_t *buffer = sys->buffer;
 
-    vlc_cond_destroy( &buffer->cond );
-
     free( buffer->data );
     free( buffer );
 }
index e3c06bb..936085f 100644 (file)
@@ -823,8 +823,6 @@ static void Close(vlc_object_t *obj)
     var_Destroy(aout, "waveout-audio-device");
 
     vlc_timer_destroy( sys->volume_poll_timer );
-    vlc_cond_destroy( &sys->cond );
-
     free(sys);
 }
 
index aef0710..4a7472d 100644 (file)
@@ -273,8 +273,6 @@ found:
 
     vlc_join( p_sys->thread, NULL );
 error:
-    vlc_cond_destroy( &p_sys->wait_input );
-    vlc_cond_destroy( &p_sys->wait_output );
     free( p_sys );
     return VLC_ENOMEM;
 }
@@ -293,8 +291,6 @@ static void DecoderClose( vlc_object_t *p_this )
     vlc_mutex_unlock( &p_sys->lock );
 
     vlc_join( p_sys->thread, NULL );
-    vlc_cond_destroy( &p_sys->wait_input );
-    vlc_cond_destroy( &p_sys->wait_output );
     free( p_sys );
 }
 
index ec2536d..0a269db 100644 (file)
@@ -1004,9 +1004,6 @@ static void AbortDecoderLocked(decoder_t *p_dec)
 
 static void CleanDecoder(decoder_sys_t *p_sys)
 {
-    vlc_cond_destroy(&p_sys->cond);
-    vlc_cond_destroy(&p_sys->dec_cond);
-
     StopMediaCodec(p_sys);
 
     CSDFree(p_sys);
index 6617534..beb2c40 100644 (file)
@@ -88,7 +88,7 @@ static inline OMX_TICKS ToOmxTicks(int64_t value)
          (p_fifo)->pp_last = &(p_fifo)->p_first; } while(0)
 
 #define OMX_FIFO_DESTROY(p_fifo) \
-    do { vlc_cond_destroy (&(p_fifo)->wait); } while(0)
+    while(0) { }
 
 #define OMX_FIFO_PEEK(p_fifo, p_buffer) \
          p_buffer = (p_fifo)->p_first;
index ba3de5c..c87e10d 100644 (file)
@@ -50,7 +50,7 @@ void InitOmxEventQueue(OmxEventQueue *queue)
 
 void DeinitOmxEventQueue(OmxEventQueue *queue)
 {
-    vlc_cond_destroy(&queue->cond);
+    (void) queue;
 }
 
 OMX_ERRORTYPE PostOmxEvent(OmxEventQueue *queue, OMX_EVENTTYPE event,
index 5e1bc09..274e95e 100644 (file)
@@ -1302,9 +1302,7 @@ static void StopVideoToolbox(decoder_t *p_dec, bool closing)
 
 static void pic_pacer_Destroy(void *priv)
 {
-    struct pic_pacer *pic_pacer = priv;
-
-    vlc_cond_destroy(&pic_pacer->wait);
+    (void) priv;
 }
 
 static void pic_pacer_Init(struct pic_pacer *pic_pacer, uint8_t pic_reorder_max)
index 39c34f2..18239f5 100644 (file)
@@ -79,7 +79,6 @@ static int Open( vlc_object_t *p_this )
 
     if( vlc_clone( &p_sys->thread, Thread, p_intf, VLC_THREAD_PRIORITY_LOW ) )
     {
-        vlc_cond_destroy( &p_sys->wait );
         free( p_sys );
         p_intf->p_sys = NULL;
 
@@ -93,7 +92,6 @@ static int Open( vlc_object_t *p_this )
     {
         vlc_mutex_unlock( &p_sys->lock );
         vlc_join( p_sys->thread, NULL );
-        vlc_cond_destroy( &p_sys->wait );
         free( p_sys );
         p_intf->p_sys = NULL;
 
@@ -119,7 +117,6 @@ static void Close( vlc_object_t *p_this )
     vlc_mutex_unlock( &p_sys->lock );
 
     vlc_join( p_sys->thread, NULL );
-    vlc_cond_destroy( &p_sys->wait );
     free( p_sys );
 }
 
index c0d3c9a..ce6da8e 100644 (file)
@@ -89,8 +89,6 @@ PlaylistManager::~PlaylistManager   ()
     delete playlist;
     delete logic;
     delete resources;
-    vlc_cond_destroy(&waitcond);
-    vlc_cond_destroy(&demux.cond);
 }
 
 void PlaylistManager::unsetPeriod()
index 384c640..2af20cd 100644 (file)
@@ -323,8 +323,6 @@ HTTPChunkBufferedSource::~HTTPChunkBufferedSource()
     }
     buffered = 0;
     vlc_mutex_unlock(&lock);
-
-    vlc_cond_destroy(&avail);
 }
 
 bool HTTPChunkBufferedSource::isDone() const
index f2f96c4..e62d100 100644 (file)
@@ -58,7 +58,6 @@ Downloader::~Downloader()
 
     if(thread_handle_valid)
         vlc_join(thread_handle, NULL);
-    vlc_cond_destroy(&waitcond);
 }
 void Downloader::schedule(HTTPChunkBufferedSource *source)
 {
index 0a6d700..8526545 100644 (file)
@@ -42,7 +42,6 @@ event_thread_t::event_thread_t(demux_t *p_demux) : p_demux(p_demux)
 event_thread_t::~event_thread_t()
 {
     ResetPci();
-    vlc_cond_destroy( &wait );
 }
 
 void event_thread_t::SetPci(const pci_t *data)
index 79fb556..d0433b5 100644 (file)
@@ -70,7 +70,6 @@ public:
 
     virtual ~CmdExecuteBlock()
     {
-        vlc_cond_destroy( &m_wait );
     }
 
     static void executeWait( const CmdGenericPtr& rcCommand  )
index 70567db..1b48030 100644 (file)
@@ -97,7 +97,6 @@ static void cma_pool_fixed_delete(cma_pool_fixed_t * const p)
 
     free(p->name);
 
-    vlc_cond_destroy(&p->flight_cond);
     free(p);
 
     // Inform our container that we are dead (if it cares)
index b4ea69d..9850fa3 100644 (file)
@@ -176,7 +176,6 @@ void Close_Extension( vlc_object_t *p_this )
         free( p_ext->psz_version );
         free( p_ext->p_icondata );
 
-        vlc_cond_destroy( &p_ext->p_sys->wait );
         vlc_timer_destroy( p_ext->p_sys->timer );
 
         free( p_ext->p_sys );
@@ -484,7 +483,6 @@ exit:
         free( p_ext->psz_description );
         free( p_ext->psz_shortdescription );
         free( p_ext->psz_version );
-        vlc_cond_destroy( &p_ext->p_sys->wait );
         free( p_ext->p_sys );
         free( p_ext );
     }
index 8af0409..57d3493 100644 (file)
@@ -287,7 +287,6 @@ static int vlclua_dialog_delete( lua_State *L )
     ARRAY_RESET( p_dlg->widgets );
 
     /* Note: At this point, the UI must not use these resources */
-    vlc_cond_destroy( &p_dlg->cond );
     free( p_dlg );
 
     return 1;
index 8b5aebd..3984bf3 100644 (file)
@@ -239,7 +239,6 @@ int Open_LuaSD( vlc_object_t *p_this )
     if( vlc_clone( &p_sys->thread, Run, p_sd, VLC_THREAD_PRIORITY_LOW ) )
     {
         TAB_CLEAN( p_sys->i_query, p_sys->ppsz_query );
-        vlc_cond_destroy( &p_sys->cond );
         goto error;
     }
     return VLC_SUCCESS;
@@ -267,7 +266,6 @@ void Close_LuaSD( vlc_object_t *p_this )
         free( p_sys->ppsz_query[i] );
     TAB_CLEAN( p_sys->i_query, p_sys->ppsz_query );
 
-    vlc_cond_destroy( &p_sys->cond );
     free( p_sys->psz_filename );
     lua_close( p_sys->L );
     free( p_sys );
index ce3ca41..7506488 100644 (file)
@@ -420,10 +420,7 @@ fail:
     {
         vlc_playlist_Lock(playlist);
         if (p_sys->player_listener)
-        {
-            vlc_cond_destroy(&p_sys->wait);
             vlc_player_RemoveListener(player, p_sys->player_listener);
-        }
         vlc_playlist_RemoveListener(playlist, p_sys->playlist_listener);
         vlc_playlist_Unlock(playlist);
     }
@@ -450,8 +447,6 @@ static void Close(vlc_object_t *p_this)
     vlc_UrlClean(&p_sys->p_submit_url);
     vlc_UrlClean(&p_sys->p_nowp_url);
 
-    vlc_cond_destroy(&p_sys->wait);
-
     vlc_playlist_Lock(playlist);
     vlc_player_RemoveListener(
             vlc_playlist_GetPlayer(playlist), p_sys->player_listener);
index ebf2814..c96c471 100644 (file)
@@ -302,7 +302,6 @@ static void CleanSys( fingerprinter_sys_t *p_sys )
     for ( size_t i = 0; i < vlc_array_count( &p_sys->processing.queue ); i++ )
         fingerprint_request_Delete( vlc_array_item_at_index( &p_sys->processing.queue, i ) );
     vlc_array_clear( &p_sys->processing.queue );
-    vlc_cond_destroy( &p_sys->processing.cond );
 
     for ( size_t i = 0; i < vlc_array_count( &p_sys->results.queue ); i++ )
         fingerprint_request_Delete( vlc_array_item_at_index( &p_sys->results.queue, i ) );
index e89a757..f43def9 100644 (file)
@@ -150,7 +150,6 @@ static int Open( vlc_object_t *p_this )
     {
         var_DelCallback( pl, "podcast-request", Request, p_sys );
         var_DelCallback( pl, "podcast-urls", UrlsChange, p_sys );
-        vlc_cond_destroy( &p_sys->wait );
         free (p_sys);
         return VLC_EGENERIC;
     }
@@ -171,7 +170,6 @@ static void Close( vlc_object_t *p_this )
 
     var_DelCallback( pl, "podcast-urls", UrlsChange, p_sys );
     var_DelCallback( pl, "podcast-request", Request, p_sys );
-    vlc_cond_destroy( &p_sys->wait );
 
     for( int i = 0; i < p_sys->i_urls; i++ )
          free( p_sys->ppsz_urls[i] );
index 9b76980..330f382 100644 (file)
@@ -328,7 +328,6 @@ static int Open (stream_t *stream, const char *path)
     {
         if (p_sys->pid != -1)
             while (waitpid (p_sys->pid, &(int){ 0 }, 0) == -1);
-        vlc_cond_destroy (&p_sys->wait);
         free (p_sys);
         return ret;
     }
@@ -360,7 +359,6 @@ static void Close (vlc_object_t *obj)
     while (waitpid (p_sys->pid, &status, 0) == -1);
     msg_Dbg (obj, "exit status %d", status);
 
-    vlc_cond_destroy (&p_sys->wait);
     free (p_sys);
 }
 
index 88d1e76..acdc7f9 100644 (file)
@@ -1220,11 +1220,6 @@ static void cleanup_Manifest( manifest_t *m )
         xml_ReaderDelete( m->vlc_reader );
 }
 
-static void cleanup_threading( hds_stream_t *stream )
-{
-    vlc_cond_destroy( &stream->dl_cond );
-}
-
 static void write_int_24( uint8_t *p, uint32_t val )
 {
     *p         = ( val & 0xFF0000 ) >> 16;
@@ -1535,7 +1530,6 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
                     if( !(new_stream->url = strdup( medias[i].media_url ) ) )
                     {
                         free( media_id );
-                        cleanup_threading( new_stream );
                         free( new_stream );
                         return VLC_ENOMEM;
                     }
@@ -1548,7 +1542,6 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
                     {
                         free( new_stream->url );
                         free( media_id );
-                        cleanup_threading( new_stream );
                         free( new_stream );
                         return VLC_ENOMEM;
                     }
@@ -1586,7 +1579,6 @@ static int parse_Manifest( stream_t *s, manifest_t *m )
                         free( new_stream->metadata );
                         free( new_stream->url );
                         free( media_id );
-                        cleanup_threading( new_stream );
                         free( new_stream );
                         return VLC_ENOMEM;
                     }
@@ -1617,8 +1609,6 @@ static void hds_free( hds_stream_t *p_stream )
 
     FREENULL( p_stream->abst_url );
 
-    cleanup_threading( p_stream );
-
     FREENULL( p_stream->metadata );
     FREENULL( p_stream->url );
     FREENULL( p_stream->movie_id );
index 01b7e2c..3a28b9f 100644 (file)
@@ -494,8 +494,6 @@ static int Open(vlc_object_t *obj)
 
     if (vlc_clone(&sys->thread, Thread, stream, VLC_THREAD_PRIORITY_LOW))
     {
-        vlc_cond_destroy(&sys->wait_space);
-        vlc_cond_destroy(&sys->wait_data);
         vlc_interrupt_destroy(sys->interrupt);
         goto error;
     }
@@ -526,8 +524,6 @@ static void Close (vlc_object_t *obj)
     vlc_interrupt_kill(sys->interrupt);
     vlc_join(sys->thread, NULL);
     vlc_interrupt_destroy(sys->interrupt);
-    vlc_cond_destroy(&sys->wait_space);
-    vlc_cond_destroy(&sys->wait_data);
 
     while(sys->controls)
     {
index 9c56b8f..abd2559 100644 (file)
@@ -90,8 +90,6 @@ DBMSDIOutput::~DBMSDIOutput()
     }
     if(p_card)
         p_card->Release();
-
-    vlc_cond_destroy(&feeder.cond);
 }
 
 AbstractStream *DBMSDIOutput::Add(const es_format_t *fmt)
index 0e728c3..ce4588d 100644 (file)
@@ -236,7 +236,6 @@ AbstractDecodedStream::~AbstractDecodedStream()
     Flush();
     deinit();
     es_format_Clean(&requestedoutput);
-    vlc_cond_destroy(&inputWait);
 }
 
 void AbstractDecodedStream::deinit()
index a3a031d..4de9f39 100644 (file)
@@ -442,8 +442,6 @@ void transcode_encoder_video_close( transcode_encoder_t *p_enc )
     /* Close encoder */
     module_unneed( p_enc->p_encoder, p_enc->p_encoder->p_module );
     p_enc->p_encoder->p_module = NULL;
-
-    vlc_cond_destroy( &p_enc->cond );
 }
 
 int transcode_encoder_video_open( transcode_encoder_t *p_enc,
@@ -472,7 +470,6 @@ int transcode_encoder_video_open( transcode_encoder_t *p_enc,
     {
         if( vlc_clone( &p_enc->thread, EncoderThread, p_enc, p_cfg->video.threads.i_priority ) )
         {
-            vlc_cond_destroy( &p_enc->cond );
             module_unneed( p_enc->p_encoder, p_enc->p_encoder->p_module );
             p_enc->p_encoder->p_module = NULL;
             return VLC_EGENERIC;
index 3c7c85e..d5049e8 100644 (file)
@@ -351,7 +351,6 @@ static void ReleaseDLSys(vlc_object_t *obj, int i_cat)
 
     if (--sys->users == 0) {
         msg_Dbg(obj, "Destroying decklink data");
-        vlc_cond_destroy(&sys->cond);
 
         if (sys->p_output) {
             sys->p_output->StopScheduledPlayback(0, NULL, 0);
index 5c273de..ad11b6a 100644 (file)
@@ -507,7 +507,6 @@ static void GLESSwap(vlc_gl_t *gl)
 
 - (void)dealloc
 {
-    vlc_cond_destroy(&_gl_attached_wait);
     [super dealloc];
 }
 
index 15da61d..9cc449f 100644 (file)
@@ -166,7 +166,6 @@ event_thread_t *EventThreadCreate( vlc_object_t *obj, vout_window_t *parent_wind
 
 void EventThreadDestroy( event_thread_t *p_event )
 {
-    vlc_cond_destroy( &p_event->wait );
     free( p_event );
 }
 
index c1d3199..8bd7604 100644 (file)
@@ -88,7 +88,6 @@ static void CloseInhibit (vlc_object_t *obj)
     vlc_inhibit_sys_t* sys = ih->p_sys;
     vlc_cancel(sys->thread);
     vlc_join(sys->thread, NULL);
-    vlc_cond_destroy(&sys->cond);
 }
 
 static int OpenInhibit (vlc_object_t *obj)
@@ -105,10 +104,7 @@ static int OpenInhibit (vlc_object_t *obj)
 
     /* SetThreadExecutionState always needs to be called from the same thread */
     if (vlc_clone(&sys->thread, Run, ih, VLC_THREAD_PRIORITY_LOW))
-    {
-        vlc_cond_destroy(&sys->cond);
         return VLC_EGENERIC;
-    }
 
     ih->inhibit = Inhibit;
     return VLC_SUCCESS;
index a9b225f..fa8f2cc 100644 (file)
@@ -147,7 +147,6 @@ static int Open( vlc_object_t *p_this )
                    Thread, p_thread, VLC_THREAD_PRIORITY_LOW ) )
     {
         msg_Err( p_filter, "cannot launch goom thread" );
-        vlc_cond_destroy( &p_thread->wait );
         vout_Close( p_thread->p_vout );
         free( p_thread );
         return VLC_EGENERIC;
@@ -352,7 +351,6 @@ static void Close( vlc_object_t *p_this )
 
     /* Free data */
     vout_Close( p_thread->p_vout );
-    vlc_cond_destroy( &p_thread->wait );
 
     while( p_thread->i_blocks-- )
     {
index 8637d82..f373460 100644 (file)
@@ -469,7 +469,6 @@ void vlc_clock_main_ChangePause(vlc_clock_main_t *main_clock, vlc_tick_t now,
 
 void vlc_clock_main_Delete(vlc_clock_main_t *main_clock)
 {
-    vlc_cond_destroy(&main_clock->cond);
     assert(main_clock->rc == 1);
     free(main_clock);
 }
index fd2e6aa..d868c21 100644 (file)
@@ -2039,10 +2039,6 @@ static void DeleteDecoder( decoder_t * p_dec )
         vlc_meta_Delete( p_owner->p_description );
 
     decoder_Destroy( p_owner->p_packetizer );
-
-    vlc_cond_destroy( &p_owner->wait_fifo );
-    vlc_cond_destroy( &p_owner->wait_acknowledge );
-    vlc_cond_destroy( &p_owner->wait_request );
     decoder_Destroy( &p_owner->dec );
 }
 
index bfdb930..ff43fe1 100644 (file)
@@ -782,7 +782,6 @@ static const struct es_out_callbacks es_out_timeshift_cbs =
  *****************************************************************************/
 static void TsDestroy( ts_thread_t *p_ts )
 {
-    vlc_cond_destroy( &p_ts->wait );
     free( p_ts );
 }
 static int TsStart( es_out_t *p_out )
index bb57eb4..1ee3a3c 100644 (file)
@@ -438,7 +438,6 @@ static void Destroy(input_thread_t *input)
         ControlRelease(ctrl->i_type, &ctrl->param);
     }
 
-    vlc_cond_destroy(&priv->wait_control);
     vlc_object_delete(VLC_OBJECT(input));
 }
 
index d33b9a9..852c91f 100644 (file)
@@ -178,7 +178,6 @@ vlm_t *vlm_New( libvlc_int_t *libvlc, const char *psz_vlmconf )
 
     if( vlc_clone( &p_vlm->thread, Manage, p_vlm, VLC_THREAD_PRIORITY_LOW ) )
     {
-        vlc_cond_destroy( &p_vlm->wait_manage );
         vlc_object_delete(p_vlm);
         vlc_mutex_unlock( &vlm_mutex );
         return NULL;
@@ -253,8 +252,6 @@ void vlm_Delete( vlm_t *p_vlm )
     vlc_mutex_unlock( &vlm_mutex );
 
     vlc_join( p_vlm->thread, NULL );
-
-    vlc_cond_destroy( &p_vlm->wait_manage );
     vlc_object_delete(p_vlm);
 }
 
index c761bd0..68a1c1c 100644 (file)
@@ -140,7 +140,6 @@ dialog_id_release(vlc_dialog_id *p_id)
         free(p_id->answer.u.login.psz_password);
     }
     free(p_id->psz_progress_text);
-    vlc_cond_destroy(&p_id->wait);
     free(p_id);
 }
 
index 1a7d480..e31d0e4 100644 (file)
@@ -488,7 +488,6 @@ VLC_CompileBy
 VLC_CompileHost
 VLC_Compiler
 vlc_cond_broadcast
-vlc_cond_destroy
 vlc_cond_init
 vlc_cond_signal
 vlc_cond_timedwait
index a7a3414..49a0f32 100644 (file)
@@ -198,7 +198,6 @@ void addons_manager_Delete( addons_manager_t *p_manager )
     ARRAY_FOREACH( p_entry, p_manager->p_priv->name.entries )\
         addon_entry_Release( p_entry );\
     ARRAY_RESET( p_manager->p_priv->name.entries );\
-    vlc_cond_destroy( &p_manager->p_priv->name.waitcond );\
     vlc_interrupt_destroy( p_manager->p_priv->name.p_interrupt );
 
     FREE_QUEUE( finder )
index 4bba9e0..a2436dd 100644 (file)
@@ -143,7 +143,6 @@ background_thread_Create(struct background_worker *owner)
 
 static void background_thread_Destroy(struct background_thread *thread)
 {
-    vlc_cond_destroy(&thread->probe_cancel_wait);
     free(thread);
 }
 
@@ -170,7 +169,6 @@ static struct background_worker *background_worker_Create(void *owner,
 
 static void background_worker_Destroy(struct background_worker *worker)
 {
-    vlc_cond_destroy(&worker->queue_wait);
     free(worker);
 }
 
index 836f29d..1d060bb 100644 (file)
@@ -161,7 +161,6 @@ block_fifo_t *block_FifoNew( void )
 void block_FifoRelease( block_fifo_t *p_fifo )
 {
     block_ChainRelease( p_fifo->p_first );
-    vlc_cond_destroy( &p_fifo->wait );
     free( p_fifo );
 }
 
index f272b6e..ef5fb49 100644 (file)
@@ -221,7 +221,6 @@ static void vlc_mwait_i11e_cleanup(void *opaque)
 
     vlc_mutex_unlock(&ctx->lock);
     vlc_interrupt_finish(ctx);
-    vlc_cond_destroy(cond);
 }
 
 int vlc_mwait_i11e(vlc_tick_t deadline)
@@ -242,9 +241,7 @@ int vlc_mwait_i11e(vlc_tick_t deadline)
     vlc_cleanup_pop();
     vlc_mutex_unlock(&ctx->lock);
 
-    int ret = vlc_interrupt_finish(ctx);
-    vlc_cond_destroy(&wait);
-    return ret;
+    return vlc_interrupt_finish(ctx);
 }
 
 static void vlc_interrupt_forward_wake(void *opaque)
index f7e68c4..7b15ae9 100644 (file)
@@ -128,7 +128,6 @@ void vlc_object_deinit(vlc_object_t *obj)
     var_DestroyAll(obj);
     vlc_restorecancel(canc);
 
-    vlc_cond_destroy(&priv->var_wait);
     free(priv);
 }
 
index 9190af9..5f0f41e 100644 (file)
@@ -55,7 +55,6 @@ static void picture_pool_Destroy(picture_pool_t *pool)
         return;
 
     atomic_thread_fence(memory_order_acquire);
-    vlc_cond_destroy(&pool->wait);
     aligned_free(pool);
 }
 
index 7bde716..2976b01 100644 (file)
@@ -233,11 +233,6 @@ void vlc_cond_init_daytime(vlc_cond_t *cond)
     vlc_cond_init(cond);
 }
 
-void vlc_cond_destroy(vlc_cond_t *cond)
-{
-    assert(cond->head == NULL);
-}
-
 struct vlc_cond_waiter {
     struct vlc_cond_waiter **pprev, *next;
     atomic_uint value;
@@ -416,7 +411,7 @@ void vlc_rwlock_init (vlc_rwlock_t *lock)
 
 void vlc_rwlock_destroy (vlc_rwlock_t *lock)
 {
-    vlc_cond_destroy (&lock->wait);
+    (void) lock;
 }
 
 void vlc_rwlock_rdlock (vlc_rwlock_t *lock)
index 177abcc..1cb58bb 100644 (file)
@@ -991,7 +991,6 @@ error:
 
     if (host) {
         net_ListenClose(host->fds);
-        vlc_cond_destroy(&host->wait);
         vlc_object_delete(host);
     }
 
@@ -1027,7 +1026,6 @@ void httpd_HostDelete(httpd_host_t *host)
     assert(vlc_list_is_empty(&host->urls));
     vlc_tls_ServerDelete(host->p_tls);
     net_ListenClose(host->fds);
-    vlc_cond_destroy(&host->wait);
     vlc_object_delete(host);
     vlc_mutex_unlock(&httpd.mutex);
 }
index d7d07f6..b732e9f 100644 (file)
@@ -159,7 +159,6 @@ unsigned long _System _DLL_InitTerm(unsigned long hmod, unsigned long flag)
         case 1 :    /* Termination */
             vlc_rwlock_destroy (&config_lock);
             vlc_threadvar_delete (&thread_key);
-            vlc_cond_destroy (&super_variable);
 
             _CRT_term();
 
index 6eedc71..8d92bd9 100644 (file)
@@ -1840,13 +1840,6 @@ vlc_player_InitLocks(vlc_player_t *player, enum vlc_player_lock_type lock_type)
     vlc_cond_init(&player->destructor.wait);
 }
 
-static void
-vlc_player_DestroyLocks(vlc_player_t *player)
-{
-    vlc_cond_destroy(&player->start_delay_cond);
-    vlc_cond_destroy(&player->destructor.wait);
-}
-
 void
 vlc_player_Delete(vlc_player_t *player)
 {
@@ -1871,8 +1864,6 @@ vlc_player_Delete(vlc_player_t *player)
     if (player->next_media)
         input_item_Release(player->next_media);
 
-    vlc_player_DestroyLocks(player);
-
     vlc_player_DestroyTimer(player);
 
     vlc_player_aout_DelCallbacks(player);
@@ -1976,7 +1967,6 @@ vlc_player_New(vlc_object_t *parent, enum vlc_player_lock_type lock_type,
     if (vlc_clone(&player->destructor.thread, vlc_player_destructor_Thread,
                   player, VLC_THREAD_PRIORITY_LOW) != 0)
     {
-        vlc_player_DestroyLocks(player);
         vlc_player_DestroyTimer(player);
         goto error;
     }
index f84f17c..d88df7d 100644 (file)
@@ -121,7 +121,6 @@ int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
     if (vlc_clone (&timer->thread, vlc_timer_thread, timer,
                    VLC_THREAD_PRIORITY_INPUT))
     {
-        vlc_cond_destroy (&timer->reschedule);
         free (timer);
         return ENOMEM;
     }
@@ -138,7 +137,6 @@ void vlc_timer_destroy (vlc_timer_t timer)
     vlc_mutex_unlock(&timer->lock);
 
     vlc_join (timer->thread, NULL);
-    vlc_cond_destroy (&timer->reschedule);
     free (timer);
 }
 
index de8040c..0e699fa 100644 (file)
@@ -108,7 +108,6 @@ static sap_address_t *AddressCreate (vlc_object_t *obj, const char *group)
 
 static void AddressDestroy (sap_address_t *addr)
 {
-    vlc_cond_destroy (&addr->wait);
     net_Close (addr->fd);
     free (addr);
 }
index 6b40c30..a071bd9 100644 (file)
@@ -107,6 +107,5 @@ int main (void)
     assert(ts >= VLC_TICK_FROM_MS(200));
 
     vlc_timer_destroy (data.timer);
-    vlc_cond_destroy (&data.wait);
     return 0;
 }
index c149310..d8da02f 100644 (file)
@@ -68,9 +68,6 @@ void vout_control_Clean(vout_control_t *ctrl)
         vout_control_cmd_Clean(&cmd);
     }
     ARRAY_RESET(ctrl->cmd);
-
-    vlc_cond_destroy(&ctrl->wait_request);
-    vlc_cond_destroy(&ctrl->wait_available);
 }
 
 void vout_control_Dead(vout_control_t *ctrl)
index b18297c..2ee2d55 100644 (file)
@@ -77,7 +77,6 @@ void vout_snapshot_Destroy(vout_snapshot_t *snap)
         picture = next;
     }
 
-    vlc_cond_destroy(&snap->wait);
     free(snap);
 }
 
index 2a4a79a..5a67f06 100644 (file)
@@ -1609,8 +1609,6 @@ static void spu_Cleanup(spu_t *spu)
 
     vlc_vector_destroy(&sys->channels);
 
-    vlc_cond_destroy(&sys->prerender.cond);
-    vlc_cond_destroy(&sys->prerender.output_cond);
     vlc_vector_clear(&sys->prerender.vector);
     video_format_Clean(&sys->prerender.fmtdst);
     video_format_Clean(&sys->prerender.fmtsrc);