Detailed Description

Services for scheduling function calls in the Linux domain.

APC is the acronym for Asynchronous Procedure Call, a mean by which activities from the Xenomai domain can schedule deferred invocations of handlers to be run into the Linux domain, as soon as possible when the Linux kernel gets back in control.

Up to BITS_PER_LONG APC slots can be active at any point in time.

APC support is built upon the interrupt pipeline's virtual interrupt support.

Function Documentation

APC is the acronym for Asynchronous Procedure Call, a mean by which activities from the Xenomai domain can schedule deferred invocations of handlers to be run into the Linux domain, as soon as possible when the Linux kernel gets back in control. Up to BITS_PER_LONG APC slots can be active at any point in time. APC support is built upon the interrupt pipeline's virtual interrupt support.

Any Linux kernel service which is callable from a regular Linux interrupt handler is in essence available to APC handlers.

Parameters

name

is a symbolic name identifying the APC which will get reported through the /proc/xenomai/apc interface. Passing NULL to create an anonymous APC is allowed.

handler

The address of the fault handler to call upon exception condition. The handle will be passed the cookie value unmodified.

cookie

A user-defined opaque pointer the APC handler receives as its sole argument.

Returns

a valid APC identifier is returned upon success, or a negative error code otherwise:

This service marks the APC as pending for the Linux domain, so that its handler will be called as soon as possible, when the Linux domain gets back in control.

When posted from the Linux domain, the APC handler is fired as soon as the interrupt mask is explicitly cleared by some kernel code. When posted from the Xenomai domain, the APC handler is fired as soon as the Linux domain is resumed, i.e. after Xenomai has completed all its pending duties.

Parameters

apc

The APC id. to schedule.

This service can be called from:

Any domain context, albeit the usual calling place is from the Xenomai domain.