From owner-freebsd-multimedia@FreeBSD.ORG Fri Dec 22 02:18:15 2006 Return-Path: X-Original-To: multimedia@FreeBSD.org Delivered-To: freebsd-multimedia@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E247F16A47B; Fri, 22 Dec 2006 02:18:15 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id 94D9013C459; Fri, 22 Dec 2006 02:18:15 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (2ekt7rh3n8mhp48w@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id kBM1h5LM031136; Thu, 21 Dec 2006 17:43:05 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id kBM1h5i0031135; Thu, 21 Dec 2006 17:43:05 -0800 (PST) (envelope-from jmg) Date: Thu, 21 Dec 2006 17:43:05 -0800 From: John-Mark Gurney To: usleepless@gmail.com Message-ID: <20061222014304.GB4982@funkthat.com> Mail-Followup-To: usleepless@gmail.com, Greg 'groggy' Lehey , Stephen Hocking , multimedia@freebsd.org References: <6300771b0612181401i72e7cc58ta08e12de8d68d4d0@mail.gmail.com> <20061218232247.GQ4364@wantadilla.lemis.com> <6300771b0612181533m6ece3f38p379c78a75912d10d@mail.gmail.com> <6300771b0612181534h3158342aw554869660fc707ea@mail.gmail.com> <20061218234041.GU4364@wantadilla.lemis.com> <20061219224005.GC4364@wantadilla.lemis.com> <20061220000049.GF4364@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: Greg 'groggy' Lehey , Stephen Hocking , multimedia@FreeBSD.org Subject: Re: MythTV and PVR500 (was: Possible FreeBSD port?) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2006 02:18:16 -0000 usleepless@gmail.com wrote this message on Wed, Dec 20, 2006 at 22:40 +0100: > because i am still running on a 4.11 server, the mythbackend needed to > run on 4.11. i soon discovered that mythtv had strange ipc, so i > compiled it against linux-threads ( had to rebuild QT with > linux-threads as well ). i remember it helped a little, but not > enough. > > i stumbled upon all the busy-wait-loops: > > " > while(!condition) > usleep(50); > " > > this is probably the reason why i needed linux-threads. but there is a > catch: linux-usleep guarantees a context-switch, while freebsd doesn't > ( didn't ? ). > > my first solution was to redefine usleep in mythcontext.h, to force a > context-switch. this produced a working mythtv-install. later on, i > removed all busy-wait-loops because they are just plain stupid. Why not use sched_yield(2)? I forget if it's in 4.x, but I'm pretty sure just yield is in 4.x... That will force a context switch... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."