Ignore:
Timestamp:
Aug 22, 2018, 11:55:48 PM (3 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_context.c

    r459 r492  
    119119error_t hal_cpu_context_alloc( thread_t * thread )
    120120{
    121     assert( (sizeof(hal_cpu_context_t) <= CONFIG_CPU_CTX_SIZE) , __FUNCTION__ ,
     121    assert( (sizeof(hal_cpu_context_t) <= CONFIG_CPU_CTX_SIZE) ,
    122122    "illegal CPU context size" );
    123123
     
    146146    hal_cpu_context_t * context = (hal_cpu_context_t *)thread->cpu_context;
    147147
    148     assert( (context != NULL ), __FUNCTION__, "CPU context not allocated" );
     148    assert( (context != NULL ), "CPU context not allocated" );
    149149
    150150    // initialisation depends on thread type
     
    235235    else                           // current == child thread
    236236    {
    237         assert( (current == child_ptr) , __FUNCTION__ , "current = %x / child = %x\n");
     237        assert( (current == child_ptr) , "current = %x / child = %x\n");
    238238    }
    239239}  // end hal_cpu_context_fork()
     
    300300error_t hal_fpu_context_alloc( thread_t * thread )
    301301{
    302     assert( (sizeof(hal_fpu_context_t) <= CONFIG_FPU_CTX_SIZE) , __FUNCTION__ ,
     302    assert( (sizeof(hal_fpu_context_t) <= CONFIG_FPU_CTX_SIZE) ,
    303303    "illegal CPU context size" );
    304304
     
    322322    hal_fpu_context_t * context = thread->fpu_context;
    323323
    324     assert( (context != NULL) , __FUNCTION__ , "fpu context not allocated" );
     324    assert( (context != NULL) , "fpu context not allocated" );
    325325
    326326    memset( context , 0 , sizeof(hal_fpu_context_t) );
     
    331331                           thread_t * src )
    332332{
    333     assert( (src != NULL) , __FUNCTION__ , "src thread pointer is NULL\n");
    334     assert( (dst != NULL) , __FUNCTION__ , "dst thread pointer is NULL\n");
     333    assert( (src != NULL) , "src thread pointer is NULL\n");
     334    assert( (dst != NULL) , "dst thread pointer is NULL\n");
    335335
    336336    // get fpu context pointers
Note: See TracChangeset for help on using the changeset viewer.