version 1.1.1.1.2.1, 2011/08/11 22:55:28
|
version 1.1.1.1.2.3, 2011/08/13 17:26:26
|
Line 47 SUCH DAMAGE.
|
Line 47 SUCH DAMAGE.
|
#define __AITSCHED_H |
#define __AITSCHED_H |
|
|
|
|
|
#include <sys/types.h> |
|
#include <sys/queue.h> |
|
#include <sys/uio.h> |
|
|
|
|
/* criteria type */ |
/* criteria type */ |
#define CRITERIA_CALL 0 |
#define CRITERIA_CALL 0 |
#define CRITERIA_ARG 1 |
#define CRITERIA_ARG 1 |
Line 102 struct sched_HooksTask {
|
Line 107 struct sched_HooksTask {
|
typedef struct sched_HooksTask hooks_task_t; |
typedef struct sched_HooksTask hooks_task_t; |
|
|
/* task callback, like pthread callback! */ |
/* task callback, like pthread callback! */ |
typedef void *(*sched_task_func_t)(void *); | typedef void *(*sched_task_func_t)(void * /*sched_task_t* - current task data*/); |
|
|
/* task & queue */ |
/* task & queue */ |
struct sched_Task { |
struct sched_Task { |
Line 152 struct sched_RootTask {
|
Line 157 struct sched_RootTask {
|
}; |
}; |
|
|
|
|
|
inline int sched_GetErrno(); |
|
inline const char *sched_GetError(); |
|
inline void sched_SetErr(int, char *, ...); |
|
|
|
|
/* |
/* |
* schedInit() - Init scheduler |
* schedInit() - Init scheduler |
* @data = optional data if !=NULL |
* @data = optional data if !=NULL |
Line 159 struct sched_RootTask {
|
Line 169 struct sched_RootTask {
|
* return: allocated root task if ok or NULL error |
* return: allocated root task if ok or NULL error |
*/ |
*/ |
sched_root_task_t *schedInit(void ** __restrict data, size_t datlen); |
sched_root_task_t *schedInit(void ** __restrict data, size_t datlen); |
#define schedBegin() schedInit(&schedRegisterHooks, 0) | #define schedBegin() schedInit((void**) &schedRegisterHooks, 0) |
/* |
/* |
* schedEnd() - End scheduler & free all resources |
* schedEnd() - End scheduler & free all resources |
* @root = root task |
* @root = root task |