Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Aug 2008 15:29:26 -0400
From:      fred <hlfw@datalync.com>
To:        multimedia@freebsd.org
Subject:   mod to make gspca load for FreeBSD 7
Message-ID:  <200808081529.27177.hlfw@datalync.com>

next in thread | raw e-mail | index | archive | help

Ran into a problem with the latest
linux-kmod-compat  module on
FreeBSD 7.  the gspca driver still
had an unresolved reference to msleep.

Looks like the FreeBSD version test in
linux_compat.c:linux_msleep() was not
working and ended up compiling for a
FreeBSD6 kernel.

I replaced the FreeBSD version test in
linux/module.h
void linux_msleep(int ms);

#if defined(msleep)
#undef msleep
#define bsd_sleep   _sleep
#else
#define bsd_sleep  msleep
#endif
#define msleep_compat(ms)    linux_msleep(ms)

#define msleep(ms)    linux_msleep(ms)

And changed linux_compat.c:linux_msleep()
to just call bsd_sleep instead of calling
_sleep() or msleep() based on version.

Wondering why the FreeBSD msleep() is used
in place of tsleep() ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808081529.27177.hlfw>