Intel® FPGA SDK for OpenCL™ Standard Edition: Custom Platform Toolkit User Guide

ID 683398
Date 9/24/2018
Public
Document Table of Contents

2.3.8. aocl_mmd_set_interrupt_handler

The aocl_mmd_set_interrupt_handler function sets the interrupt handler for the opened device.
When the device internals identify an asynchronous kernel event (for example, a kernel completion), the interrupt handler is called to notify the OpenCL™ runtime of the event.
Attention: Ignore the interrupts from the kernel until this handler is set.

Syntax

int aocl_mmd_set_interrupt_handler( int handle,
                                    aocl_mmd_interrupt_handler_fn fn,
                                    void* user_data );

Function Arguments

  1. handle—A positive int value representing the handle to the board obtained from the aocl_mmd_open() call.

  2. fn—The callback function to invoke when a kernel interrupt occurs. The fn argument is of type aocl_mmd_interrupt_handler_fn, which is defined as follows:
    typedef void (*aocl_mmd_interrupt_handler_fn)( int handle, void* user_data );

  3. user_data—The void* type user-provided data that passes to fn when it is called.

Return Value

If the function executes successfully, the return value is 0.

If the function fails to execute, a negative return value indicates an error.