Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 2008 16:08:03 -0700 (PDT)
From:      Fritz Katz <frtzkatz@yahoo.com>
To:        freebsd-multimedia@freebsd.org
Subject:   Re: devel/linux-kmod-compat bit me
Message-ID:  <174935.28912.qm@web63008.mail.re1.yahoo.com>
In-Reply-To: <20080909120017.092361065701@hub.freebsd.org>

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

I've often wondered about the differences between the Linux msleep and FreeBSD msleep -- I've actually lost some sleep thinking about it.  They appear to be the same in name only. Am I confused here? If so, jump in and correct me.

The Linux msleep simply goes into a while spin-loop counting down a timeout on schedule_timeout_uninterruptible( ). It seems to be a closer match to the Standard C library call: usleep.

The FreeBSD msleep seems to be a different beast entirely. A better name would be 'mutex_sleep' since that is what it does. In fact, we shouldn't use FreeBSD msleep since it has been depreciated, use mtx_sleep instead.

For linux_kmod_compat would a better match to the Linux msleep be the FreeBSD kernel function pause?:

    void pause(const char *wmesg, int timo);

or is there something better for use in the kernel, drivers, and KLDs?

Cheers,
-- Fritz Katz.



      



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