interrupt man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

INTERRUPT(3CC4)						       INTERRUPT(3CC4)

NAME
       interrupt Interrupt_handler - signal handling for the task library

SYNOPSIS
       #include <task.h>
       class Interrupt_handler : public object {
       public:
	    // exported constructor
	    Interrupt_handler(int signo);
	    // exported virtual function
	    virtual int pending();
       private:
	    // private virtual function
	    virtual void interrupt();
       };

DESCRIPTION
       Class Interrupt_handler provides a way for a task to wait for an exter‐
       nal Unix signal.	 It is derived from class object  so  that  tasks  may
       wait on a handler object.

       Interrupt_handler ih(signo);
	      Constructs  a new interrupt handler ih, which will wait for sig‐
	      nal number signo (see signal(3c)).  When that signal occurs, the
	      private  virtual function interrupt() is called immediately, via
	      the usual Unix signal mechanism.	When the function returns, the
	      task  which was interrupted resumes.  That is, interrupts do not
	      cause preemption within the task model.

	      A special task, the interrupt alerter, is automatically  created
	      by  the  task  system.   When a running task is suspended and an
	      interrupt has occurred  since  the  last	task  suspension,  the
	      interrupt	 alerter  is scheduled.	 The alerter alerts the Inter‐
	      rupt_handlers associated with any interrupts which have  occured
	      since the last time the alerter ran.  Any tasks waiting for such
	      handlers therefore become runnable.

	      In the absence of any interrupt handlers, the scheduling process
	      terminates  when	there are no more tasks to be run.  So long as
	      there are any interrupt handlers, scheduling will not terminate,
	      but will wait indefinitely for any interrupts which may occur.

       int i = ih.pending();
	      Always  returns  ``true'' (non-zero) except the first time it is
	      called after an interrupt occurs.

       void interrupt()
	      This is a private virtual function.  The base-class version does
	      nothing.	 Normally  you will derive a class from Interrupt_han‐
	      dler and define this function to do whatever is appropriate  for
	      that class.  See the tutorial for an example.

DIAGNOSTICS
       See task(3CC4).

SEE ALSO
       task.intro(3CC4), queue(3CC4), task(3CC4), tasksim(3CC4), and sig‐
       nal(3c).

				08 August 2000		       INTERRUPT(3CC4)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net