File: testsinglemini.c

package info (click to toggle)
libspe2 2.2.80-95-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 940 kB
  • ctags: 1,214
  • sloc: ansic: 9,316; makefile: 551; ada: 448; sh: 24
file content (21 lines) | stat: -rw-r--r-- 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <stdlib.h>
#include "libspe2.h"

int main()
{
	spe_context_ptr_t ctx;
	unsigned int flags = 0;
	unsigned int entry = SPE_DEFAULT_ENTRY;
	void * argp = NULL;
	void * envp = NULL;
	spe_program_handle_t * program;
	
	program = spe_image_open("hello");

	ctx = spe_context_create(flags, 0);
	spe_program_load(ctx, program);
	spe_context_run(ctx, &entry, flags, argp, envp, NULL);
	spe_context_destroy(ctx);
}