INTERRUPT_CREATE

Purpose

interrupt_create creates a new interruption handler. 

Synopsis

#include <types.h>   
#include <stub.h>   

int interrupt_create(Word irq, Capability *thread, Capability *interrupt); 

Parameters

Description

interrupt_create creates a new interruption handler to handle the irq interruption. The created interruption handler is associated to a new capability that is returned through interrupt. If the requested interruption  already have a handler, then maibox_create fails. 

Return Values

On success, interrupt_create returns 0 and interrupt contains a valid owner capability for the created interruption handler.   

On fail, interrupt_create returns a negative value indicating one of the following errors:   

See Also

interrupt_destroy, interrupt_status 

Notes

The thread assigned to handle an interruption automatically gain access to the I/O ports.