Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

Signals in Linux Kernel Module

Altera_Forum
Honored Contributor II
1,021 Views

I am trying to write a read function for a character device that wakes up using completions when data is available. The interrupt handler reads the raw data and schedules a tasklet for further processing. The tasklet then triggers a completion when the data is ready for the read operation. 

 

Completions are preventing the waking of the function if a signal event occurs (eg CTRL-C / SIGINT). I have tried using the interruptible completion, but it seems to be triggered whenever a hardware interrupt is generated (based upon the output). This is not appropriate because I want to return from the read function when I have data or when a signal is received, not on the hardware interrupt. 

 

I am attempting to use a signal handler to set a flag on a SIGINT and trigger a completeion event (avoiding the interruptible completion). However, I get the error message 

*** Warning: "do_sigaction" [module.ko] undefined! 

at the end of the build. Yet I am including the correct header file, <linux/sched.h>, and can find the do_sigaction function in signal.o in the kernel build path. There are no errors or warnings associated with the signal handling code. 

 

Could anyone tell me how to fix this problem? Or suggest another way around it? 

 

Regards, 

Michael
0 Kudos
0 Replies
Reply