spe_program_load

NAME

spe_program_load - Load an SPE main program.

SYNOPSIS

#include <libspe2.h>

int spe_program_load (spe_context_ptr_t spe, spe_program_handle_t *program)

Parameters  
spe A valid pointer to the SPE context for which an SPE program should be loaded.
program A valid address of a mapped SPE program.

DESCRIPTION

Load an SPE main program that has been mapped to memory at the address pointed to by program into the local store of the SPE identified by the SPE context spe. This is mandatory before running the SPE context with spe_context_run.

RETURN VALUE

On success, 0 (zero) is returned.

EXIT STATUS

On error, -1 is returned and errno is set to indicate the error.

Possible errors include:

ESRCH The specified SPE context is not valid.
EINVAL The specified address of the SPE program is not valid.
ENOEXEC The program image is not correctly formatted.

SEE ALSO

spe_context_run(3); spe_image_close(3)