LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-09-2005, 01:14 PM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 704

Rep: Reputation: 30
(linux) handler


I am constantly finding the "handler" keyword in the linux source. I thought it had only to do with interrupts (interrupt handlers,etc), however i see it in other forms,too; for example "Call the commit handler in the driver". Is "handler" a more general naming convention? To what does it usually refer to? So far i have understood, that it generally refers to functions, which finish certain jobs. If you can point me to any links ...
Thanks

Last edited by kpachopoulos; 11-09-2005 at 01:17 PM.
 
Old 11-09-2005, 01:28 PM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 56
I have never seen "handler" refer to anything except a function that's called to, well, handle something. Usually an event or signal that's called asynchronously.
 
Old 11-10-2005, 03:12 AM   #3
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
In c++ terminology (can also be in c) , a handler (also called an exception handler) is a piece of code that manages program events : it catches the event and reacts to it.
Similarly (as being said) you can also have signal handlers. You tell your program that whenever a signal appears, it has to be treated by sig_handler. Then all the error/signal/events/.. are handled in the same function.
The same applies for an interrupt, as yous said. When an interrupt is raised, the handler deals with it, does the action and returns.

A handler can also be an overclass. Rather than using directly a door, you will use the handle to open the door. In that way a handler can also be a helper and this helper can be reused for other objects ( a trunk, a window,..) , it centralizes the entry for an action.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 02:17 PM
Linux Interrupt Handler lucky6969b Linux - Software 1 12-01-2005 11:55 AM
Custom Timer Interrupt Handler Linux 2.4x ratwings Linux - Software 2 01-13-2005 01:51 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
File Handler Limitations in Linux? m3kgt Linux - General 2 01-09-2004 01:08 PM


All times are GMT -5. The time now is 08:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration