removed obsolete heap_{start,end} from task_t
This commit is contained in:
parent
c6d5656c63
commit
e740cf265e
2 changed files with 9 additions and 16 deletions
|
@ -100,10 +100,6 @@ typedef struct task {
|
||||||
filp_t* fildes_table;
|
filp_t* fildes_table;
|
||||||
/// starting time/tick of the task
|
/// starting time/tick of the task
|
||||||
uint64_t start_tick;
|
uint64_t start_tick;
|
||||||
/// start address of the heap
|
|
||||||
size_t start_heap;
|
|
||||||
/// end address of the heap
|
|
||||||
size_t end_heap;
|
|
||||||
/// the userspace heap
|
/// the userspace heap
|
||||||
vma_t* heap;
|
vma_t* heap;
|
||||||
/// LwIP error code
|
/// LwIP error code
|
||||||
|
|
|
@ -47,26 +47,27 @@
|
||||||
* A task's id will be its position in this array.
|
* A task's id will be its position in this array.
|
||||||
*/
|
*/
|
||||||
static task_t task_table[MAX_TASKS] = { \
|
static task_t task_table[MAX_TASKS] = { \
|
||||||
[0] = {0, TASK_IDLE, NULL, NULL, 0, 0, 0, NULL, NULL, 0, ATOMIC_INIT(0), SPINLOCK_IRQSAVE_INIT, NULL, SPINLOCK_INIT, NULL, NULL, 0, 0, 0, 0}, \
|
[0] = {0, TASK_IDLE, NULL, NULL, 0, 0, 0, NULL, NULL, 0, ATOMIC_INIT(0), SPINLOCK_IRQSAVE_INIT, 0, SPINLOCK_INIT, NULL, NULL, 0, NULL}, \
|
||||||
[1 ... MAX_TASKS-1] = {0, TASK_INVALID, NULL, NULL, 0, 0, 0, NULL, NULL, 0, ATOMIC_INIT(0), SPINLOCK_IRQSAVE_INIT, NULL, SPINLOCK_INIT, NULL, NULL, 0, 0, 0, 0}};
|
[1 ... MAX_TASKS-1] = {0, TASK_INVALID, NULL, NULL, 0, 0, 0, NULL, NULL, 0, ATOMIC_INIT(0), SPINLOCK_IRQSAVE_INIT, 0, SPINLOCK_INIT, NULL, NULL, 0, NULL}
|
||||||
|
};
|
||||||
static spinlock_irqsave_t table_lock = SPINLOCK_IRQSAVE_INIT;
|
static spinlock_irqsave_t table_lock = SPINLOCK_IRQSAVE_INIT;
|
||||||
#ifndef CONFIG_TICKLESS
|
#ifndef CONFIG_TICKLESS
|
||||||
#if MAX_CORES > 1
|
#if MAX_CORES > 1
|
||||||
static runqueue_t runqueues[MAX_CORES] = { \
|
static runqueue_t runqueues[MAX_CORES] = { \
|
||||||
[0] = {task_table+0, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}, \
|
[0] = {task_table+0, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}, \
|
||||||
[1 ... MAX_CORES-1] = {NULL, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
[1 ... MAX_CORES-1] = {NULL, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
||||||
#else
|
#else
|
||||||
static runqueue_t runqueues[1] = { \
|
static runqueue_t runqueues[1] = { \
|
||||||
[0] = {task_table+0, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
[0] = {task_table+0, NULL, 0, {[0 ... 2] = 0}, TIMER_FREQ/5, TIMER_FREQ/2, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if MAX_CORES > 1
|
#if MAX_CORES > 1
|
||||||
static runqueue_t runqueues[MAX_CORES] = { \
|
static runqueue_t runqueues[MAX_CORES] = { \
|
||||||
[0] = {task_table+0, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}, \
|
[0] = {task_table+0, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}, \
|
||||||
[1 ... MAX_CORES-1] = {NULL, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
[1 ... MAX_CORES-1] = {NULL, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
||||||
#else
|
#else
|
||||||
static runqueue_t runqueues[1] = { \
|
static runqueue_t runqueues[1] = { \
|
||||||
[0] = {task_table+0, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
[0] = {task_table+0, NULL, 0, 0, {[0 ... MAX_PRIO-1] = {NULL, NULL}}, {NULL, NULL}, SPINLOCK_IRQSAVE_INIT}};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -389,8 +390,6 @@ static int create_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio, uin
|
||||||
|
|
||||||
ret = create_default_frame(new_task, ep, arg);
|
ret = create_default_frame(new_task, ep, arg);
|
||||||
|
|
||||||
new_task->start_heap = 0;
|
|
||||||
new_task->end_heap = 0;
|
|
||||||
new_task->lwip_err = 0;
|
new_task->lwip_err = 0;
|
||||||
new_task->start_tick = get_clock_tick();
|
new_task->start_tick = get_clock_tick();
|
||||||
|
|
||||||
|
@ -475,8 +474,6 @@ int sys_fork(void)
|
||||||
child_task->flags = parent_task->flags;
|
child_task->flags = parent_task->flags;
|
||||||
memcpy(&child_task->fpu, &parent_task->fpu, sizeof(union fpu_state));
|
memcpy(&child_task->fpu, &parent_task->fpu, sizeof(union fpu_state));
|
||||||
child_task->start_tick = get_clock_tick();
|
child_task->start_tick = get_clock_tick();
|
||||||
child_task->start_heap = 0;
|
|
||||||
child_task->end_heap = 0;
|
|
||||||
child_task->lwip_err = 0;
|
child_task->lwip_err = 0;
|
||||||
child_task->prio = parent_task->prio;
|
child_task->prio = parent_task->prio;
|
||||||
child_task->last_core = parent_task->last_core;
|
child_task->last_core = parent_task->last_core;
|
||||||
|
|
Loading…
Add table
Reference in a new issue