Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
8fd6167a
Commit
8fd6167a
authored
May 19, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Following vlc_object_kill(), add vlc_object_dying()
parent
3c5ed2fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
include/vlc_objects.h
include/vlc_objects.h
+2
-0
include/vlc_threads_funcs.h
include/vlc_threads_funcs.h
+7
-0
src/misc/objects.c
src/misc/objects.c
+17
-0
No files found.
include/vlc_objects.h
View file @
8fd6167a
...
...
@@ -97,6 +97,8 @@ struct vlc_object_t
VLC_EXPORT
(
void
*
,
__vlc_object_create
,
(
vlc_object_t
*
,
int
)
);
VLC_EXPORT
(
void
,
__vlc_object_destroy
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_kill
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
vlc_bool_t
,
__vlc_object_dying_unlocked
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
vlc_bool_t
,
__vlc_object_dying
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_attach
,
(
vlc_object_t
*
,
vlc_object_t
*
)
);
VLC_EXPORT
(
void
,
__vlc_object_detach
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
void
*
,
__vlc_object_get
,
(
vlc_object_t
*
,
int
)
);
...
...
include/vlc_threads_funcs.h
View file @
8fd6167a
...
...
@@ -122,6 +122,9 @@ static inline int __vlc_mutex_lock( const char * psz_file, int i_line,
}
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
# define vlc_assert_locked( m ) \
assert (pthread_mutex_lock (&((m)->mutex)) == EDEADLK)
i_result
=
pthread_mutex_lock
(
&
p_mutex
->
mutex
);
if
(
i_result
)
{
...
...
@@ -144,6 +147,10 @@ static inline int __vlc_mutex_lock( const char * psz_file, int i_line,
return
i_result
;
}
#ifndef vlc_assert_locked
# define vlc_assert_locked( m ) (void)0
#endif
/*****************************************************************************
* vlc_mutex_unlock: unlock a mutex
*****************************************************************************/
...
...
src/misc/objects.c
View file @
8fd6167a
...
...
@@ -438,6 +438,23 @@ void __vlc_object_kill( vlc_object_t *p_this )
}
vlc_bool_t
__vlc_object_dying_unlocked
(
vlc_object_t
*
p_this
)
{
vlc_assert_locked
(
&
p_this
->
object_lock
);
return
p_this
->
b_die
;
}
vlc_bool_t
__vlc_object_dying
(
vlc_object_t
*
p_this
)
{
vlc_bool_t
b
;
vlc_mutex_lock
(
&
p_this
->
object_lock
);
b
=
__vlc_object_dying_unlocked
(
p_this
);
vlc_mutex_unlock
(
&
p_this
->
object_lock
);
return
b
;
}
/**
* find an object given its ID
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment