spe_stop_info_read - Read information about the conditions in which the SPE stopped.
#include <libspe2.h>
int spe_stop_info_read (spe_context_ptr_t spe, spe_stop_info_t *stopinfo)
Parameters | |
spe | A pointer to the SPE context for which stop information is requested. |
stopinfo | A pointer to a structure of type spe_stop_info_t (specified in spe_context_run). The structure is filled with all information available as to the reason why the SPE program stopped execution. |
Reads information about the conditions in which the SPE identified by spe stopped.
This function is intended for use when the spe_context_run call returns, that is the SPE stops, in the SPE thread.
This is a non-blocking call. If the information does not exist, for example, because the context has never been run, or has already been read, for example, by another thread, the function returns an error with errno set to EAGAIN.
This function requires that the SPE context spe has been created with event support, that is, the SPE_EVENTS_ENABLE flag has been set. Otherwise, it returns an error ENOTSUP.
On success, 0 (zero) is returned.
On error, -1 is returned and errno is set to indicate the error.
Possible errors include:
ESRCH | The specified SPE context is invalid. |
EAGAIN | No data available. |
ENOTSUP | Event processing is not enabled for this SPE context. |
EINVAL | The specified pointer to an spe_stop_info_t structure is invalid. |