Changeset feeac0d in mainline for kernel/generic/src/proc


Ignore:
Timestamp:
2013-09-10T16:32:35Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4982d87
Parents:
e8d6ce2
Message:

Simplify use of list_foreach.

Location:
kernel/generic/src/proc
Files:
2 edited

Legend:

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

    re8d6ce2 rfeeac0d  
    739739                       
    740740                        printf("\trq[%u]: ", i);
    741                         list_foreach(cpus[cpu].rq[i].rq, cur) {
    742                                 thread_t *thread = list_get_instance(cur,
    743                                     thread_t, rq_link);
     741                        list_foreach(cpus[cpu].rq[i].rq, rq_link, thread_t,
     742                            thread) {
    744743                                printf("%" PRIu64 "(%s) ", thread->tid,
    745744                                    thread_states[thread->state]);
  • kernel/generic/src/proc/task.c

    re8d6ce2 rfeeac0d  
    452452       
    453453        /* Current values of threads */
    454         list_foreach(task->threads, cur) {
    455                 thread_t *thread = list_get_instance(cur, thread_t, th_link);
    456                
     454        list_foreach(task->threads, th_link, thread_t, thread) {
    457455                irq_spinlock_lock(&thread->lock, false);
    458456               
     
    484482         */
    485483       
    486         list_foreach(task->threads, cur) {
    487                 thread_t *thread = list_get_instance(cur, thread_t, th_link);
     484        list_foreach(task->threads, th_link, thread_t, thread) {
    488485                bool sleeping = false;
    489486               
Note: See TracChangeset for help on using the changeset viewer.