On Fri, Aug 24, 2001 at 02:40:33PM -0400, Dave Strauss wrote:
> static int lp_preempt(void *handle)
> {
> struct lp_struct *this_lp = (struct lp_struct *)handle;
> set_bit(LP_PREEMPT_REQUEST, &this_lp->preempt_bits);
> return (1);
> }
I had to look up what the return value meant, and that looks good.
> Note the following:
>
> (1) I claim the parport driver every time I enter the entrypoint.
> I only release it if the "preempt" function was called.
You need to keep track of whether or not you own it. I think it
complains if you try to claim it when you already have it (if it
doesn't, it should).
> (2) I'm relying on the lp_release() call to release the parport
> driver for the final time.
As in you've put code in lp_release to do that? Fine.
> Or should I burden lp.c with another flag so that it knows when it
> already owns parport?
Burden it.
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Fri Aug 24 2001 - 16:32:20 EDT