Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
63baa1df
Commit
63baa1df
authored
Apr 23, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: don't use weak linking for SignalObjectAndWait
parent
14d8baf7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
48 deletions
+6
-48
include/vlc_threads.h
include/vlc_threads.h
+0
-1
include/vlc_threads_funcs.h
include/vlc_threads_funcs.h
+4
-12
src/misc/threads.c
src/misc/threads.c
+2
-35
No files found.
include/vlc_threads.h
View file @
63baa1df
...
...
@@ -140,7 +140,6 @@ typedef struct
volatile
int
i_waiting_threads
;
/* WinNT/2K/XP implementation */
HANDLE
event
;
SIGNALOBJECTANDWAIT
SignalObjectAndWait
;
/* Win95/98/ME implementation */
HANDLE
semaphore
;
CRITICAL_SECTION
csection
;
...
...
include/vlc_threads_funcs.h
View file @
63baa1df
...
...
@@ -282,12 +282,8 @@ static inline void __vlc_cond_wait( const char * psz_file, int i_line,
if
(
p_mutex
->
mutex
)
{
/* It is only possible to atomically release the mutex and
* initiate the waiting on WinNT/2K/XP. Win9x doesn't have
* SignalObjectAndWait(). */
p_condvar
->
SignalObjectAndWait
(
p_mutex
->
mutex
,
p_condvar
->
event
,
INFINITE
,
FALSE
);
SignalObjectAndWait
(
p_mutex
->
mutex
,
p_condvar
->
event
,
INFINITE
,
FALSE
);
}
else
{
...
...
@@ -414,12 +410,8 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line,
if
(
p_mutex
->
mutex
)
{
/* It is only possible to atomically release the mutex and
* initiate the waiting on WinNT/2K/XP. Win9x doesn't have
* SignalObjectAndWait(). */
result
=
p_condvar
->
SignalObjectAndWait
(
p_mutex
->
mutex
,
p_condvar
->
event
,
delay_ms
,
FALSE
);
result
=
SignalObjectAndWait
(
p_mutex
->
mutex
,
p_condvar
->
event
,
delay_ms
,
FALSE
);
}
else
{
...
...
src/misc/threads.c
View file @
63baa1df
...
...
@@ -51,9 +51,6 @@ static vlc_object_t *p_root;
#if defined( UNDER_CE )
#elif defined( WIN32 )
/* following is only available on NT/2000/XP and above */
static
SIGNALOBJECTANDWAIT
pf_SignalObjectAndWait
=
NULL
;
/*
** On Windows NT/2K/XP we use a slow mutex implementation but which
** allows us to correctly implement condition variables.
...
...
@@ -164,29 +161,6 @@ int __vlc_threads_init( vlc_object_t *p_this )
/* We should be safe now. Do all the initialization stuff we want. */
p_libvlc_global
->
b_ready
=
false
;
#if defined( UNDER_CE )
/* Nothing to initialize */
#elif defined( WIN32 )
/* Dynamically get the address of SignalObjectAndWait */
if
(
GetVersion
()
<
0x80000000
)
{
HINSTANCE
hInstLib
;
/* We are running on NT/2K/XP, we can use SignalObjectAndWait */
hInstLib
=
LoadLibrary
(
_T
(
"kernel32"
));
if
(
hInstLib
)
{
pf_SignalObjectAndWait
=
(
SIGNALOBJECTANDWAIT
)
GetProcAddress
(
hInstLib
,
_T
(
"SignalObjectAndWait"
)
);
}
}
#elif defined( HAVE_KERNEL_SCHEDULER_H )
#elif defined( LIBVLC_USE_PTHREAD )
#endif
p_root
=
vlc_custom_create
(
VLC_OBJECT
(
p_libvlc_global
),
0
,
VLC_OBJECT_GLOBAL
,
"global"
);
if
(
p_root
==
NULL
)
...
...
@@ -279,13 +253,8 @@ int __vlc_mutex_init( vlc_mutex_t *p_mutex )
return
0
;
#elif defined( WIN32 )
/* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait
* function and have a 100% correct vlc_cond_wait() implementation.
* As this function is not available on Win9x, we can use the faster
* CriticalSections */
if
(
pf_SignalObjectAndWait
&&
!
b_fast_mutex
)
if
(
!
b_fast_mutex
)
{
/* We are running on NT/2K/XP, we can use SignalObjectAndWait */
p_mutex
->
mutex
=
CreateMutex
(
0
,
FALSE
,
0
);
return
(
p_mutex
->
mutex
!=
NULL
?
0
:
1
);
}
...
...
@@ -426,10 +395,8 @@ int __vlc_cond_init( vlc_cond_t *p_condvar )
/* Misc init */
p_condvar
->
i_win9x_cv
=
i_win9x_cv
;
p_condvar
->
SignalObjectAndWait
=
pf_SignalObjectAndWait
;
if
(
(
p_condvar
->
SignalObjectAndWait
&&
!
b_fast_mutex
)
||
p_condvar
->
i_win9x_cv
==
0
)
if
(
!
b_fast_mutex
||
p_condvar
->
i_win9x_cv
==
0
)
{
/* Create an auto-reset event. */
p_condvar
->
event
=
CreateEvent
(
NULL
,
/* no security */
...
...
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