Changeset 95789be for libcfa


Ignore:
Timestamp:
Aug 3, 2020, 2:23:17 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1a39a5a
Parents:
3e2b9c9 (diff), 6dba8755 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/bits/locks.hfa

    r3e2b9c9 r95789be  
    130130                pthread_mutex_init(&lock, &mattr);
    131131
    132                 pthread_cond_init (&cond, 0p);
     132                pthread_cond_init (&cond, (const pthread_condattr_t *)0p);  // workaround trac#208: cast should not be required
    133133                val = 0;
    134134        }
  • libcfa/src/concurrency/kernel.cfa

    r3e2b9c9 r95789be  
    519519
    520520void kernel_abort_msg( void * kernel_data, char * abort_text, int abort_text_size ) {
    521         $thread * thrd = kernel_data;
     521        $thread * thrd = ( $thread * ) kernel_data;
    522522
    523523        if(thrd) {
  • libcfa/src/concurrency/preemption.cfa

    r3e2b9c9 r95789be  
    482482        sigset_t oldset;
    483483        int ret;
    484         ret = pthread_sigmask(0, 0p, &oldset);
     484        ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    485485        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    486486
  • libcfa/src/containers/list.hfa

    r3e2b9c9 r95789be  
    2222\
    2323static inline NODE& $tempcv_e2n(ELEM &node) { \
    24         return node; \
     24        return ( NODE & ) node; \
    2525} \
    2626\
     
    187187                $next_link(singleton_to_insert) = $next_link(list_pos);
    188188                if ($next_link(list_pos).is_terminator) {
    189                         dlist(Tnode, Telem) *list = $next_link(list_pos).terminator;
     189                        dlist(Tnode, Telem) *list = ( dlist(Tnode, Telem) * ) $next_link(list_pos).terminator;
    190190                        $dlinks(Telem) *list_links = & list->$links;
    191191                        $mgd_link(Telem) *list_last = & list_links->prev;
     
    210210                $prev_link(singleton_to_insert) = $prev_link(list_pos);
    211211                if ($prev_link(list_pos).is_terminator) {
    212                         dlist(Tnode, Telem) *list = $prev_link(list_pos).terminator;
     212                        dlist(Tnode, Telem) *list = ( dlist(Tnode, Telem) * ) $prev_link(list_pos).terminator;
    213213                        $dlinks(Telem) *list_links = & list->$links;
    214214                        $mgd_link(Telem) *list_first = & list_links->next;
     
    275275
    276276                if ( $prev_link(list_pos).is_terminator ) {
    277                         dlist(Tnode, Telem) * tgt_before = $prev_link(list_pos).terminator;
     277                        dlist(Tnode, Telem) * tgt_before = ( dlist(Tnode, Telem) * ) $prev_link(list_pos).terminator;
    278278                        $dlinks(Telem) * links_before = & tgt_before->$links;
    279279                        &incoming_from_prev = & links_before->next;
     
    285285
    286286                if ( $next_link(list_pos).is_terminator ) {
    287                         dlist(Tnode, Telem) * tgt_after = $next_link(list_pos).terminator;
     287                        dlist(Tnode, Telem) * tgt_after = ( dlist(Tnode, Telem) * ) $next_link(list_pos).terminator;
    288288                        $dlinks(Telem) * links_after = & tgt_after->$links;
    289289                        &incoming_from_next = & links_after->prev;
  • libcfa/src/heap.cfa

    r3e2b9c9 r95789be  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jul 20 23:00:32 2020
    13 // Update Count     : 808
     12// Last Modified On : Mon Jul 27 23:16:18 2020
     13// Update Count     : 815
    1414//
    1515
     
    805805        // address of header from malloc
    806806        HeapManager.Storage.Header * realHeader = headerAddr( addr );
     807        realHeader->kind.real.size = size;                                      // correct size to eliminate above alignment offset
    807808        // address of fake header * before* the alignment location
    808809        HeapManager.Storage.Header * fakeHeader = headerAddr( user );
  • libcfa/src/iostream.hfa

    r3e2b9c9 r95789be  
    363363        _Istream_Cstr excl( const char scanset[], char * s ) { return (_Istream_Cstr){ s, scanset, -1, { .flags.inex : true } }; }
    364364        _Istream_Cstr & excl( const char scanset[], _Istream_Cstr & fmt ) { fmt.scanset = scanset; fmt.flags.inex = true; return fmt; }
    365         _Istream_Cstr ignore( const char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }
     365        _Istream_Cstr ignore( char s[] ) { return (_Istream_Cstr)@{ s, 0p, -1, { .flags.ignore : true } }; }
    366366        _Istream_Cstr & ignore( _Istream_Cstr & fmt ) { fmt.flags.ignore = true; return fmt; }
    367367        _Istream_Cstr wdi( unsigned int w, char s[] ) { return (_Istream_Cstr)@{ s, 0p, w, { .all : 0 } }; }
  • libcfa/src/stdlib.hfa

    r3e2b9c9 r95789be  
    232232                size_t osize = malloc_size( ptr );                              // current allocation
    233233                size_t nsize = dim * sizeof(T);                                 // new allocation
    234                 T * nptr = realloc( ptr, align, nsize );                // CFA realloc
     234                T * nptr = alloc_align( ptr, align, nsize );    // CFA alloc_align
    235235                if ( nsize > osize ) {                                                  // larger ?
    236236                        memset( (char *)nptr + osize, (int)fill, nsize - osize ); // initialize added storage
     
    243243                size_t nsize = dim * sizeof(T);                                 // new allocation
    244244                size_t ndim = nsize / sizeof(T);                                // new dimension
    245                 T * nptr = realloc( ptr, align, nsize );                // CFA realloc
     245                T * nptr = alloc_align( ptr, align, nsize );            // CFA alloc_align
    246246                if ( ndim > odim ) {                                                    // larger ?
    247247                        for ( i; odim ~ ndim ) {
Note: See TracChangeset for help on using the changeset viewer.