Changeset 55b77d9 in mainline for kernel/generic/src/proc/task.c


Ignore:
Timestamp:
2011-06-17T20:39:16Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f164724
Parents:
98caf49
Message:

Separate list_t typedef from link_t (kernel part).

  • list_t represents lists
  • Use list_first(), list_last(), list_empty() where appropriate
  • Use list_foreach() where possible
  • Replace improper uses of list_prepend() with list_insert_after()
  • Replace improper uses of list_append() with list_insert_before()
File:
1 edited

Legend:

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

    r98caf49 r55b77d9  
    155155        mutex_initialize(&task->futexes_lock, MUTEX_PASSIVE);
    156156       
    157         list_initialize(&task->th_head);
    158         list_initialize(&task->sync_box_head);
     157        list_initialize(&task->threads);
     158        list_initialize(&task->sync_boxes);
    159159       
    160160        ipc_answerbox_init(&task->answerbox, task);
     
    435435       
    436436        /* Current values of threads */
    437         link_t *cur;
    438         for (cur = task->th_head.next; cur != &task->th_head; cur = cur->next) {
     437        list_foreach(task->threads, cur) {
    439438                thread_t *thread = list_get_instance(cur, thread_t, th_link);
    440439               
     
    468467         */
    469468       
    470         link_t *cur;
    471         for (cur = task->th_head.next; cur != &task->th_head; cur = cur->next) {
     469        list_foreach(task->threads, cur) {
    472470                thread_t *thread = list_get_instance(cur, thread_t, th_link);
    473471                bool sleeping = false;
Note: See TracChangeset for help on using the changeset viewer.