Changeset 1affcdf3 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2011-06-10T19:33:41Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1878386
Parents:
13ecdac9 (diff), 79a141a (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

File:
1 edited

Legend:

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

    r13ecdac9 r1affcdf3  
    5555#include <time/clock.h>
    5656#include <time/timeout.h>
     57#include <time/delay.h>
    5758#include <config.h>
    5859#include <arch/interrupt.h>
     
    6768#include <syscall/copy.h>
    6869#include <errno.h>
    69 
    70 
    71 #ifndef LOADED_PROG_STACK_PAGES_NO
    72 #define LOADED_PROG_STACK_PAGES_NO 1
    73 #endif
    74 
    7570
    7671/** Thread states */
     
    300295       
    301296        /* Not needed, but good for debugging */
    302         memsetb(thread->kstack, THREAD_STACK_SIZE * 1 << STACK_FRAMES, 0);
     297        memsetb(thread->kstack, STACK_SIZE, 0);
    303298       
    304299        irq_spinlock_lock(&tidlock, true);
     
    308303        context_save(&thread->saved_context);
    309304        context_set(&thread->saved_context, FADDR(cushion),
    310             (uintptr_t) thread->kstack, THREAD_STACK_SIZE);
     305            (uintptr_t) thread->kstack, STACK_SIZE);
    311306       
    312307        the_initialize((the_t *) thread->kstack);
     
    605600                printf("%-8" PRIu64 " %-14s %10p %-8s %10p %-5" PRIu32 "\n",
    606601                    thread->tid, name, thread, thread_states[thread->state],
    607                     thread->task, thread->task->context);
     602                    thread->task, thread->task->container);
    608603#endif
    609604       
     
    617612                printf("%-8" PRIu64 " %-14s %18p %-8s %18p %-5" PRIu32 "\n",
    618613                    thread->tid, name, thread, thread_states[thread->state],
    619                     thread->task, thread->task->context);
     614                    thread->task, thread->task->container);
    620615#endif
    621616       
     
    658653        else
    659654                printf("[id    ] [name        ] [address ] [state ] [task    ]"
    660                     " [ctx]\n");
     655                    " [ctn]\n");
    661656#endif
    662657       
     
    667662        } else
    668663                printf("[id    ] [name        ] [address         ] [state ]"
    669                     " [task            ] [ctx]\n");
     664                    " [task            ] [ctn]\n");
    670665#endif
    671666       
     
    918913}
    919914
     915sysarg_t sys_thread_udelay(uint32_t usec)
     916{
     917        delay(usec);
     918        return 0;
     919}
     920
    920921/** @}
    921922 */
Note: See TracChangeset for help on using the changeset viewer.