ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / drivers / media / dvb / dvb-core / dvb_functions.h
1 /* 
2  * dvb_functions.h: isolate some Linux specific stuff from the dvb-core
3  *                  that can't be expressed as a one-liner
4  *                  in order to make porting to other environments easier
5  *
6  * Copyright (C) 2003 Convergence GmbH
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Lesser Public License
10  * as published by the Free Software Foundation; either version 2.1
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21  *
22  */
23
24 #ifndef __DVB_FUNCTIONS_H__
25 #define __DVB_FUNCTIONS_H__
26
27 /**
28  *  a sleeping delay function, waits i ms
29  *
30  */
31 static inline
32 void dvb_delay(int i)
33 {
34         current->state=TASK_INTERRUPTIBLE;
35         schedule_timeout((HZ*i)/1000);
36 }
37
38 /* we don't mess with video_usercopy() any more,
39 we simply define out own dvb_usercopy(), which will hopefull become
40 generic_usercopy()  someday... */
41
42 extern int dvb_usercopy(struct inode *inode, struct file *file,
43                             unsigned int cmd, unsigned long arg,
44                             int (*func)(struct inode *inode, struct file *file,
45                             unsigned int cmd, void *arg));
46
47 extern void dvb_kernel_thread_setup (const char *thread_name);
48
49 #endif
50