[vlc-devel] commit: vlc_mtime.h : add timer limits for FreeBSD ( Rafaël Carré )

git version control git at videolan.org
Wed Oct 7 03:52:05 CEST 2009


vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Wed Oct  7 03:50:50 2009 +0200| [5ee992272cab66ba0161c00ae5224cf1295fccfc] | committer: Rafaël Carré 

vlc_mtime.h : add timer limits for FreeBSD

Add some comments to explain the values

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ee992272cab66ba0161c00ae5224cf1295fccfc
---

 include/vlc_mtime.h |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/vlc_mtime.h b/include/vlc_mtime.h
index 49f53ca..dc47314 100644
--- a/include/vlc_mtime.h
+++ b/include/vlc_mtime.h
@@ -68,9 +68,14 @@ VLC_EXPORT( void,    mwait,    ( mtime_t date ) );
 VLC_EXPORT( void,    msleep,   ( mtime_t delay ) );
 VLC_EXPORT( char *,  secstotimestr, ( char *psz_buffer, int secs ) );
 
-#if defined (__GNUC__) && defined (__linux__)
-# define VLC_HARD_MIN_SLEEP 10000 /* Linux has 100, 250, 300 or 1000Hz */
-# define VLC_SOFT_MIN_SLEEP 9000000
+#if (defined (__GNUC__) && defined (__linux__)) || defined (__FreeBSD__)
+/* Linux has 100, 250, 300 or 1000Hz
+ *
+ * HZ=100 by default on FreeBSD, but some architectures use a 1000Hz timer
+ */
+# define VLC_HARD_MIN_SLEEP 10000   /* 10 milliseconds = 1 tick at 100Hz */
+# define VLC_SOFT_MIN_SLEEP 9000000 /* 9 seconds */
+#endif
 
 static
 __attribute__((unused))




More information about the vlc-devel mailing list