Changeset 90c4df0 for src/libcfa/concurrency/invoke.h
- Timestamp:
- Aug 22, 2017, 1:44:12 PM (6 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.h
re50e9ff r90c4df0 28 28 #define thread_local _Thread_local 29 29 30 typedef void (*fptr_t)(); 31 30 32 struct spinlock { 31 33 volatile int lock; … … 50 52 void append( struct __thread_queue_t *, struct thread_desc * ); 51 53 struct thread_desc * pop_head( struct __thread_queue_t * ); 54 struct thread_desc * remove( struct __thread_queue_t *, struct thread_desc ** ); 52 55 53 56 void ?{}( struct __condition_stack_t * ); … … 91 94 unsigned short acceptable_count; // number of acceptable functions 92 95 short accepted_index; // the index of the accepted function, -1 if none 93 void (*pre_accept)(void);// function to run before an accept96 fptr_t pre_accept; // function to run before an accept 94 97 }; 95 98 96 99 struct thread_desc { 100 // Core threading fields 97 101 struct coroutine_desc cor; // coroutine body used to store context 98 102 struct monitor_desc mon; // monitor body used for mutual exclusion 103 104 // Link lists fields 99 105 struct thread_desc * next; // instrusive link field for threads 106 107 // Current status related to monitors 100 108 struct monitor_desc ** current_monitors; // currently held monitors 101 109 unsigned short current_monitor_count; // number of currently held monitors 110 fptr_t current_monitor_func; // last function that acquired monitors 102 111 }; 103 112
Note: See TracChangeset
for help on using the changeset viewer.