Changeset 7fbe450


Ignore:
Timestamp:
Jan 18, 2017, 12:06:44 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:
c84e80a
Parents:
c49bf54
Message:

No longer using co_main for coroutines/threads, now simply using main

Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/examples/thread.c

    rc49bf54 r7fbe450  
    2626void ^?{}( MyThread * this ) {}
    2727
    28 void co_main(MyThread* this) {
     28void main(MyThread* this) {
    2929        printf("Main called with %p\n", this);
    3030        printf("Thread value is %d\n", this->value);
     
    4444        printf("Address %p\n", this);
    4545        printf("handle %p\n", get_thread(this));
    46         printf("main %p\n", co_main);
     46        printf("main %p\n", main);
    4747        printf("get_t %p\n", get_thread);
    4848        printf("invoke %p\n", CtxInvokeThread);
     
    5757        thread(MyThread) thread1;
    5858
    59         printf("Main is %p\n", this_coroutine());       
     59        printf("Main is %p\n", this_coroutine());
    6060
    6161        printf("First thread created\n");
  • src/libcfa/concurrency/coroutines

    rc49bf54 r7fbe450  
    2626// Anything that is resumed is a coroutine.
    2727trait is_coroutine(dtype T) {
    28       void co_main(T * this);
     28      void main(T * this);
    2929      coroutine * get_coroutine(T * this);
    3030};
  • src/libcfa/concurrency/threads

    rc49bf54 r7fbe450  
    2828// Anything that is resumed is a coroutine.
    2929trait is_thread(dtype T /*| sized(T)*/) {
    30       void co_main(T* this);
     30      void main(T* this);
    3131      thread_h* get_thread(T* this);
    3232        /*void ?{}(T*);
  • src/tests/coroutine.c

    rc49bf54 r7fbe450  
    1515}
    1616
    17 void co_main(Fibonacci* this) {
     17void main(Fibonacci* this) {
    1818#ifdef MORE_DEBUG
    1919      sout | "Starting main of coroutine " | this | endl;
Note: See TracChangeset for help on using the changeset viewer.