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


Ignore:
Timestamp:
2013-09-29T06:56:33Z (12 years ago)
Author:
Beniamino Galvani <b.galvani@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a9bd960d
Parents:
3deb0155 (diff), 13be2583 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

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

Legend:

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

    r3deb0155 rdd0c8a0  
    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

    r3deb0155 rdd0c8a0  
    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               
  • kernel/generic/src/proc/thread.c

    r3deb0155 rdd0c8a0  
    192192        kmflags &= ~FRAME_HIGHMEM;
    193193       
    194         thread->kstack = (uint8_t *) frame_alloc(STACK_FRAMES, FRAME_KA | kmflags);
    195         if (!thread->kstack) {
     194        uintptr_t stack_phys =
     195            frame_alloc(STACK_FRAMES, kmflags, STACK_SIZE - 1);
     196        if (!stack_phys) {
    196197#ifdef CONFIG_FPU
    197198                if (thread->saved_fpu_context)
     
    201202        }
    202203       
     204        thread->kstack = (uint8_t *) PA2KA(stack_phys);
     205       
    203206#ifdef CONFIG_UDEBUG
    204207        mutex_initialize(&thread->udebug.lock, MUTEX_PASSIVE);
     
    216219        thr_destructor_arch(thread);
    217220       
    218         frame_free(KA2PA(thread->kstack));
     221        frame_free(KA2PA(thread->kstack), STACK_FRAMES);
    219222       
    220223#ifdef CONFIG_FPU
Note: See TracChangeset for help on using the changeset viewer.