Changes in / [924c5ce:e1990f1]


Ignore:
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • benchmark/Makefile.in

    r924c5ce re1990f1  
    352352LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    353353        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    354         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
    355         $(AM_CFLAGS) $(CFLAGS)
     354        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
    356355
    357356AM_V_CFA = $(am__v_CFA_@AM_V@)
  • driver/cfa.cc

    r924c5ce re1990f1  
    401401                args[nargs++] = "-Xlinker";
    402402                args[nargs++] = "--undefined=__cfaabi_appready_startup";
     403                args[nargs++] = "-z";
     404                args[nargs++] = "execstack";
    403405
    404406                // include the cfa library in case it is needed
     
    409411                args[nargs++] = "-Wl,--pop-state";
    410412                args[nargs++] = "-lcfa";
    411                 args[nargs++] = "-lpthread";
     413                args[nargs++] = "-pthread";
    412414                args[nargs++] = "-ldl";
    413415                args[nargs++] = "-lrt";
  • libcfa/configure

    r924c5ce re1990f1  
    30003000case $CONFIGURATION in
    30013001        "debug"   )
    3002                 CONFIG_CFLAGS="-Og -g"
     3002                CONFIG_CFLAGS="-O0 -g"
    30033003                CONFIG_CFAFLAGS="-debug"
    30043004                CONFIG_BUILDLIB="yes"
  • libcfa/configure.ac

    r924c5ce re1990f1  
    6868case $CONFIGURATION in
    6969        "debug"   )
    70                 CONFIG_CFLAGS="-Og -g"
     70                CONFIG_CFLAGS="-O0 -g"
    7171                CONFIG_CFAFLAGS="-debug"
    7272                CONFIG_BUILDLIB="yes"
  • libcfa/src/Makefile.am

    r924c5ce re1990f1  
    3333# The built sources must not depend on the installed headers
    3434AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    35 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
     35AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3636AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3737CFACC = @CFACC@
  • libcfa/src/Makefile.in

    r924c5ce re1990f1  
    416416LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    417417        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    418         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
    419         $(AM_CFLAGS) $(CFLAGS)
     418        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
    420419
    421420AM_V_CFA = $(am__v_CFA_@AM_V@)
     
    445444# The built sources must not depend on the installed headers
    446445AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    447 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
     446AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC -pthread @ARCH_FLAGS@ @CONFIG_CFLAGS@
    448447AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
    449448@BUILDLIB_FALSE@headers_nosrc =
  • libcfa/src/concurrency/alarm.cfa

    r924c5ce re1990f1  
    1010// Created On       : Fri Jun 2 11:31:25 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri May 25 06:25:47 2018
    13 // Update Count     : 67
     12// Last Modified On : Tue Dec  3 22:47:24 2019
     13// Update Count     : 68
    1414//
    1515
     
    4040void __kernel_set_timer( Duration alarm ) {
    4141        verifyf(alarm >= 1`us || alarm == 0, "Setting timer to < 1us (%jins)", alarm.tv);
    42         setitimer( ITIMER_REAL, &(itimerval){ alarm }, NULL );
     42        setitimer( ITIMER_REAL, &(itimerval){ alarm }, 0p );
    4343}
    4444
     
    113113                        this->tail = &this->head;
    114114                }
    115                 head->next = NULL;
     115                head->next = 0p;
    116116        }
    117117        verify( validate( this ) );
     
    127127                this->tail = it;
    128128        }
    129         n->next = NULL;
     129        n->next = 0p;
    130130
    131131        verify( validate( this ) );
  • libcfa/src/concurrency/coroutine.cfa

    r924c5ce re1990f1  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Nov 30 09:59:36 2019
    13 // Update Count     : 14
     12// Last Modified On : Thu Dec  5 14:37:29 2019
     13// Update Count     : 15
    1414//
    1515
     
    131131
    132132[void *, size_t] __stack_alloc( size_t storageSize ) {
    133         static const size_t stack_data_size = libCeiling( sizeof(__stack_t), 16 ); // minimum alignment
     133        const size_t stack_data_size = libCeiling( sizeof(__stack_t), 16 ); // minimum alignment
    134134        assert(__page_size != 0l);
    135135        size_t size = libCeiling( storageSize, 16 ) + stack_data_size;
     
    157157
    158158void __stack_prepare( __stack_info_t * this, size_t create_size ) {
    159         static const size_t stack_data_size = libCeiling( sizeof(__stack_t), 16 ); // minimum alignment
     159        const size_t stack_data_size = libCeiling( sizeof(__stack_t), 16 ); // minimum alignment
    160160        bool userStack;
    161161        void * storage;
  • libcfa/src/concurrency/coroutine.hfa

    r924c5ce re1990f1  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 21 17:49:39 2019
    13 // Update Count     : 9
     12// Last Modified On : Tue Dec  3 22:47:58 2019
     13// Update Count     : 10
    1414//
    1515
     
    3838void ^?{}( coroutine_desc & this );
    3939
    40 static inline void ?{}( coroutine_desc & this)                                       { this{ "Anonymous Coroutine", NULL, 0 }; }
    41 static inline void ?{}( coroutine_desc & this, size_t stackSize)                     { this{ "Anonymous Coroutine", NULL, stackSize }; }
     40static inline void ?{}( coroutine_desc & this)                                       { this{ "Anonymous Coroutine", 0p, 0 }; }
     41static inline void ?{}( coroutine_desc & this, size_t stackSize)                     { this{ "Anonymous Coroutine", 0p, stackSize }; }
    4242static inline void ?{}( coroutine_desc & this, void * storage, size_t storageSize )  { this{ "Anonymous Coroutine", storage, storageSize }; }
    43 static inline void ?{}( coroutine_desc & this, const char * name)                    { this{ name, NULL, 0 }; }
    44 static inline void ?{}( coroutine_desc & this, const char * name, size_t stackSize ) { this{ name, NULL, stackSize }; }
     43static inline void ?{}( coroutine_desc & this, const char * name)                    { this{ name, 0p, 0 }; }
     44static inline void ?{}( coroutine_desc & this, const char * name, size_t stackSize ) { this{ name, 0p, stackSize }; }
    4545
    4646//-----------------------------------------------------------------------------
     
    8989        src->state = Active;
    9090
    91         if( unlikely(src->cancellation != NULL) ) {
     91        if( unlikely(src->cancellation != 0p) ) {
    9292                _CtxCoroutine_Unwind(src->cancellation, src);
    9393        }
     
    128128        coroutine_desc * dst = get_coroutine(cor);
    129129
    130         if( unlikely(dst->context.SP == NULL) ) {
     130        if( unlikely(dst->context.SP == 0p) ) {
    131131                __stack_prepare(&dst->stack, 65000);
    132132                CtxStart(&cor, CtxInvokeCoroutine);
  • libcfa/src/concurrency/invoke.h

    r924c5ce re1990f1  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 28 22:34:07 2019
    13 // Update Count     : 41
     12// Last Modified On : Thu Dec  5 16:26:03 2019
     13// Update Count     : 44
    1414//
    1515
     
    5151
    5252                        struct {
    53                                 void * stack;
    5453                                volatile unsigned short disable_count;
    5554                                volatile bool enabled;
     
    208207
    209208                static inline void ?{}(__monitor_group_t & this) {
    210                         (this.data){NULL};
     209                        (this.data){0p};
    211210                        (this.size){0};
    212211                        (this.func){NULL};
  • libcfa/src/concurrency/kernel.cfa

    r924c5ce re1990f1  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec  1 17:52:57 2019
    13 // Update Count     : 45
     12// Last Modified On : Thu Dec  5 16:25:52 2019
     13// Update Count     : 52
    1414//
    1515
     
    2727#include <unistd.h>
    2828#include <limits.h>                                                                             // PTHREAD_STACK_MIN
     29#include <sys/mman.h>                                                                   // mprotect
    2930}
    3031
     
    134135        NULL,                                                                                           // cannot use 0p
    135136        NULL,
    136         { NULL, 1, false, false },
     137        { 1, false, false },
    137138        6u //this should be seeded better but due to a bug calling rdtsc doesn't work
    138139};
     
    281282
    282283                thread_desc * readyThread = 0p;
    283                 for( unsigned int spin_count = 0; ! __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST); spin_count++ )
    284                 {
     284                for( unsigned int spin_count = 0; ! __atomic_load_n(&this->do_terminate, __ATOMIC_SEQ_CST); spin_count++ ) {
    285285                        readyThread = nextThread( this->cltr );
    286286
    287                         if(readyThread)
    288                         {
     287                        if(readyThread) {
    289288                                verify( ! kernelTLS.preemption_state.enabled );
    290289
     
    297296
    298297                                spin_count = 0;
    299                         }
    300                         else
    301                         {
     298                        } else {
    302299                                // spin(this, &spin_count);
    303300                                halt(this);
     
    445442
    446443static void Abort( int ret, const char * func ) {
    447         if ( ret ) {
     444        if ( ret ) {                                                                            // pthread routines return errno values
    448445                abort( "%s : internal error, error(%d) %s.", func, ret, strerror( ret ) );
    449446        } // if
     
    455452        Abort( pthread_attr_init( &attr ), "pthread_attr_init" ); // initialize attribute
    456453
    457 #ifdef __CFA_DEBUG__
    458         size_t guardsize;
    459         Abort( pthread_attr_getguardsize( &attr, &guardsize ), "pthread_attr_getguardsize" );
    460         Abort( pthread_attr_setguardsize( &attr, guardsize ), "pthread_attr_setguardsize" );
    461 #endif
    462 
    463454        size_t stacksize;
    464         Abort( pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" ); // default stack size, normally defined by shell limit
     455        // default stack size, normally defined by shell limit
     456        Abort( pthread_attr_getstacksize( &attr, &stacksize ), "pthread_attr_getstacksize" );
    465457        assert( stacksize >= PTHREAD_STACK_MIN );
    466         void * stack = malloc( stacksize );
     458
     459        void * stack;
     460        __cfaabi_dbg_debug_do(
     461                stack = memalign( __page_size, stacksize + __page_size );
     462                // pthread has no mechanism to create the guard page in user supplied stack.
     463                if ( mprotect( stack, __page_size, PROT_NONE ) == -1 ) {
     464                        abort( "mprotect : internal error, mprotect failure, error(%d) %s.", errno, strerror( errno ) );
     465                } // if
     466        );
     467        __cfaabi_dbg_no_debug_do(
     468                stack = malloc( stacksize );
     469        );
     470
    467471        Abort( pthread_attr_setstack( &attr, stack, stacksize ), "pthread_attr_setstack" );
    468472
  • libcfa/src/concurrency/kernel.hfa

    r924c5ce re1990f1  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 28 21:24:12 2019
    13 // Update Count     : 17
     12// Last Modified On : Wed Dec  4 07:54:51 2019
     13// Update Count     : 18
    1414//
    1515
     
    8989static inline void ?{}(FinishAction & this) {
    9090        this.action_code = No_Action;
    91         this.thrd = NULL;
    92         this.lock = NULL;
     91        this.thrd = 0p;
     92        this.lock = 0p;
    9393}
    9494static inline void ^?{}(FinishAction &) {}
  • libcfa/src/concurrency/monitor.cfa

    r924c5ce re1990f1  
    1010// Created On       : Thd Feb 23 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 30 14:30:26 2018
    13 // Update Count     : 9
     12// Last Modified On : Wed Dec  4 07:55:14 2019
     13// Update Count     : 10
    1414//
    1515
     
    363363        this.waiting_thread = waiting_thread;
    364364        this.count = count;
    365         this.next = NULL;
     365        this.next = 0p;
    366366        this.user_info = user_info;
    367367}
     
    369369void ?{}(__condition_criterion_t & this ) with( this ) {
    370370        ready  = false;
    371         target = NULL;
    372         owner  = NULL;
    373         next   = NULL;
     371        target = 0p;
     372        owner  = 0p;
     373        next   = 0p;
    374374}
    375375
     
    378378        this.target = target;
    379379        this.owner  = &owner;
    380         this.next   = NULL;
     380        this.next   = 0p;
    381381}
    382382
     
    387387
    388388        // Check that everything is as expected
    389         assertf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
     389        assertf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors );
    390390        verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count );
    391391        verifyf( this.monitor_count < 32u, "Excessive monitor count (%"PRIiFAST16")", this.monitor_count );
     
    449449
    450450        // Lock all monitors
    451         lock_all( this.monitors, NULL, count );
     451        lock_all( this.monitors, 0p, count );
    452452
    453453        //Pop the head of the waiting queue
     
    471471
    472472        //Check that everything is as expected
    473         verifyf( this.monitors != NULL, "Waiting with no monitors (%p)", this.monitors );
     473        verifyf( this.monitors != 0p, "Waiting with no monitors (%p)", this.monitors );
    474474        verifyf( this.monitor_count != 0, "Waiting with 0 monitors (%"PRIiFAST16")", this.monitor_count );
    475475
     
    674674
    675675static inline void reset_mask( monitor_desc * this ) {
    676         this->mask.accepted = NULL;
    677         this->mask.data = NULL;
     676        this->mask.accepted = 0p;
     677        this->mask.data = 0p;
    678678        this->mask.size = 0;
    679679}
     
    816816        }
    817817
    818         __cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : NULL );
    819         return ready2run ? node->waiting_thread : NULL;
     818        __cfaabi_dbg_print_safe( "Kernel :  Runing %i (%p)\n", ready2run, ready2run ? node->waiting_thread : 0p );
     819        return ready2run ? node->waiting_thread : 0p;
    820820}
    821821
     
    824824        if( !this.monitors ) {
    825825                // __cfaabi_dbg_print_safe( "Branding\n" );
    826                 assertf( thrd->monitors.data != NULL, "No current monitor to brand condition %p", thrd->monitors.data );
     826                assertf( thrd->monitors.data != 0p, "No current monitor to brand condition %p", thrd->monitors.data );
    827827                this.monitor_count = thrd->monitors.size;
    828828
  • libcfa/src/concurrency/monitor.hfa

    r924c5ce re1990f1  
    1010// Created On       : Thd Feb 23 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Oct  7 18:06:45 2017
    13 // Update Count     : 10
     12// Last Modified On : Wed Dec  4 07:55:32 2019
     13// Update Count     : 11
    1414//
    1515
     
    3131        entry_queue{};
    3232        signal_stack{};
    33         owner         = NULL;
     33        owner         = 0p;
    3434        recursion     = 0;
    35         mask.accepted = NULL;
    36         mask.data     = NULL;
     35        mask.accepted = 0p;
     36        mask.data     = 0p;
    3737        mask.size     = 0;
    38         dtor_node     = NULL;
     38        dtor_node     = 0p;
    3939}
    4040
     
    122122
    123123static inline void ?{}( condition & this ) {
    124         this.monitors = NULL;
     124        this.monitors = 0p;
    125125        this.monitor_count = 0;
    126126}
  • libcfa/src/concurrency/mutex.cfa

    r924c5ce re1990f1  
    1111// Author           : Thierry Delisle
    1212// Created On       : Fri May 25 01:37:11 2018
    13 // Last Modified By : Thierry Delisle
    14 // Last Modified On : Fri May 25 01:37:51 2018
    15 // Update Count     : 0
     13// Last Modified By : Peter A. Buhr
     14// Last Modified On : Wed Dec  4 09:16:39 2019
     15// Update Count     : 1
    1616//
    1717
     
    7373        this.lock{};
    7474        this.blocked_threads{};
    75         this.owner = NULL;
     75        this.owner = 0p;
    7676        this.recursion_count = 0;
    7777}
     
    8383void lock(recursive_mutex_lock & this) with(this) {
    8484        lock( lock __cfaabi_dbg_ctx2 );
    85         if( owner == NULL ) {
     85        if( owner == 0p ) {
    8686                owner = kernelTLS.this_thread;
    8787                recursion_count = 1;
     
    101101        bool ret = false;
    102102        lock( lock __cfaabi_dbg_ctx2 );
    103         if( owner == NULL ) {
     103        if( owner == 0p ) {
    104104                owner = kernelTLS.this_thread;
    105105                recursion_count = 1;
  • libcfa/src/concurrency/mutex.hfa

    r924c5ce re1990f1  
    1111// Author           : Thierry Delisle
    1212// Created On       : Fri May 25 01:24:09 2018
    13 // Last Modified By : Thierry Delisle
    14 // Last Modified On : Fri May 25 01:24:12 2018
    15 // Update Count     : 0
     13// Last Modified By : Peter A. Buhr
     14// Last Modified On : Wed Dec  4 09:16:53 2019
     15// Update Count     : 1
    1616//
    1717
     
    110110
    111111        static inline void ?{}(lock_scope(L) & this) {
    112                 this.locks = NULL;
     112                this.locks = 0p;
    113113                this.count = 0;
    114114        }
  • libcfa/src/concurrency/preemption.cfa

    r924c5ce re1990f1  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec  1 22:22:56 2019
    13 // Update Count     : 41
     12// Last Modified On : Thu Dec  5 16:34:05 2019
     13// Update Count     : 43
    1414//
    1515
     
    6565event_kernel_t * event_kernel;                        // kernel public handle to even kernel
    6666static pthread_t alarm_thread;                        // pthread handle to alarm thread
     67static void * alarm_stack;                                                        // pthread stack for alarm thread
    6768
    6869static void ?{}(event_kernel_t & this) with( this ) {
     
    306307        signal_block( SIGALRM );
    307308
    308         kernelTLS.preemption_state.stack = create_pthread( &alarm_thread, alarm_loop, 0p );
     309        alarm_stack = create_pthread( &alarm_thread, alarm_loop, 0p );
    309310}
    310311
     
    326327
    327328        pthread_join( alarm_thread, 0p );
    328         free( kernelTLS.preemption_state.stack );
     329        free( alarm_stack );
    329330
    330331        // Preemption is now fully stopped
  • libcfa/src/concurrency/thread.cfa

    r924c5ce re1990f1  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 30 17:19:52 2018
    13 // Update Count     : 8
     12// Last Modified On : Wed Dec  4 09:17:49 2019
     13// Update Count     : 9
    1414//
    1515
     
    3333// Thread ctors and dtors
    3434void ?{}(thread_desc & this, const char * const name, cluster & cl, void * storage, size_t storageSize ) with( this ) {
    35         context{ NULL, NULL };
     35        context{ 0p, 0p };
    3636        self_cor{ name, storage, storageSize };
    3737        state = Start;
     
    4141        self_mon_p = &self_mon;
    4242        curr_cluster = &cl;
    43         next = NULL;
     43        next = 0p;
    4444
    45         node.next = NULL;
    46         node.prev = NULL;
     45        node.next = 0p;
     46        node.prev = 0p;
    4747        doregister(curr_cluster, this);
    4848
  • libcfa/src/concurrency/thread.hfa

    r924c5ce re1990f1  
    1010// Created On       : Tue Jan 17 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 21 17:51:33 2019
    13 // Update Count     : 5
     12// Last Modified On : Wed Dec  4 09:18:14 2019
     13// Update Count     : 6
    1414//
    1515
     
    6161void ^?{}(thread_desc & this);
    6262
    63 static inline void ?{}(thread_desc & this)                                                                  { this{ "Anonymous Thread", *mainCluster, NULL, 65000 }; }
    64 static inline void ?{}(thread_desc & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, NULL, stackSize }; }
     63static inline void ?{}(thread_desc & this)                                                                  { this{ "Anonymous Thread", *mainCluster, 0p, 65000 }; }
     64static inline void ?{}(thread_desc & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, 0p, stackSize }; }
    6565static inline void ?{}(thread_desc & this, void * storage, size_t storageSize )                             { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; }
    66 static inline void ?{}(thread_desc & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, NULL, 65000 }; }
    67 static inline void ?{}(thread_desc & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, NULL, stackSize }; }
     66static inline void ?{}(thread_desc & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, 0p, 65000 }; }
     67static inline void ?{}(thread_desc & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, 0p, stackSize }; }
    6868static inline void ?{}(thread_desc & this, struct cluster & cl, void * storage, size_t storageSize )        { this{ "Anonymous Thread", cl, storage, storageSize }; }
    69 static inline void ?{}(thread_desc & this, const char * const name)                                         { this{ name, *mainCluster, NULL, 65000 }; }
    70 static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl )                   { this{ name, cl, NULL, 65000 }; }
    71 static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, NULL, stackSize }; }
     69static inline void ?{}(thread_desc & this, const char * const name)                                         { this{ name, *mainCluster, 0p, 65000 }; }
     70static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl )                   { this{ name, cl, 0p, 65000 }; }
     71static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, 0p, stackSize }; }
    7272
    7373//-----------------------------------------------------------------------------
  • libcfa/src/heap.cfa

    r924c5ce re1990f1  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Nov 29 17:33:58 2019
    13 // Update Count     : 641
     12// Last Modified On : Wed Dec  4 21:42:46 2019
     13// Update Count     : 646
    1414//
    1515
     
    3535static bool traceHeap = false;
    3636
    37 inline bool traceHeap() {
    38         return traceHeap;
    39 } // traceHeap
     37inline bool traceHeap() { return traceHeap; }
    4038
    4139bool traceHeapOn() {
     
    5048        return temp;
    5149} // traceHeapOff
     50
     51bool traceHeapTerm() { return false; }
    5252
    5353
     
    694694static void ^?{}( HeapManager & ) {
    695695        #ifdef __STATISTICS__
    696         // if ( traceHeapTerm() ) {
    697         //      printStats();
    698         //      if ( prtfree() ) prtFree( heapManager, true );
    699         // } // if
     696        if ( traceHeapTerm() ) {
     697                printStats();
     698                // if ( prtfree() ) prtFree( heapManager, true );
     699        } // if
    700700        #endif // __STATISTICS__
    701701} // ~HeapManager
     
    855855                #endif // __STATISTICS__
    856856
    857           if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
     857                // If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
     858          if ( unlikely( size == 0 ) ) { free( oaddr ); return mallocNoStats( size ); } // special cases
    858859          if ( unlikely( oaddr == 0p ) ) return mallocNoStats( size );
    859860
     
    10821083        #endif // __STATISTICS__
    10831084
    1084   if ( unlikely( size == 0 ) ) { free( oaddr ); return 0p; } // special cases
     1085        // If size is equal to 0, either NULL or a pointer suitable to be passed to free() is returned.
     1086  if ( unlikely( size == 0 ) ) { free( oaddr ); return mallocNoStats( size ); } // special cases
    10851087  if ( unlikely( oaddr == 0p ) ) return mallocNoStats( size );
    10861088
  • longrun_tests/Makefile.in

    r924c5ce re1990f1  
    486486LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    487487        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    488         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
    489         $(AM_CFLAGS) $(CFLAGS)
     488        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
    490489
    491490AM_V_CFA = $(am__v_CFA_@AM_V@)
  • src/cfa.make

    r924c5ce re1990f1  
    44LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    55        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    6         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
    7         $(AM_CFLAGS) $(CFLAGS)
     6        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
    87
    98AM_V_CFA = $(am__v_CFA_@AM_V@)
  • tests/Makefile.am

    r924c5ce re1990f1  
    4646
    4747# adjust CC to current flags
    48 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     48CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    4949CFACC = $(CC)
    5050
     
    5353
    5454# adjusted CC but without the actual distcc call
    55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     55CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    5656
    5757PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
  • tests/Makefile.in

    r924c5ce re1990f1  
    214214
    215215# adjust CC to current flags
    216 CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     216CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    217217CCAS = @CCAS@
    218218CCASDEPMODE = @CCASDEPMODE@
     
    358358LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
    359359        $(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
    360         $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
    361         $(AM_CFLAGS) $(CFLAGS)
     360        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(AM_CFLAGS) $(CFAFLAGS) $(CFLAGS)
    362361
    363362AM_V_CFA = $(am__v_CFA_@AM_V@)
     
    405404
    406405# adjusted CC but without the actual distcc call
    407 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     406CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) ${ARCH_FLAGS},$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
    408407PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    409408avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa
  • tests/linking/withthreads.cfa

    r924c5ce re1990f1  
    3434// Local Variables: //
    3535// tab-width: 4 //
    36 // compile-command: "cfa nothreads.cfa" //
     36// compile-command: "cfa withthreads.cfa" //
    3737// End: //
Note: See TracChangeset for help on using the changeset viewer.