FW: Problem with Module using Kernel Timer (struct timer_list)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

I think my last mail did not reach the mailing list, so sending it again.

 

Regards,

Gaurav.

 

 


From: Dhiman, Gaurav
Sent: Tuesday, August 24, 2004 2:54 PM
To: kernelnewbies@xxxxxxxxxxxx
Subject: Problem with Module using Kernel Timer (struct timer_list)

 

 

Hi All,

 

I have written a small module which uses the kernel timer and puts the reading process to sleep for specific time (30 seconds).

I am getting some problem in it ……. The problem is that when I load the module and read the module created “/proc/timer_wait” file using ‘head’ or ‘cat’ command, then my timer_read_proc() function (see the use_timer.c file in attachment) is called by kernel twice.

 

I am not able to understand why it is called two times. I am attaching the output of ‘dmesg’ command. The attached text file (dmesg_output.txt) contains only the kernel messages related to my module.

 

The output of reading process is that, for the first time it displays what I want it to display but after that it displays garbage and it also make the shell prompt filled with garbage ….. it does not show ascii characters after that on shell prompt.

 

If you are using windows, please open the attached file in WordPad, else it will not be correctly displayed.

 

Please help.

Thanks in Advance.

 

Regards,

Gaurav. 

 

Loading Module: my_timer.o
Loaded Successfully Module: my_timer.o
We are in My_Timer read_proc() routine.
Added timer to Kernel Timer Queue successfully ..... Going to Sleep.
We are in My_Timer Handler.
Waking up the sleeping processes on Timer Wait Queue.
Woked up by My_Timer handler.
We are in My_Timer read_proc() routine.
Added timer to Kernel Timer Queue successfully ..... Going to Sleep.
We are in My_Timer Handler.
Waking up the sleeping processes on Timer Wait Queue.
Woked up by My_Timer handler.

Attachment: use_timer.c
Description: use_timer.c


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux