Changeset 8cf6709 in mainline for uspace/lib/c/generic/fibril.c


Ignore:
Timestamp:
2011-02-20T11:02:30Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a99330e
Parents:
b927375
Message:

Initialize fibril's pointer to waited-for object in fibril_setup()
rather than in fibril_create(). This fixes the problem of uninitialized
pointer for the implicit fibrils, i.e. those executing main() or
thread_main().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/fibril.c

    rb927375 r8cf6709  
    115115        fibril->retval = 0;
    116116        fibril->flags = 0;
     117       
     118        fibril->waits_for = NULL;
    117119       
    118120        return fibril;
     
    276278        fibril->arg = arg;
    277279
    278         fibril->waits_for = NULL;
    279        
    280280        context_save(&fibril->ctx);
    281281        context_set(&fibril->ctx, FADDR(fibril_main), fibril->stack,
Note: See TracChangeset for help on using the changeset viewer.