LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 08-18-2008, 12:39 PM   #1
ra2008
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Rep: Reputation: 15
sleep in kernel space


hi, i am executing a while in kernel space, and each 100 ms a timer interrupt is generated. so after finishing my work, how can i sleep in kernel until the next interrupt occur.

thanx
 
Old 08-19-2008, 03:25 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I may be a little beyond my expertise here, but isn't that a very strange thing to do? If I understand correctly, you would be denying all user space processes the ability to run while the kernel has gone to sleep waiting for a blasted interrupt! That said, in other, more primitive, processors I've worked on (looong time ago!) there were commands called things similar to "wait on interrupt" which would push all the usual info onto the stack (so it doesn't have to be pushed after receiving the interrupt) and then stop all processor activity until an interupt comes in (at which time normal processing resumes). I would suspect there is some such command in whatever processor you are using. But again, IMHO it sounds like a very questionable thing to do.
 
Old 08-25-2008, 05:15 AM   #3
ra2008
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Original Poster
Rep: Reputation: 15
hi,
i dont mean to let the whole kernel slee and hang the whole kernel.
what i mean is let a task sleep until an is interrupted by certain IRQ.

any hints??
 
Old 08-25-2008, 06:41 PM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
This is rather beyond anything I've done in Linux (so if this is a really stupid idea, be gentle ), but can you generate a signal in kernel mode and then have the user space program put itself to sleep and wake on the signal?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
How to share data b/w user space and kernel space nandac Linux - Kernel 1 11-28-2006 10:15 PM
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration