Changeset eaf269d
- Timestamp:
- Jan 6, 2022, 10:53:39 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 6fafda8
- Parents:
- 6111f1f
- Location:
- libcfa/src/concurrency
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.hfa
r6111f1f reaf269d 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Feb 4 12:29:26 202013 // Update Count : 1 112 // Last Modified On : Thu Jan 6 16:33:16 2022 13 // Update Count : 12 14 14 // 15 15 … … 155 155 156 156 if( unlikely(dst->context.SP == 0p) ) { 157 __stack_prepare(&dst->stack, 65000);157 __stack_prepare(&dst->stack, DEFAULT_STACK_SIZE); 158 158 __cfactx_start(main, dst, cor, __cfactx_invoke_coroutine); 159 159 } -
libcfa/src/concurrency/invoke.h
r6111f1f reaf269d 10 10 // Created On : Tue Jan 17 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Dec 5 16:26:03 201913 // Update Count : 4 412 // Last Modified On : Thu Jan 6 16:37:40 2022 13 // Update Count : 47 14 14 // 15 15 … … 27 27 #ifndef _INVOKE_H_ 28 28 #define _INVOKE_H_ 29 30 enum { DEFAULT_STACK_SIZE = 65000 }; 29 31 30 32 struct __cfaehm_try_resume_node; -
libcfa/src/concurrency/kernel/startup.cfa
r6111f1f reaf269d 403 403 404 404 __cfaabi_tls.this_thread->curr_cor = dst; 405 __stack_prepare( &dst->stack, 65000);405 __stack_prepare( &dst->stack, DEFAULT_STACK_SIZE ); 406 406 __cfactx_start(main, dst, this->runner, __cfactx_invoke_coroutine); 407 407 … … 721 721 check( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute 722 722 723 size_t stacksize; 724 // default stack size, normally defined by shell limit 725 check( pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" ); 726 assert( stacksize >= PTHREAD_STACK_MIN ); 723 size_t stacksize = DEFAULT_STACK_SIZE; 727 724 728 725 void * stack; … … 749 746 #endif 750 747 751 752 748 check( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" ); 753 754 749 check( pthread_create( pthread, &attr, start, arg ), "pthread_create" ); 755 750 return stack; -
libcfa/src/concurrency/thread.hfa
r6111f1f reaf269d 10 10 // Created On : Tue Jan 17 12:27:26 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Dec 4 09:18:14 201913 // Update Count : 612 // Last Modified On : Thu Jan 6 16:40:16 2022 13 // Update Count : 7 14 14 // 15 15 … … 65 65 void ^?{}(thread$ & this); 66 66 67 static inline void ?{}(thread$ & this) { this{ "Anonymous Thread", *mainCluster, 0p, 65000}; }67 static inline void ?{}(thread$ & this) { this{ "Anonymous Thread", *mainCluster, 0p, DEFAULT_STACK_SIZE }; } 68 68 static inline void ?{}(thread$ & this, size_t stackSize ) { this{ "Anonymous Thread", *mainCluster, 0p, stackSize }; } 69 69 static inline void ?{}(thread$ & this, void * storage, size_t storageSize ) { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; } 70 static inline void ?{}(thread$ & this, struct cluster & cl ) { this{ "Anonymous Thread", cl, 0p, 65000}; }70 static inline void ?{}(thread$ & this, struct cluster & cl ) { this{ "Anonymous Thread", cl, 0p, DEFAULT_STACK_SIZE }; } 71 71 static inline void ?{}(thread$ & this, struct cluster & cl, size_t stackSize ) { this{ "Anonymous Thread", cl, 0p, stackSize }; } 72 72 static inline void ?{}(thread$ & this, struct cluster & cl, void * storage, size_t storageSize ) { this{ "Anonymous Thread", cl, storage, storageSize }; } 73 static inline void ?{}(thread$ & this, const char * const name) { this{ name, *mainCluster, 0p, 65000}; }74 static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl ) { this{ name, cl, 0p, 65000}; }73 static inline void ?{}(thread$ & this, const char * const name) { this{ name, *mainCluster, 0p, DEFAULT_STACK_SIZE }; } 74 static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl ) { this{ name, cl, 0p, DEFAULT_STACK_SIZE }; } 75 75 static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, 0p, stackSize }; } 76 76
Note: See TracChangeset
for help on using the changeset viewer.