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
0984b220
Commit
0984b220
authored
May 23, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed vlc_thread_set_priority().
parent
2f994865
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
63 deletions
+1
-63
src/input/input.c
src/input/input.c
+1
-1
src/libvlc.h
src/libvlc.h
+0
-3
src/misc/threads.c
src/misc/threads.c
+0
-59
No files found.
src/input/input.c
View file @
0984b220
...
...
@@ -1292,7 +1292,7 @@ static int Init( input_thread_t * p_input )
{
/* We don't want a high input priority here or we'll
* end-up sucking up all the CPU time */
vlc_
thread_set_priority
(
p_input
,
VLC_THREAD_PRIORITY_LOW
);
vlc_
set_priority
(
p_input
->
p
->
thread
,
VLC_THREAD_PRIORITY_LOW
);
}
msg_Dbg
(
p_input
,
"starting in %s mode"
,
...
...
src/libvlc.h
View file @
0984b220
...
...
@@ -51,13 +51,10 @@ int vlc_clone_detach (vlc_thread_t *, void *(*)(void *), void *, int);
/* Hopefully, no need to export this. There is a new thread API instead. */
int
vlc_thread_create
(
vlc_object_t
*
,
void
*
(
*
)
(
vlc_object_t
*
),
int
)
VLC_USED
VLC_DEPRECATED
;
void
vlc_thread_join
(
vlc_object_t
*
)
VLC_DEPRECATED
;
int
vlc_thread_set_priority
(
vlc_object_t
*
,
int
)
VLC_DEPRECATED
;
#define vlc_thread_create( P_THIS, FUNC, PRIORITY ) \
vlc_thread_create( VLC_OBJECT(P_THIS), FUNC, PRIORITY )
#define vlc_thread_join( P_THIS ) \
vlc_thread_join( VLC_OBJECT(P_THIS) )
#define vlc_thread_set_priority( P_THIS, PRIORITY ) \
vlc_thread_set_priority( VLC_OBJECT(P_THIS), PRIORITY )
void
vlc_thread_cancel
(
vlc_object_t
*
);
int
vlc_object_waitpipe
(
vlc_object_t
*
obj
);
...
...
src/misc/threads.c
View file @
0984b220
...
...
@@ -96,65 +96,6 @@ int vlc_thread_create( vlc_object_t *p_this, void *(*func) ( vlc_object_t * ),
return
i_ret
;
}
#undef vlc_thread_set_priority
/*****************************************************************************
* 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)
*****************************************************************************/
int
vlc_thread_set_priority
(
vlc_object_t
*
p_this
,
int
i_priority
)
{
vlc_object_internals_t
*
p_priv
=
vlc_internals
(
p_this
);
if
(
!
p_priv
->
b_thread
)
{
msg_Err
(
p_this
,
"couldn't set priority of non-existent thread"
);
return
ESRCH
;
}
#if defined( LIBVLC_USE_PTHREAD )
# ifndef __APPLE__
if
(
var_InheritBool
(
p_this
,
"rt-priority"
)
)
# endif
{
int
i_error
,
i_policy
;
struct
sched_param
param
;
memset
(
&
param
,
0
,
sizeof
(
struct
sched_param
)
);
if
(
config_GetType
(
p_this
,
"rt-offset"
)
)
i_priority
+=
var_InheritInteger
(
p_this
,
"rt-offset"
);
if
(
i_priority
<=
0
)
{
param
.
sched_priority
=
(
-
1
)
*
i_priority
;
i_policy
=
SCHED_OTHER
;
}
else
{
param
.
sched_priority
=
i_priority
;
i_policy
=
SCHED_RR
;
}
if
(
(
i_error
=
pthread_setschedparam
(
p_priv
->
thread_id
,
i_policy
,
&
param
))
)
{
errno
=
i_error
;
msg_Warn
(
p_this
,
"cannot set thread priority (%m)"
);
i_priority
=
0
;
}
}
#elif defined( WIN32 ) || defined( UNDER_CE )
#warning vlc_thread_set_priority() is BROKEN
if
(
true
/*!SetThreadPriority(p_priv->thread_id->id, i_priority)*/
)
{
msg_Warn
(
p_this
,
"couldn't set a faster priority"
);
return
1
;
}
#endif
return
0
;
}
#undef vlc_thread_join
/*****************************************************************************
* vlc_thread_join: wait until a thread exits, inner version
...
...
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