Changeset bb68433 in mainline for generic/src/proc/task.c


Ignore:
Timestamp:
2006-02-08T22:58:06Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e4e532
Parents:
85dc2e7
Message:

Changed malloc to include second parameter and documented
recommended usage.
Added zone merging, made ia32 & amd64 to merge found zones.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/proc/task.c

    r85dc2e7 rbb68433  
    6565        task_t *ta;
    6666       
    67         ta = (task_t *) malloc(sizeof(task_t));
    68         if (ta) {
    69                 spinlock_initialize(&ta->lock, "task_ta_lock");
    70                 list_initialize(&ta->th_head);
    71                 list_initialize(&ta->tasks_link);
    72                 ta->as = as;
    73                
    74                 ipl = interrupts_disable();
    75                 spinlock_lock(&tasks_lock);
    76                 list_append(&ta->tasks_link, &tasks_head);
    77                 spinlock_unlock(&tasks_lock);
    78                 interrupts_restore(ipl);
    79         }
     67        ta = (task_t *) malloc(sizeof(task_t), 0);
     68
     69        spinlock_initialize(&ta->lock, "task_ta_lock");
     70        list_initialize(&ta->th_head);
     71        list_initialize(&ta->tasks_link);
     72        ta->as = as;
     73       
     74        ipl = interrupts_disable();
     75        spinlock_lock(&tasks_lock);
     76        list_append(&ta->tasks_link, &tasks_head);
     77        spinlock_unlock(&tasks_lock);
     78        interrupts_restore(ipl);
     79
    8080        return ta;
    8181}
Note: See TracChangeset for help on using the changeset viewer.