Changeset 32fffef0 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2006-08-29T11:06:57Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0fa6044
Parents:
c8ea4a8b
Message:

Define architecture-specific thread sub-constructors and sub-destructors on all architectures.
Define the THREAD_FLAG_USPACE which means that the thread runs in user space.
The forementioned changes allow for allocating of user window buffer on sparc64
threads that execute in userspace.

A lot of formatting and indentation fixes.

File:
1 edited

Legend:

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

    rc8ea4a8b r32fffef0  
    130130        link_initialize(&t->wq_link);
    131131        link_initialize(&t->th_link);
     132
     133        /* call the architecture-specific part of the constructor */
     134        thr_constructor_arch(t);
    132135       
    133136#ifdef ARCH_HAS_FPU
     
    157160{
    158161        thread_t *t = (thread_t *) obj;
     162
     163        /* call the architecture-specific part of the destructor */
     164        thr_destructor_arch(t);
    159165
    160166        frame_free(KA2PA(t->kstack));
     
    211217       
    212218        cpu = CPU;
    213         if (t->flags & X_WIRED) {
     219        if (t->flags & THREAD_FLAG_WIRED) {
    214220                cpu = t->cpu;
    215221        }
     
    296302        if (!t)
    297303                return NULL;
    298 
    299         thread_create_arch(t);
    300304       
    301305        /* Not needed, but good for debugging */
     
    324328        t->priority = -1;               /* start in rq[0] */
    325329        t->cpu = NULL;
    326         t->flags = 0;
     330        t->flags = flags;
    327331        t->state = Entering;
    328332        t->call_me = NULL;
     
    348352        t->fpu_context_exists = 0;
    349353        t->fpu_context_engaged = 0;
     354
     355        thread_create_arch(t);          /* might depend on previous initialization */
    350356       
    351357        /*
     
    590596        }
    591597
    592         if ((t = thread_create(uinit, kernel_uarg, TASK, 0, namebuf))) {
     598        if ((t = thread_create(uinit, kernel_uarg, TASK, THREAD_FLAG_USPACE, namebuf))) {
    593599                tid = t->tid;
    594600                thread_ready(t);
Note: See TracChangeset for help on using the changeset viewer.