Re: interruptible_sleep_on quistion
From: Capstar (spam0_at_eg.homeip.net)
Date: 09/15/03
- Next message: James McIninch: "EXT3 causes system crash using dvgrab..."
- Previous message: Capstar: "Re: interruptible_sleep_on quistion"
- In reply to: Capstar: "Re: interruptible_sleep_on quistion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Sep 2003 14:20:26 +0200
Capstar wrote:
> Ok, now I have another related problem: I actually didn't use
> interruptible_sleep_on, but interruptible_sleep_on_timeout. I haven't
> found a wait_event_interruptible_timeout macro in sched.h. I did grep
> for wait_event_interruptible_timeout in de kernel source, and found a
> that some device drivers define this macro themselves with
> shedule_timeout in stead of schedule(). This was actually what I wanted
> to do.
>
> in drivers/video/matrox/matroxfb_base.c there's a nice implementation
> (as far as I can see) which only defines this macro when it is not
> allready defined. I guess I'll just copy this piece of code.
>
> I do want to verify if this is good practice? I assume it is since it is
> in the mainstream kernel, but I do like to be sure.
>
> Is there also a possibility that this macro will be defined in sched.h
> or some other header file in the (near) future?
>
> Thanks in advance,
> Mark
>
whoops, there was one other thing I wanted to ask: in matroxfb_base.c
they do:
#ifndef wait_event_interruptible_timeout
#define __wait_event_interruptible_timeout(...)
etc...
but maybe the double underscore version allready exist, they don't check
on it. Or is there some rule in the kernel in which they say, if foo
isn't defined or doesn't exist, then __foo also isn't defined or doesn't
exist?
Mark
- Next message: James McIninch: "EXT3 causes system crash using dvgrab..."
- Previous message: Capstar: "Re: interruptible_sleep_on quistion"
- In reply to: Capstar: "Re: interruptible_sleep_on quistion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|