[vlc-devel] Patch for VLM Scheduling on Linux

Rafaël Carré funman at videolan.org
Fri Oct 26 07:13:37 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian C. Wiles a écrit :
> Hi,
> 
>   This patch fixes a bug that prevents VLM scheduling from working on 
> Linux (Bug #1288).  Feel free to contact me with any questions.
> 
>     -Brian
> 
> Index: src/misc/mtime.c
> ===================================================================
> --- src/misc/mtime.c	(revision 22813)
> +++ src/misc/mtime.c	(working copy)
> @@ -154,10 +154,8 @@
>  #if defined (HAVE_CLOCK_NANOSLEEP)
>      struct timespec ts;
>  
> -    /* Try to use POSIX monotonic clock if available */
> -    if( clock_gettime( CLOCK_MONOTONIC, &ts ) == EINVAL )
> -        /* Run-time fallback to real-time clock (always available) */
> -        (void)clock_gettime( CLOCK_REALTIME, &ts );
> +    /* Use real-time clock (always available) */
> +    (void)clock_gettime( CLOCK_REALTIME, &ts );
>  
>      res = ((mtime_t)ts.tv_sec * (mtime_t)1000000)
>             + (mtime_t)(ts.tv_nsec / 1000);
> 

Hello,

your patch is not ok at all, the monotonic clock is needed in mtime.c ,
to prevent strange behaviour when the real clock is updated for example.

The right way to go is to remove mdate() calls in vlm.

- --
Rafaël Carré
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHIXeBYWCeGMCv8Q8RAg8UAJ0aWxyHJwZpsFc0hBancozWnNm0OACePe+X
y03kRe4zqoqiKPsImMS7LOg=
=bHgE
-----END PGP SIGNATURE-----



More information about the vlc-devel mailing list