mirror of
https://github.com/lxsang/ant-http
synced 2025-07-26 10:39:45 +02:00
add debug code to invertigates looping buh
This commit is contained in:
@ -225,6 +225,7 @@ antd_task_t* antd_create_task(void* (*handle)(void*), void *data, void* (*callba
|
||||
task->callback = callback_of(callback);
|
||||
task->priority = NORMAL_PRIORITY;
|
||||
task->type = LIGHT;
|
||||
task->status = NOSTATUS;
|
||||
return task;
|
||||
}
|
||||
|
||||
@ -347,4 +348,4 @@ void antd_wait(antd_scheduler_t* scheduler)
|
||||
sem_wait(scheduler->scheduler_sem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
#define NORMAL_PRIORITY ((int)((N_PRIORITY - 1) / 2))
|
||||
#define LOW_PRIORITY (N_PRIORITY - 1)
|
||||
#define HIGH_PRIORITY 0
|
||||
|
||||
#define NOSTATUS 0x00
|
||||
typedef enum { LIGHT, HEAVY } antd_task_type_t;
|
||||
// callback definition
|
||||
typedef struct __callback_t{
|
||||
@ -27,6 +27,13 @@ typedef struct {
|
||||
higher value is lower priority
|
||||
*/
|
||||
uint8_t priority;
|
||||
/*
|
||||
The status of a task
|
||||
should be set by the application
|
||||
default value 0x00 means that
|
||||
there is no status set
|
||||
*/
|
||||
uint8_t status;
|
||||
/*
|
||||
the callback
|
||||
*/
|
||||
@ -109,4 +116,5 @@ int antd_task_schedule(antd_scheduler_t*);
|
||||
wait for event
|
||||
*/
|
||||
void antd_wait(antd_scheduler_t*);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user