Ignore:
Timestamp:
Jan 6, 2022, 10:53:39 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
6fafda8
Parents:
6111f1f
Message:

add enum DEFAULT_STACK_SIZE in invoke.h and replace 65000 with enum, change pthread_create to use DEFAULT_STACK_SIZE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel/startup.cfa

    r6111f1f reaf269d  
    403403
    404404        __cfaabi_tls.this_thread->curr_cor = dst;
    405         __stack_prepare( &dst->stack, 65000 );
     405        __stack_prepare( &dst->stack, DEFAULT_STACK_SIZE );
    406406        __cfactx_start(main, dst, this->runner, __cfactx_invoke_coroutine);
    407407
     
    721721        check( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute
    722722
    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;
    727724
    728725        void * stack;
     
    749746        #endif
    750747
    751 
    752748        check( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" );
    753 
    754749        check( pthread_create( pthread, &attr, start, arg ), "pthread_create" );
    755750        return stack;
Note: See TracChangeset for help on using the changeset viewer.