devel/linux-kmod-compat bit me
frtzkatz at yahoo.com
Wed Sep 10 23:08:06 UTC 2008
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?
-- Fritz Katz.
More information about the freebsd-multimedia