Ignore:
Timestamp:
Aug 22, 2018, 11:55:48 PM (6 years ago)
Author:
viala@…
Message:

Refactoring assert calling to conform with new assert macro.

Made with this command for the general case.
find ./kernel/ hal/ -name "*.c" | xargs sed -i -e '/assert(/ s/,[ ]*FUNCTION[ ]*,/,/'

And some done by hand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_gpt.c

    r457 r492  
    140140
    141141    // check page size
    142     assert( (CONFIG_PPM_PAGE_SIZE == 4096) , __FUNCTION__ ,
     142    assert( (CONFIG_PPM_PAGE_SIZE == 4096) ,
    143143    "for TSAR, the page size must be 4 Kbytes\n" );
    144144
     
    283283    vpn_t      vpn;
    284284
    285     assert( (process != NULL) , __FUNCTION__ , "NULL process pointer\n");
     285    assert( (process != NULL) , "NULL process pointer\n");
    286286
    287287    // get pointer on gpt
     
    387387        pte1 = *pte1_ptr;
    388388
    389         assert( (pte1 == 0) , __FUNCTION__ ,
     389        assert( (pte1 == 0) ,
    390390                "try to set a big page in a mapped PT1 entry / PT1[%d] = %x\n", ix1 , pte1 );
    391391     
     
    441441        {
    442442            // This valid entry must be a PTD1
    443             assert( (pte1 & TSAR_MMU_SMALL) , __FUNCTION__ ,
     443            assert( (pte1 & TSAR_MMU_SMALL) ,
    444444            "try to set a small page in a big PT1 entry / PT1[%d] = %x\n", ix1 , pte1 );
    445445
     
    792792
    793793    // check src_pt1 and dst_pt1 existence
    794     assert( (src_pt1 != NULL) , __FUNCTION__ , "src_pt1 does not exist\n");
    795     assert( (dst_pt1 != NULL) , __FUNCTION__ , "dst_pt1 does not exist\n");
     794    assert( (src_pt1 != NULL) , "src_pt1 does not exist\n");
     795    assert( (dst_pt1 != NULL) , "dst_pt1 does not exist\n");
    796796
    797797    ix1 = TSAR_MMU_IX1_FROM_VPN( vpn );
     
    10101010            pt2     = (uint32_t*)GET_PTR( ppm_ppn2base( pt2_ppn ) );
    10111011
    1012             assert( (GET_CXY( ppm_ppn2base( pt2_ppn ) ) == gpt_cxy ), __FUNCTION__,
     1012            assert( (GET_CXY( ppm_ppn2base( pt2_ppn ) ) == gpt_cxy ),
    10131013            "PT2 and PT1 must be in the same cluster\n");
    10141014 
Note: See TracChangeset for help on using the changeset viewer.