Synchronizing user space threads with kernel space in linux

From: Mad_at_Spammers (ih8sp4m_at_yahoo.com)
Date: 04/29/04


Date: 29 Apr 2004 04:54:39 -0700

I want to synchronize a user space thread to an external event that
generates an interrupt. I thought of using the following approach: the
ISR that treats the interrupt does a quick processing (such as data
capture and buffering) and then sends data to the user space thread
through a message queue or signals to the thread waiting on a
semaphore and it gets the buffered data from shared memory or some
similar mechanism. So far I haven't succeded in finding a way to do
it. I've tryed to write a module which uses semaphores (<linux/sem.h>)
but aparently there is no way to use SysV IPC primitives in kernel
modules.

I would appreciate having hints on how to do it or pointers to
documentation and example code if available.

Thank you very much in advance for your help.

Elder.



Relevant Pages

  • Synchronizing user space threads with kernel space in linux
    ... ISR that treats the interrupt does a quick processing (such as data ... capture and buffering) and then sends data to the user space thread ... semaphore and it gets the buffered data from shared memory or some ...
    (comp.arch.embedded)
  • Re: Synchronizing user space threads with kernel space in linux
    ... > ISR that treats the interrupt does a quick processing (such as data ... > capture and buffering) and then sends data to the user space thread ... > through a message queue or signals to the thread waiting on a ... task to indicate changes in the state of the driver. ...
    (comp.arch.embedded)
  • Re: Synchronizing user space threads with kernel space in linux
    ... > ISR that treats the interrupt does a quick processing (such as data ... > capture and buffering) and then sends data to the user space thread ... > through a message queue or signals to the thread waiting on a ... task to indicate changes in the state of the driver. ...
    (comp.os.linux.embedded)
  • Re: Synchronizing user space threads with kernel space in linux
    ... >> capture and buffering) and then sends data to the user space thread ... >> through a message queue or signals to the thread waiting on a ... > A user-space signal is the equivalent of an interrupt. ... > task to indicate changes in the state of the driver. ...
    (comp.arch.embedded)
  • Re: Synchronizing user space threads with kernel space in linux
    ... >> capture and buffering) and then sends data to the user space thread ... >> through a message queue or signals to the thread waiting on a ... > A user-space signal is the equivalent of an interrupt. ... > task to indicate changes in the state of the driver. ...
    (comp.os.linux.embedded)