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/kernel/kern/rpc.c

    r485 r492  
    8585void __attribute__((noinline)) rpc_undefined()
    8686{
    87         assert( false , __FUNCTION__ , "called in cluster %x", local_cxy );
     87        assert( false , "called in cluster %x", local_cxy );
    8888}
    8989
     
    204204
    205205        // check response available
    206         assert( (rpc->responses == 0) , __FUNCTION__, "illegal RPC response\n" );
     206        assert( (rpc->responses == 0) , "illegal RPC response\n" );
    207207    }
    208208    else  // non blocking RPC
     
    280280                                                      core->lid );
    281281                 
    282             assert( (error == 0), __FUNCTION__ ,
     282            assert( (error == 0),
    283283            "no memory to allocate a new RPC thread in cluster %x", local_cxy );
    284284
     
    459459
    460460            // RPC thread deschedules
    461             assert( thread_can_yield( server_ptr ) , __FUNCTION__, "illegal sched_yield\n" );
     461            assert( thread_can_yield( server_ptr ) , "illegal sched_yield\n" );
    462462            sched_yield("RPC fifo empty");
    463463        }
     
    484484#endif
    485485
    486     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     486    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    487487
    488488    // initialise RPC descriptor header
     
    555555#endif
    556556
    557     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     557    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    558558
    559559    // initialise RPC descriptor header
     
    631631#endif
    632632
    633     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     633    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    634634
    635635    // initialise RPC descriptor header
     
    723723                                    error_t        * error )      // out
    724724{
    725     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     725    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    726726
    727727    // initialise RPC descriptor header
     
    803803                                      error_t * error )      // out
    804804{
    805     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     805    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    806806
    807807    // initialise RPC descriptor header
     
    879879
    880880    // check some RPC arguments
    881     assert( (rpc->blocking == false) , __FUNCTION__ , "must be non-blocking\n");
    882     assert( (rpc->index == RPC_PROCESS_SIGACTION ) , __FUNCTION__ , "bad RPC index\n" );
     881    assert( (rpc->blocking == false) , "must be non-blocking\n");
     882    assert( (rpc->index == RPC_PROCESS_SIGACTION ) , "bad RPC index\n" );
    883883
    884884    // register RPC request in remote RPC fifo and return
     
    987987#endif
    988988
    989     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     989    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    990990
    991991    // initialise RPC descriptor header
     
    10941094#endif
    10951095
    1096     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1096    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    10971097
    10981098    // initialise RPC descriptor header
     
    11721172#endif
    11731173
    1174     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1174    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    11751175
    11761176    // initialise RPC descriptor header
     
    12631263#endif
    12641264
    1265     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1265    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    12661266
    12671267    // initialise RPC descriptor header
     
    13411341#endif
    13421342
    1343     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1343    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    13441344
    13451345    // initialise RPC descriptor header
     
    14231423#endif
    14241424
    1425     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1425    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    14261426
    14271427    // initialise RPC descriptor header
     
    14861486                                error_t     * error )          // out
    14871487{
    1488     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1488    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    14891489
    14901490    // initialise RPC descriptor header
     
    15471547                                     error_t     * error )     // out
    15481548{
    1549     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1549    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    15501550
    15511551    // initialise RPC descriptor header
     
    15991599                                   error_t  * error )    // out
    16001600{
    1601     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1601    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    16021602
    16031603    // initialise RPC descriptor header
     
    16661666#endif
    16671667
    1668     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1668    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    16691669
    16701670    // initialise RPC descriptor header
     
    17541754#endif
    17551755
    1756     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1756    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    17571757
    17581758    // initialise RPC descriptor header
     
    18341834                           xptr_t *   buf_xp )     // out
    18351835{
    1836     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1836    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    18371837
    18381838    // initialise RPC descriptor header
     
    18841884                          uint32_t   kmem_type )   // in
    18851885{
    1886     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1886    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    18871887
    18881888    // initialise RPC descriptor header
     
    19341934                                    error_t  * error )        // out
    19351935{
    1936     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     1936    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    19371937
    19381938    // initialise RPC descriptor header
     
    20182018                                 page_t         ** page )      // out
    20192019{
    2020     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     2020    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    20212021
    20222022    // initialise RPC descriptor header
     
    20732073                                 struct vseg_s   ** vseg )
    20742074{
    2075     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     2075    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    20762076
    20772077    // initialise RPC descriptor header
     
    21432143                             process_t * process )
    21442144{
    2145     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     2145    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    21462146
    21472147    // initialise RPC descriptor header
     
    21852185                             bool_t      detailed )
    21862186{
    2187     assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     2187    assert( (cxy != local_cxy) , "target cluster is not remote\n");
    21882188
    21892189    // initialise RPC descriptor header
Note: See TracChangeset for help on using the changeset viewer.