lkml.org 
[lkml]   [2008]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] video4linux: Push down the BKL
> Maybe return an EBUSY or E-something else for these cases when Myth
> tries to open() the second device node, when there's an underlying
> factor that requires things to be mutually exclusive. Allowing things
> like read() to allow hardware mode switching between analog and digital
> seems like it could result in really weird behaviors at the application.

Pardon me for not being clear. I wasn't suggesting having a mutex for
on the open call itself. The mutex we have in the em28xx driver is
only in place when we are *switching* between modes. The thinking was
to have open return EBUSY if the device is already in use in the other
mode, but we weren't sure if that would cause problems with MythTV
(since the open call would fail) If MythTV can gracefully handle that
scenario, then that would be the ideal solution from a driver
perspective.

> But in this case I can't. The driver probably shouldn't hold a lock and
> suspend an open() indefinitely (IMO). It should say the device is BUSY
> as that is the truth: an underlying hardware device or resource is busy.

Yeah, this was just me not being clear.

--
Devin J. Heitmueller
http://www.devinheitmueller.com
AIM: devinheitmueller


\
 
 \ /
  Last update: 2008-05-28 04:51    [W:0.079 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site