Changeset a7d696f for libcfa/src/concurrency/kernel
- Timestamp:
- Aug 3, 2022, 6:32:06 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 20be782
- Parents:
- 80d16f8
- git-author:
- z277zhu <z277zhu@…> (08/03/22 18:24:16)
- git-committer:
- z277zhu <z277zhu@…> (08/03/22 18:32:06)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/startup.cfa
r80d16f8 ra7d696f 218 218 ( this.runner ){}; 219 219 init( this, "Main Processor", *mainCluster, 0p ); 220 kernel_thread = pthread_self();220 kernel_thread = real_pthread_self(); 221 221 222 222 runner{ &this }; … … 769 769 pthread_attr_t attr; 770 770 771 check( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute771 check( real_pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute 772 772 773 773 size_t stacksize = max( PTHREAD_STACK_MIN, DEFAULT_STACK_SIZE ); … … 796 796 #endif 797 797 798 check( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" );799 check( pthread_create( pthread, &attr, start, arg ), "pthread_create" );798 check( real_pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" ); 799 check( real_pthread_create( pthread, &attr, start, arg ), "pthread_create" ); 800 800 return stack; 801 801 } 802 802 803 803 void __destroy_pthread( pthread_t pthread, void * stack, void ** retval ) { 804 int err = pthread_join( pthread, retval );804 int err = real_pthread_join( pthread, retval ); 805 805 if( err != 0 ) abort("KERNEL ERROR: joining pthread %p caused error %s\n", (void*)pthread, strerror(err)); 806 806 … … 808 808 pthread_attr_t attr; 809 809 810 check( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute810 check( real_pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute 811 811 812 812 size_t stacksize; 813 813 // default stack size, normally defined by shell limit 814 check( pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" );814 check( real_pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" ); 815 815 assert( stacksize >= PTHREAD_STACK_MIN ); 816 816 stacksize += __page_size;
Note: See TracChangeset
for help on using the changeset viewer.