From: David Braendler (davidb@cvs.com.au)
Date: Thu Sep 12 2002 - 00:46:52 EDT
We are trying to figure out what is the best way to sleep a process running in user space. The user process needs to grab data from a driver if it is available and go to sleep otherwise. Most of the documentation that we have seen so far on this topic is related to code within kernel space - there it is no problem you would just call interruptible_sleep_on, and then get woken up when the event you are looking for occurs. With user processes we're not so sure how to proceed. Reading some docs has shown that signals could be the answer - you put the user app to sleep, and then wake it with a signal from kernel space. This needs to be done in an interrupt safe way, as there are four interrupt sources that could pre-empt the user process. Three questions for this approach: a) What is the best way to put a user app to sleep?? - the sleep() function works only for a certain amount of time, I guess we could just make this value stupidly large, but that seems like a kludge b) When sending a signal from kernel space to user space it is possible to target a specific process?? c) Can signals be used in an interrupt safe way?? Cheers Dave Braendler Colour Vision Systems This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:21:50 EDT