request_irq func. header file?


 
Thread Tools Search this Thread
Top Forums Programming request_irq func. header file?
# 1  
Old 11-07-2002
Question request_irq func. header file?

I try to compile program which use request_irq function declarated in linux/sched.h but it bring a lot of errors relating to include directives in sched.h.
I try on Mandrake7.2 and RedHat7.2 but result same.
A lot of thanks for your answers.
# 2  
Old 11-13-2002
Be more specific. Can you post the details of the error messages? Copy and paste the output if possible.
# 3  
Old 11-16-2002
detailed

I am compiling with gcc 2.96, in kdevelop shell.
here is main and output, when I include some header files included in linux/sched.h by hand in main, some errors disappear.

A lot of thanks for your interesting to my question.

main
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <asm/irq.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>


int main()
{
return 0;
}



//output

make all-recursive
gmake[1]: Entering directory `/home/ghg/camac'
Making all in camac
gmake[2]: Entering directory `/home/ghg/camac/camac'
g++ -DHAVE_CONFIG_H -I. -I. -I.. -O0 -g3 -Wall -c main.cpp
In file included from /usr/include/linux/sched.h:15,
from main.cpp:24:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/sched.h:17,
from main.cpp:24:
/usr/include/asm/system.h:224: parse error before `new'
/usr/include/asm/system.h: In function `long unsigned int __cmpxchg
(...)':
/usr/include/asm/system.h:227: `size' undeclared (first use this
function)
/usr/include/asm/system.h:227: (Each undeclared identifier is reported
only once for each function it appears in.)
/usr/include/asm/system.h:231: parse error before `)'
/usr/include/asm/system.h:237: parse error before `)'
/usr/include/asm/system.h:243: parse error before `)'
/usr/include/asm/system.h:247: `old' undeclared (first use this
function)
In file included from /usr/include/linux/sched.h:80,
from main.cpp:24:
/usr/include/linux/timer.h: At top level:
/usr/include/linux/timer.h:17: field `list' has incomplete type
/usr/include/linux/timer.h: In function `void init_timer (timer_list
*)':
/usr/include/linux/timer.h:47: `struct timer_list' has no member named
`list'
/usr/include/linux/timer.h:47: `struct timer_list' has no member named
`list'
/usr/include/linux/timer.h: In function `int timer_pending (const
timer_list *)':
/usr/include/linux/timer.h:52: `struct timer_list' has no member named
`list'
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:45,
from main.cpp:25:
/usr/include/linux/irq.h: At top level:
/usr/include/linux/irq.h:30: parse error before `typename'
In file included from /usr/include/linux/irq.h:59,
from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:45,
from main.cpp:25:
/usr/include/asm/hw_irq.h:78: parse error before `)'
/usr/include/asm/hw_irq.h: In function `void FASTCALL (...)':
/usr/include/asm/hw_irq.h:193: cannot declare static function inside
another function
/usr/include/asm/hw_irq.h: In function `void x86_do_profile (long
unsigned int)':
/usr/include/asm/hw_irq.h:222: cannot declare static function inside
another function
In file included from /usr/include/asm/hardirq.h:18,
from /usr/include/linux/interrupt.h:45,
from main.cpp:25:
/usr/include/linux/irq_cpustat.h: In function `void hw_resend_irq
(hw_interrupt_type *, unsigned int)':
/usr/include/linux/irq_cpustat.h:20: non-local variable `hw_resend_irq
(hw_interrupt_type *, unsigned int)::irq_cpustat_t irq_stat[]' uses
local type `hw_resend_irq (hw_interrupt_type *, unsigned
int)::irq_cpustat_t'
In file included from main.cpp:25:
/usr/include/linux/interrupt.h:75: non-local function `void
open_softirq (int, void (*) (hw_resend_irq (hw_interrupt_type *,
unsigned int)::softirq_action *), void *)' uses local type
`hw_resend_irq (hw_interrupt_type *, unsigned int)::softirq_action'
/usr/include/linux/interrupt.h:78: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void __cpu_raise_softirq
(int, int)':
/usr/include/linux/interrupt.h:85: cannot declare static function
inside another functigmake[2]: Leaving directory `/home/ghg/camac/camac'
on
/usr/include/linux/interrupt.h: In function `void raise_softirq (int)':
/usr/include/linux/interrupt.h:144: non-local variable `raise_softirq
(int)::tasklet_head tasklet_vec[1]' uses local type `raise_softirq
(int)::tasklet_head'
/usr/include/linux/interrupt.h:145: non-local variable `raise_softirq
(int)::tasklet_head tasklet_hi_vec[1]' uses local type `raise_softirq
(int)::tasklet_head'
/usr/include/linux/interrupt.h:158: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void tasklet_schedule
(raise_softirq (int)::tasklet_struct *)':
/usr/include/linux/interrupt.h:172: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void tasklet_hi_schedule
(raise_softirq (int)::tasklet_struct *)':
/usr/include/linux/interrupt.h:187: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void
tasklet_disable_nosync (raise_softirq (int)::tasklet_struct *)':
/usr/includgmake[1]: Leaving directory `/home/ghg/camac'
e/linux/interrupt.h:192: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void tasklet_disable
(raise_softirq (int)::tasklet_struct *)':
/usr/include/linux/interrupt.h:198: cannot declare static function
inside another function
/usr/include/linux/interrupt.h: In function `void tasklet_enable
(raise_softirq (int)::tasklet_struct *)':
/usr/include/linux/interrupt.h:202: non-local function `void
tasklet_kill (raise_softirq (int)::tasklet_struct *)' uses local type
`raise_softirq (int)::tasklet_struct'
/usr/include/linux/interrupt.h:204: non-local function `void
tasklet_init (raise_softirq (int)::tasklet_struct *, void (*) (long
unsigned int), long unsigned int)' uses local type `raise_softirq
(int)::tasklet_struct'
/usr/include/linux/interrupt.h:227: non-local variable `raise_softirq
(int)::tasklet_struct bh_task_vec[]' uses local type `raise_softirq
(int)::tasklet_struct'
/usr/include/linux/interrupt.h:233: cannot declare static function
inside another function
gmake[2]: *** [main.o] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive-am] Error 2
*** failed ***
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

2. Shell Programming and Scripting

Comparing one file header with another file header

Hi Experts, In our project we have requirement where in we have to compare header of one file with header in the parameter file. There are 20 files which we ftp from one site. All this files have different header. We are comapring this file with our parameter file(which is having the header... (2 Replies)
Discussion started by: Amey Joshi
2 Replies

3. Programming

request_irq always returns EINVAL

request_irq always returns EINVAL What am I doing wrong here ? int mydrvr_open(struct inode *inode, struct file *filp) { int ret; printk("<1> \nModule Opened!"); //disable_irq(4); //free_irq(4, NULL); ret = request_irq(4, &imr_interrupt_handler,IRQF_SHARED,... (0 Replies)
Discussion started by: dragonpoint
0 Replies

4. Red Hat

Video: Spotlight on FUNC

</p>Download this video: Ogg Theora] FUNC is the brainchild of Michael DeHaan, Adrian Likins, Seth Vidal, and Greg DeKoenigsberg. In this edition of Spotlight On, Michael, Adrian, and Seth discuss how FUNC makes it easy to write commands across large numbers of machines remotely and... (0 Replies)
Discussion started by: Linux Bot
0 Replies

5. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

6. Shell Programming and Scripting

FLOOR Func

Hello Experts, Is there any inbuild FLOOR function to do FLOOR func in mathmetics in awk script like in FlOOR Func in C. Ex:- floor(2.9) = 2 floor(2.1) = 2 floor(2.0) = 2 floor(-2.0) = 2 floor(-2.1) = -3 floor(-2.9) =... (1 Reply)
Discussion started by: user_prady
1 Replies

7. Programming

difference between int ** func() and int *& func()

What is the difference between int** func() and int*& func(). Can you please explain it with suitable example. Thanks, Devesh. (1 Reply)
Discussion started by: devesh
1 Replies
Login or Register to Ask a Question