Changeset 212c2187 for libcfa/src/concurrency/invoke.h
- Timestamp:
- Apr 1, 2019, 2:04:14 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2fabdc02
- Parents:
- b611fc3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/invoke.h
rb611fc3 r212c2187 50 50 51 51 extern thread_local struct KernelThreadData { 52 struct coroutine_desc * volatile this_coroutine;53 52 struct thread_desc * volatile this_thread; 54 53 struct processor * volatile this_processor; … … 61 60 } kernelTLS __attribute__ ((tls_model ( "initial-exec" ))); 62 61 } 63 64 static inline struct coroutine_desc * volatile active_coroutine() { return TL_GET( this_coroutine ); }65 static inline struct thread_desc * volatile active_thread () { return TL_GET( this_thread ); }66 static inline struct processor * volatile active_processor() { return TL_GET( this_processor ); } // UNSAFE67 62 #endif 68 63 … … 170 165 struct thread_desc * prev; 171 166 } node; 172 }; 173 174 #ifdef __cforall 175 extern "Cforall" { 167 }; 168 169 #ifdef __cforall 170 extern "Cforall" { 171 static inline struct coroutine_desc * volatile active_coroutine() { return TL_GET( this_thread )->curr_cor; } 172 static inline struct thread_desc * volatile active_thread () { return TL_GET( this_thread ); } 173 static inline struct processor * volatile active_processor() { return TL_GET( this_processor ); } // UNSAFE 174 176 175 static inline thread_desc * & get_next( thread_desc & this ) { 177 176 return this.next; … … 232 231 extern void CtxInvokeStub( void ); 233 232 void CtxSwitch( void * from, void * to ) asm ("CtxSwitch"); 233 // void CtxStore ( void * this ) asm ("CtxStore"); 234 // void CtxRet ( void * dst ) asm ("CtxRet"); 234 235 235 236 #if defined( __i386 )
Note: See TracChangeset
for help on using the changeset viewer.