Ignore:
Timestamp:
Mar 23, 2017, 3:05:36 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
ae6f1ec
Parents:
bcda04c
Message:

Implemented thread keyword

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread.c

    rbcda04c rbd4d011  
    3131
    3232//-----------------------------------------------------------------------------
    33 // Forward declarations
    34 forall( dtype T | is_thread(T) )
    35 void start( T* this );
    36 
    37 //-----------------------------------------------------------------------------
    3833// Thread ctors and dtors
    3934
     
    5348void ?{}( scoped(T)* this ) {
    5449        (&this->handle){};
    55         start(&this->handle);
     50        __thrd_start(&this->handle);
    5651}
    5752
     
    5954void ?{}( scoped(T)* this, P params ) {
    6055        (&this->handle){ params };
    61         start(&this->handle);
     56        __thrd_start(&this->handle);
    6257}
    6358
     
    7065// Starting and stopping threads
    7166forall( dtype T | is_thread(T) )
    72 void start( T* this ) {
     67void __thrd_start( T* this ) {
    7368        coroutine_desc* thrd_c = get_coroutine(this);
    7469        thread_desc*  thrd_h = get_thread   (this);
Note: See TracChangeset for help on using the changeset viewer.