File:  [ELWIX - Embedded LightWeight unIX -] / libaitsched / example / test.c
Revision 1.1.2.1: download - view: text, annotated - select for diffs - revision graph
Fri Aug 12 23:06:55 2011 UTC (14 years ago) by misho
Branches: sched1_0
fix init pre-hook
add tailq init
import unit test

#include <stdio.h>
#include <aitsched.h>

void *event(void *arg)
{
	return NULL;
}

int
main(int argc, char **argv)
{
	sched_root_task_t *root;

	root = schedBegin();
	if (!root) {
		printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
		return 1;
	}

	if (!schedEvent(root, event, "piuk", 1234)) {
		printf("Error:: #%d - %s\n", sched_GetErrno(), sched_GetError());
		return 2;
	}

	schedEnd(root);
	return 0;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>