Changeset c86ee4c for libcfa/src/concurrency/kernel/startup.cfa
- Timestamp:
- Jul 7, 2021, 6:24:42 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d83b266
- Parents:
- 1f45c7d (diff), b1a2c4a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/startup.cfa
r1f45c7d rc86ee4c 77 77 static void __kernel_first_resume( processor * this ); 78 78 static void __kernel_last_resume ( processor * this ); 79 static void init(processor & this, const char name[], cluster & _cltr, $thread* initT);79 static void init(processor & this, const char name[], cluster & _cltr, thread$ * initT); 80 80 static void deinit(processor & this); 81 81 static void doregister( struct cluster & cltr ); … … 83 83 static void register_tls( processor * this ); 84 84 static void unregister_tls( processor * this ); 85 static void ?{}( $coroutine& this, current_stack_info_t * info);86 static void ?{}( $thread& this, current_stack_info_t * info);85 static void ?{}( coroutine$ & this, current_stack_info_t * info); 86 static void ?{}( thread$ & this, current_stack_info_t * info); 87 87 static void ?{}(processorCtx_t & this) {} 88 88 static void ?{}(processorCtx_t & this, processor * proc, current_stack_info_t * info); … … 105 105 KERNEL_STORAGE(cluster, mainCluster); 106 106 KERNEL_STORAGE(processor, mainProcessor); 107 KERNEL_STORAGE( $thread, mainThread);107 KERNEL_STORAGE(thread$, mainThread); 108 108 KERNEL_STORAGE(__stack_t, mainThreadCtx); 109 109 KERNEL_STORAGE(__scheduler_RWLock_t, __scheduler_lock); … … 114 114 cluster * mainCluster; 115 115 processor * mainProcessor; 116 $thread* mainThread;116 thread$ * mainThread; 117 117 __scheduler_RWLock_t * __scheduler_lock; 118 118 … … 203 203 // SKULLDUGGERY: the mainThread steals the process main thread 204 204 // which will then be scheduled by the mainProcessor normally 205 mainThread = ( $thread*)&storage_mainThread;205 mainThread = (thread$ *)&storage_mainThread; 206 206 current_stack_info_t info; 207 207 info.storage = (__stack_t*)&storage_mainThreadCtx; … … 397 397 398 398 static void __kernel_first_resume( processor * this ) { 399 $thread* src = mainThread;400 $coroutine* dst = get_coroutine(this->runner);399 thread$ * src = mainThread; 400 coroutine$ * dst = get_coroutine(this->runner); 401 401 402 402 /* paranoid */ verify( ! __preemption_enabled() ); … … 430 430 // KERNEL_ONLY 431 431 static void __kernel_last_resume( processor * this ) { 432 $coroutine* src = &mainThread->self_cor;433 $coroutine* dst = get_coroutine(this->runner);432 coroutine$ * src = &mainThread->self_cor; 433 coroutine$ * dst = get_coroutine(this->runner); 434 434 435 435 /* paranoid */ verify( ! __preemption_enabled() ); … … 459 459 //----------------------------------------------------------------------------- 460 460 // Main thread construction 461 static void ?{}( $coroutine& this, current_stack_info_t * info) with( this ) {461 static void ?{}( coroutine$ & this, current_stack_info_t * info) with( this ) { 462 462 stack.storage = info->storage; 463 463 with(*stack.storage) { … … 474 474 } 475 475 476 static void ?{}( $thread& this, current_stack_info_t * info) with( this ) {476 static void ?{}( thread$ & this, current_stack_info_t * info) with( this ) { 477 477 ticket = TICKET_RUNNING; 478 478 state = Start; … … 507 507 } 508 508 509 static void init(processor & this, const char name[], cluster & _cltr, $thread* initT) with( this ) {509 static void init(processor & this, const char name[], cluster & _cltr, thread$ * initT) with( this ) { 510 510 this.name = name; 511 511 this.cltr = &_cltr; … … 546 546 } 547 547 548 void ?{}(processor & this, const char name[], cluster & _cltr, $thread* initT) {548 void ?{}(processor & this, const char name[], cluster & _cltr, thread$ * initT) { 549 549 ( this.terminated ){}; 550 550 ( this.runner ){}; … … 664 664 } 665 665 666 void doregister( cluster * cltr, $thread& thrd ) {666 void doregister( cluster * cltr, thread$ & thrd ) { 667 667 lock (cltr->thread_list_lock __cfaabi_dbg_ctx2); 668 668 cltr->nthreads += 1; … … 671 671 } 672 672 673 void unregister( cluster * cltr, $thread& thrd ) {673 void unregister( cluster * cltr, thread$ & thrd ) { 674 674 lock (cltr->thread_list_lock __cfaabi_dbg_ctx2); 675 675 remove(cltr->threads, thrd );
Note: See TracChangeset
for help on using the changeset viewer.