/**********************************************************************

	Title :                 Task module header file
	Filename :              task.h
	Author :                Thomas Szirtes
	Revision :              1.1

	Notes :                 General purpose simple multi-tasker.
							Linked list implementation
							
	Copyright :             (C) SEGA Europe 1998

  **********************************************************************/

#ifndef _INC_TASK_H
#define _INC_TASK_H


typedef struct task	{
	void			(*func)(struct task *);
	void			*data;
	int				life;
	struct task		*next;
	struct task		*prev;
} TASK;


TASK *TASK_Insert( TASK * );
TASK *TASK_Delete( TASK * );
TASK *TASK_New( void );
void TASK_Process( TASK * );
void TASK_ProcessAll( TASK * );
void TASK_DeleteAll( TASK * );


/* Macro for quick task definition */
#define	SET_TASK(t,f,d)	t->func	= f; t->data = (void *)d;

#endif