Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f38e00c9
Commit
f38e00c9
authored
Jan 14, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove vlc_thread_create
By the way, its earlier (<= 0.8.6) incarnation were buggy.
parent
db37d62c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
43 deletions
+1
-43
include/vlc_threads.h
include/vlc_threads.h
+0
-3
src/libvlc.h
src/libvlc.h
+0
-9
src/libvlccore.sym
src/libvlccore.sym
+0
-1
src/misc/threads.c
src/misc/threads.c
+1
-30
No files found.
include/vlc_threads.h
View file @
f38e00c9
...
@@ -172,9 +172,6 @@ enum {
...
@@ -172,9 +172,6 @@ enum {
};
};
#endif
#endif
VLC_EXPORT
(
void
,
vlc_thread_ready
,
(
vlc_object_t
*
obj
));
#define vlc_thread_ready(o) vlc_thread_ready(VLC_OBJECT(o))
/**
/**
* Save the cancellation state and disable cancellation for the calling thread.
* Save the cancellation state and disable cancellation for the calling thread.
* This function must be called before entering a piece of code that is not
* This function must be called before entering a piece of code that is not
...
...
src/libvlc.h
View file @
f38e00c9
...
@@ -141,10 +141,6 @@ extern char *psz_vlcpath;
...
@@ -141,10 +141,6 @@ extern char *psz_vlcpath;
VLC_EXPORT
(
char
**
,
module_GetModulesNamesForCapability
,
VLC_EXPORT
(
char
**
,
module_GetModulesNamesForCapability
,
(
const
char
*
psz_capability
,
char
***
psz_longname
)
);
(
const
char
*
psz_capability
,
char
***
psz_longname
)
);
#ifdef LIBVLC_USE_PTHREAD
# include <semaphore.h>
/* TODO: get rid of vlc_thread_ready and this */
#endif
/**
/**
* Private LibVLC data for each object.
* Private LibVLC data for each object.
*/
*/
...
@@ -159,11 +155,6 @@ typedef struct vlc_object_internals_t
...
@@ -159,11 +155,6 @@ typedef struct vlc_object_internals_t
/* Thread properties, if any */
/* Thread properties, if any */
vlc_thread_t
thread_id
;
vlc_thread_t
thread_id
;
bool
b_thread
;
bool
b_thread
;
#ifdef LIBVLC_USE_PTHREAD
sem_t
thread_ready
;
#elif defined (WIN32)
HANDLE
thread_ready
;
#endif
/* Objects thread synchronization */
/* Objects thread synchronization */
vlc_mutex_t
lock
;
vlc_mutex_t
lock
;
...
...
src/libvlccore.sym
View file @
f38e00c9
...
@@ -506,7 +506,6 @@ vlc_strtoll
...
@@ -506,7 +506,6 @@ vlc_strtoll
vlc_submodule_create
vlc_submodule_create
__vlc_thread_create
__vlc_thread_create
__vlc_thread_join
__vlc_thread_join
vlc_thread_ready
__vlc_thread_set_priority
__vlc_thread_set_priority
vlc_threadvar_create
vlc_threadvar_create
vlc_threadvar_delete
vlc_threadvar_delete
...
...
src/misc/threads.c
View file @
f38e00c9
...
@@ -868,8 +868,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
...
@@ -868,8 +868,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
assert
(
!
p_priv
->
b_thread
);
assert
(
!
p_priv
->
b_thread
);
#if defined( LIBVLC_USE_PTHREAD )
#if defined( LIBVLC_USE_PTHREAD )
if
(
b_wait
)
sem_init
(
&
p_priv
->
thread_ready
,
0
,
0
);
#ifndef __APPLE__
#ifndef __APPLE__
if
(
config_GetInt
(
p_this
,
"rt-priority"
)
>
0
)
if
(
config_GetInt
(
p_this
,
"rt-priority"
)
>
0
)
#endif
#endif
...
@@ -878,9 +876,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
...
@@ -878,9 +876,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
if
(
config_GetType
(
p_this
,
"rt-offset"
)
)
if
(
config_GetType
(
p_this
,
"rt-offset"
)
)
i_priority
+=
config_GetInt
(
p_this
,
"rt-offset"
);
i_priority
+=
config_GetInt
(
p_this
,
"rt-offset"
);
}
}
#elif defined (WIN32)
if
(
b_wait
)
p_priv
->
thread_ready
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
#endif
#endif
p_priv
->
b_thread
=
true
;
p_priv
->
b_thread
=
true
;
...
@@ -889,17 +884,7 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
...
@@ -889,17 +884,7 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
{
{
msg_Dbg
(
p_this
,
"thread (%s) created at priority %d (%s:%d)"
,
msg_Dbg
(
p_this
,
"thread (%s) created at priority %d (%s:%d)"
,
psz_name
,
i_priority
,
psz_file
,
i_line
);
psz_name
,
i_priority
,
psz_file
,
i_line
);
if
(
b_wait
)
assert
(
!
b_wait
);
{
msg_Dbg
(
p_this
,
"waiting for thread initialization"
);
#if defined (LIBVLC_USE_PTHREAD)
sem_wait
(
&
p_priv
->
thread_ready
);
sem_destroy
(
&
p_priv
->
thread_ready
);
#elif defined (WIN32)
WaitForSingleObject
(
p_priv
->
thread_ready
,
INFINITE
);
CloseHandle
(
p_priv
->
thread_ready
);
#endif
}
}
}
else
else
{
{
...
@@ -912,20 +897,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
...
@@ -912,20 +897,6 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
return
i_ret
;
return
i_ret
;
}
}
#undef vlc_thread_ready
void
vlc_thread_ready
(
vlc_object_t
*
obj
)
{
vlc_object_internals_t
*
priv
=
vlc_internals
(
obj
);
assert
(
priv
->
b_thread
);
#if defined (LIBVLC_USE_PTHREAD)
assert
(
pthread_equal
(
pthread_self
(),
priv
->
thread_id
));
sem_post
(
&
priv
->
thread_ready
);
#elif defined (WIN32)
SetEvent
(
priv
->
thread_ready
);
#endif
}
/*****************************************************************************
/*****************************************************************************
* vlc_thread_set_priority: set the priority of the current thread when we
* vlc_thread_set_priority: set the priority of the current thread when we
* couldn't set it in vlc_thread_create (for instance for the main thread)
* couldn't set it in vlc_thread_create (for instance for the main thread)
...
...
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