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

rwlock: use a proper source C module

Initially, I made it a header file suitable for conditional inclusion.

However slim read/write locks in Windows Vista do not support
asynchronous procedure calls, so they cannot be leveraged in VLC.
Thus rwlock.c needs to be included forever on Windows. (The same
limitation prevent usage of condition variables also in Vista+.)
parent debc9d47
......@@ -269,7 +269,7 @@ SOURCES_libvlc_win32 = \
win32/dirs.c \
win32/filesystem.c \
win32/plugin.c \
misc/rwlock.h \
misc/rwlock.c \
win32/thread.c \
win32/specific.c \
win32/winsock.c \
......@@ -288,7 +288,7 @@ SOURCES_libvlc_os2 = \
os2/dirs.c \
os2/filesystem.c \
os2/plugin.c \
misc/rwlock.h \
misc/rwlock.c \
os2/thread.c \
os2/specific.c \
os2/rand.c \
......
......@@ -428,8 +428,6 @@ void vlc_sem_wait (vlc_sem_t *sem)
} while (rc == ERROR_INTERRUPT);
}
#include "misc/rwlock.h"
/*** Thread-specific variables (TLS) ***/
struct vlc_threadvar
{
......
......@@ -302,32 +302,6 @@ void vlc_sem_wait (vlc_sem_t *sem)
while (result == WAIT_IO_COMPLETION);
}
/*** Read/write locks */
#if 0
/* SRW (Slim Read Write) locks are available in Vista+ only */
void vlc_rwlock_init (vlc_rwlock_t *lock)
{
}
void vlc_rwlock_destroy (vlc_rwlock_t *lock)
{
}
void vlc_rwlock_rdlock (vlc_rwlock_t *lock)
{
}
void vlc_rwlock_wrlock (vlc_rwlock_t *lock)
{
}
void vlc_rwlock_unlock (vlc_rwlock_t *lock)
{
}
#else
# include "misc/rwlock.h"
#endif
/*** Thread-specific variables (TLS) ***/
struct vlc_threadvar
{
......
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