Xenomai
3.1
|
Services for scheduling function calls in the Linux domain. More...
Functions | |
int | xnapc_alloc (const char *name, void(*handler)(void *cookie), void *cookie) |
Allocate an APC slot. More... | |
void | xnapc_free (int apc) |
Releases an APC slot. More... | |
static void | xnapc_schedule (int apc) |
Schedule an APC invocation. More... | |
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.
int xnapc_alloc | ( | const char * | name, |
void(*)(void *cookie) | handler, | ||
void * | cookie | ||
) |
Allocate an APC slot.
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.
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. |
void xnapc_free | ( | int | apc | ) |
Releases an APC slot.
This service deallocates an APC slot obtained by xnapc_alloc().
apc | The APC id. to release, as returned by a successful call to the xnapc_alloc() service. |
|
inlinestatic |
Schedule an APC invocation.
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.
apc | The APC id. to schedule. |
This service can be called from: