Changeset ffe2fad for libcfa/src/concurrency
- Timestamp:
- Apr 23, 2019, 2:41:32 PM (6 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:
- 673cd63
- Parents:
- 8c3a0336
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r8c3a0336 rffe2fad 70 70 bool userStack = ((intptr_t)this.storage & 0x1) != 0; 71 71 if ( ! userStack && this.storage ) { 72 *((intptr_t*)&this.storage) &= (intptr_t)-1; 72 __attribute__((may_alias)) intptr_t * istorage = (intptr_t *)&this.storage; 73 *istorage &= (intptr_t)-1; 74 73 75 void * storage = this.storage->limit; 74 76 __cfaabi_dbg_debug_do( … … 174 176 this->storage->limit = storage; 175 177 this->storage->base = (void*)((intptr_t)storage + size); 176 *((intptr_t*)&this->storage) |= userStack ? 0x1 : 0x0; 178 __attribute__((may_alias)) intptr_t * istorage = (intptr_t*)&this->storage; 179 *istorage |= userStack ? 0x1 : 0x0; 177 180 } 178 181 -
libcfa/src/concurrency/invoke.h
r8c3a0336 rffe2fad 199 199 #ifdef __cforall 200 200 extern "Cforall" { 201 static inline struct coroutine_desc * volatileactive_coroutine() { return TL_GET( this_thread )->curr_cor; }202 static inline struct thread_desc * volatileactive_thread () { return TL_GET( this_thread ); }203 static inline struct processor * volatileactive_processor() { return TL_GET( this_processor ); } // UNSAFE201 static inline struct coroutine_desc * active_coroutine() { return TL_GET( this_thread )->curr_cor; } 202 static inline struct thread_desc * active_thread () { return TL_GET( this_thread ); } 203 static inline struct processor * active_processor() { return TL_GET( this_processor ); } // UNSAFE 204 204 205 205 static inline thread_desc * & get_next( thread_desc & this ) { -
libcfa/src/concurrency/kernel.cfa
r8c3a0336 rffe2fad 165 165 base = info->base; 166 166 } 167 *((intptr_t*)&stack.storage) |= 0x1; 167 __attribute__((may_alias)) intptr_t * istorage = (intptr_t*) &stack.storage; 168 *istorage |= 0x1; 168 169 name = "Main Thread"; 169 170 state = Start;
Note: See TracChangeset
for help on using the changeset viewer.