Commit 1d91a5ee authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Remove timer serialization (we don't do it on POSIX anyway)

parent b670356d
......@@ -592,23 +592,14 @@ static void CALLBACK vlc_timer_do (void *val, BOOLEAN timeout)
vlc_timer_t *id = val;
assert (timeout);
if (TryEnterCriticalSection (&id->serializer))
{
id->overrun = InterlockedExchange (&id->counter, 0);
id->func (id->data);
LeaveCriticalSection (&id->serializer);
}
else /* Overrun */
InterlockedIncrement (&id->counter);
id->func (id->data);
}
int vlc_timer_create (vlc_timer_t *id, void (*func) (void *), void *data)
{
id->func = func;
id->data = data;
id->overrun = 0;
id->handle = INVALID_HANDLE_VALUE;
InitializeCriticalSection (&id->serializer);
return 0;
}
......@@ -616,7 +607,6 @@ void vlc_timer_destroy (vlc_timer_t *id)
{
if (id->handle != INVALID_HANDLE_VALUE)
DeleteTimerQueueTimer (NULL, id->handle, NULL);
DeleteCriticalSection (&id->serializer);
}
void vlc_timer_schedule (vlc_timer_t *id, bool absolute,
......@@ -641,5 +631,6 @@ void vlc_timer_schedule (vlc_timer_t *id, bool absolute,
unsigned vlc_timer_getoverrun (const vlc_timer_t *id)
{
return id->overrun;
(void)id;
return 0;
}
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