Changeset 9a3b469 in mainline for uspace/lib/c/generic/thread.c


Ignore:
Timestamp:
2012-12-04T04:09:08Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d54b303
Parents:
1b7eec9
Message:

malloc avoids using futexes during initialization of the main thread of a program.

File:
1 edited

Legend:

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

    r1b7eec9 r9a3b469  
    4646#include "private/thread.h"
    4747
     48/**
     49 * The number of threads that have been created and initialized since
     50 * the start of the program.
     51 */
     52atomic_t _created_thread_cnt = {0};
     53
    4854/** Main thread function.
    4955 *
     
    6268       
    6369        __tcb_set(fibril->tcb);
     70       
     71        atomic_inc(&_created_thread_cnt);
    6472       
    6573        uarg->uspace_thread_function(uarg->uspace_thread_arg);
Note: See TracChangeset for help on using the changeset viewer.