Ignore:
Timestamp:
Aug 22, 2017, 1:44:12 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
80c72a7
Parents:
e50e9ff
Message:

Implemented search for external scheduling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/invoke.h

    re50e9ff r90c4df0  
    2828      #define thread_local _Thread_local
    2929
     30      typedef void (*fptr_t)();
     31
    3032      struct spinlock {
    3133            volatile int lock;
     
    5052            void append( struct __thread_queue_t *, struct thread_desc * );
    5153            struct thread_desc * pop_head( struct __thread_queue_t * );
     54            struct thread_desc * remove( struct __thread_queue_t *, struct thread_desc ** );
    5255
    5356            void ?{}( struct __condition_stack_t * );
     
    9194            unsigned short acceptable_count;          // number of acceptable functions
    9295            short accepted_index;                     // the index of the accepted function, -1 if none
    93             void (*pre_accept)(void);                 // function to run before an accept
     96            fptr_t pre_accept;                        // function to run before an accept
    9497       };
    9598
    9699      struct thread_desc {
     100            // Core threading fields
    97101            struct coroutine_desc cor;                // coroutine body used to store context
    98102            struct monitor_desc mon;                  // monitor body used for mutual exclusion
     103
     104            // Link lists fields
    99105            struct thread_desc * next;                // instrusive link field for threads
     106
     107            // Current status related to monitors
    100108            struct monitor_desc ** current_monitors;  // currently held monitors
    101109            unsigned short current_monitor_count;     // number of currently held monitors
     110            fptr_t current_monitor_func;              // last function that acquired monitors
    102111     };
    103112
Note: See TracChangeset for help on using the changeset viewer.