LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-27-2008, 02:12 PM   #1
Harini1111
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
Linux Asynchronous event


Hi all,

I want to get notified my user space application from kernel space whenever my USB serial device has been either added or removed (asynchronous I/O notification).

I tried Linux hotplugging via udev rules it works fine but I looking for a callback (or similar) mechanism or Can I send an events from my USB serial driver module to user space application? Or Can I use Linux signal to notify those asynchronous evens from kernel space to user space?

Thanks,
Raj
 
Old 08-27-2008, 08:55 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Harini1111 View Post
I want to get notified my user space application from kernel space whenever my USB serial device has been either added or removed (asynchronous I/O notification).
I waited to answer this in case someone else had a bright idea. I think the only way to handle this is to create a separate thread that polls to see of your device has been added.
 
Old 08-30-2008, 05:02 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,671
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
You didn't look hard enough ... see "hotplug" or "coldplug."

What you do when hotplug senses the event is up to you. If you want to invoke a program that sends a message to some socket...
 
  


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
Fire Event from other event in Visual C++ Express Edition chrisliando Programming 1 11-08-2007 05:12 PM
asynchronous I/O for Linux 2.6 problems.... Petros Koutoupis Programming 2 02-27-2007 03:57 PM
LXer: Linux: Syslets, Generic Asynchronous System Call Support LXer Syndicated Linux News 0 02-15-2007 10:16 PM
Programming asynchronous I/O in Linux with C iuaui Programming 2 09-30-2005 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:33 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