From owner-freebsd-multimedia@FreeBSD.ORG Wed Sep 10 23:08:06 2008 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0931F1065675 for ; Wed, 10 Sep 2008 23:08:06 +0000 (UTC) (envelope-from frtzkatz@yahoo.com) Received: from web63008.mail.re1.yahoo.com (web63008.mail.re1.yahoo.com [69.147.96.219]) by mx1.freebsd.org (Postfix) with SMTP id CB1408FC20 for ; Wed, 10 Sep 2008 23:08:03 +0000 (UTC) (envelope-from frtzkatz@yahoo.com) Received: (qmail 29608 invoked by uid 60001); 10 Sep 2008 23:08:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=koSy7d0zFnFVkH6TRWJ4LygNiGF12c350VZz5cMghzPhuu2m8cqh0Co6JrtUiypbGjCnJoRfM1gNyfd3USc9cpiHOBLQlbEdFLjq69Sc3kr8kthyG7mEgk8cP8PJiswpcyzcWz9X7T6aQunWPJDIV3YUTLebVpz5EfkgpVT+ikk=; X-YMail-OSG: XNChFA0VM1lQ4mH9kTPXVR7iLUQXanZcrYx4Yq84fx_Cy9tDbtJ3SOGPmvZ1VYN8GHXQjJW_VsqKzpQd77DiF6CJ4UbbEZHJG338YCBmoA-- Received: from [71.104.221.209] by web63008.mail.re1.yahoo.com via HTTP; Wed, 10 Sep 2008 16:08:03 PDT X-Mailer: YahooMailWebService/0.7.218.2 Date: Wed, 10 Sep 2008 16:08:03 -0700 (PDT) From: Fritz Katz To: freebsd-multimedia@freebsd.org In-Reply-To: <20080909120017.092361065701@hub.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <174935.28912.qm@web63008.mail.re1.yahoo.com> Subject: Re: devel/linux-kmod-compat bit me X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frtzkatz@yahoo.com List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 23:08:06 -0000 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.