Commit ef5bbdcb authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove vlc_cleanup_run()

parent 901fa0d6
...@@ -659,7 +659,7 @@ VLC_API void vlc_restorecancel(int state); ...@@ -659,7 +659,7 @@ VLC_API void vlc_restorecancel(int state);
* Internal handler for thread cancellation. * Internal handler for thread cancellation.
* *
* Do not call this function directly. Use wrapper macros instead: * Do not call this function directly. Use wrapper macros instead:
* vlc_cleanup_push(), vlc_cleanup_pop(), vlc_cleanup_run(). * vlc_cleanup_push(), vlc_cleanup_pop().
*/ */
VLC_API void vlc_control_cancel(int cmd, ...); VLC_API void vlc_control_cancel(int cmd, ...);
...@@ -830,7 +830,7 @@ VLC_API unsigned vlc_GetCPUCount(void); ...@@ -830,7 +830,7 @@ VLC_API unsigned vlc_GetCPUCount(void);
* they are handled in last-in first-out order. * they are handled in last-in first-out order.
* *
* \note Any call to vlc_cleanup_push() <b>must</b> paired with a call to * \note Any call to vlc_cleanup_push() <b>must</b> paired with a call to
* either vlc_cleanup_pop() or vlc_cleanup_run(). * vlc_cleanup_pop().
* \warning Branching into or out of the block between these two function calls * \warning Branching into or out of the block between these two function calls
* is not allowed (read: it will likely crash the whole process). * is not allowed (read: it will likely crash the whole process).
* *
...@@ -847,14 +847,6 @@ VLC_API unsigned vlc_GetCPUCount(void); ...@@ -847,14 +847,6 @@ VLC_API unsigned vlc_GetCPUCount(void);
*/ */
# define vlc_cleanup_pop( ) pthread_cleanup_pop (0) # define vlc_cleanup_pop( ) pthread_cleanup_pop (0)
/**
* Unregisters a cancellation handler and run it.
*
* This pops the last cancellation handler (like vlc_cleanup_pop()), but
* additionally executes it.
*/
# define vlc_cleanup_run( ) pthread_cleanup_pop (1)
#else #else
enum enum
{ {
...@@ -882,11 +874,6 @@ struct vlc_cleanup_t ...@@ -882,11 +874,6 @@ struct vlc_cleanup_t
vlc_control_cancel (VLC_CLEANUP_POP); \ vlc_control_cancel (VLC_CLEANUP_POP); \
} while (0) } while (0)
# define vlc_cleanup_run( ) \
vlc_control_cancel (VLC_CLEANUP_POP); \
vlc_cleanup_data.proc (vlc_cleanup_data.data); \
} while (0)
#endif /* !LIBVLC_USE_PTHREAD_CLEANUP */ #endif /* !LIBVLC_USE_PTHREAD_CLEANUP */
static inline void vlc_cleanup_lock (void *lock) static inline void vlc_cleanup_lock (void *lock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment