Changeset 492 for trunk


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.

Location:
trunk
Files:
39 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
  • trunk/hal/tsar_mips32/core/hal_drivers.c

    r457 r492  
    4949                           uint32_t   impl )
    5050{
    51         assert( (impl == IMPL_TXT_TTY), __FUNCTION__ , "bad implementation" );
     51        assert( (impl == IMPL_TXT_TTY), "bad implementation" );
    5252
    5353        soclib_tty_init( txt );
     
    6262                           uint32_t   impl )
    6363{
    64     assert( (impl == IMPL_PIC_SCL), __FUNCTION__, "bad implementation" );
     64    assert( (impl == IMPL_PIC_SCL), "bad implementation" );
    6565
    6666        soclib_pic_init( pic );
     
    8585                           uint32_t   impl )
    8686{
    87         assert( (impl == IMPL_IOB_TSR), __FUNCTION__ , "bad implementation" );
     87        assert( (impl == IMPL_IOB_TSR), "bad implementation" );
    8888
    8989        soclib_iob_init( iob );
     
    116116    else
    117117    {
    118                 assert( false , __FUNCTION__ , "undefined IOC device implementation" );
     118                assert( false , "undefined IOC device implementation" );
    119119        }
    120120}
     
    128128                           uint32_t   impl )
    129129{
    130         assert( (impl == IMPL_MMC_TSR), __FUNCTION__ , "bad implementation" );
     130        assert( (impl == IMPL_MMC_TSR), "bad implementation" );
    131131 
    132132    soclib_mmc_init( mmc );
     
    141141                           uint32_t   impl )
    142142{
    143         assert( (impl == IMPL_NIC_CBF), __FUNCTION__ , "bad implementation" );
     143        assert( (impl == IMPL_NIC_CBF), "bad implementation" );
    144144 
    145145    soclib_nic_init( nic );
     
    154154                           uint32_t   impl )
    155155{
    156         assert( (impl == IMPL_DMA_SCL), __FUNCTION__ , "bad implementation" );
     156        assert( (impl == IMPL_DMA_SCL), "bad implementation" );
    157157 
    158158    soclib_dma_init( dma );
  • trunk/hal/tsar_mips32/core/hal_exception.c

    r481 r492  
    500500        hal_exception_dump( this , uzone , error );
    501501
    502         assert( false , __FUNCTION__ , "core[%x,%d] blocked\n", local_cxy, this->core->lid );
     502        assert( false , "Exception raised kernel panic see information below.\n" );
    503503    }
    504504
  • 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 
  • trunk/hal/tsar_mips32/drivers/soclib_bdv.c

    r451 r492  
    219219    else
    220220    {
    221         assert( false , __FUNCTION__ , "IOC_SYNC_READ should not use IRQ" );
     221        assert( false , "IOC_SYNC_READ should not use IRQ" );
    222222    }
    223223
  • trunk/hal/tsar_mips32/drivers/soclib_nic.c

    r451 r492  
    5353
    5454    // allocate memory for chbuf descriptor (one page)
    55     assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) , __FUNCTION__ ,
     55    assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) ,
    5656            "chbuf descriptor exceeds one page" );
    5757
     
    6262    nic_chbuf_t * chbuf = (nic_chbuf_t *)kmem_alloc( &req );
    6363
    64     assert( (chbuf != NULL) , __FUNCTION__ ,
     64    assert( (chbuf != NULL) ,
    6565             "cannot allocate chbuf descriptor" );
    6666
     
    7272    // allocate containers (one page per container)
    7373    // and complete chbuf descriptor initialization
    74     assert( (CONFIG_PPM_PAGE_SIZE == 4096) , __FUNCTION__ ,
     74    assert( (CONFIG_PPM_PAGE_SIZE == 4096) ,
    7575            "chbuf container must be 4 Kbytes" );
    7676
     
    7979        uint32_t * container = (uint32_t *)kmem_alloc( &req );   
    8080
    81         assert( (container != NULL) , __FUNCTION__ ,
     81        assert( (container != NULL) ,
    8282                "cannot allocate container" );
    8383       
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r481 r492  
    5757    soclib_pic_cluster_t * ext_ptr = LOCAL_CLUSTER->pic_extend;
    5858
    59     assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) , __FUNCTION__ ,
     59    assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) ,
    6060            "no free WTI found : too much external IRQs\n");
    6161
     
    146146        if( index < LOCAL_CLUSTER->cores_nr )   // it is an IPI
    147147        {
    148             assert( (index == core->lid) , __FUNCTION__ , "illegal IPI index" );
     148            assert( (index == core->lid) , "illegal IPI index" );
    149149
    150150#if DEBUG_HAL_IRQS
     
    229229        index = pti_status - 1;
    230230
    231         assert( (index == core->lid) , __FUNCTION__ , "unconsistent PTI index\n");
     231        assert( (index == core->lid) , "unconsistent PTI index\n");
    232232
    233233#if DEBUG_HAL_IRQS
     
    292292        core_ext_ptr = kmem_alloc( &req );
    293293
    294         assert( (core_ext_ptr != NULL) , __FUNCTION__ ,
     294        assert( (core_ext_ptr != NULL) ,
    295295                "cannot allocate memory for core extension\n");
    296296   
     
    309309    cluster_ext_ptr = kmem_alloc( &req );
    310310
    311     assert( (cluster_ext_ptr != NULL) , __FUNCTION__ ,
     311    assert( (cluster_ext_ptr != NULL) ,
    312312            "cannot allocate memory for cluster extension\n");
    313313
     
    381381        else if( (func == DEV_FUNC_NIC) && !is_rx ) hwi_id = iopic_input.nic_tx[channel];
    382382        else if(  func == DEV_FUNC_IOB            ) hwi_id = iopic_input.iob;
    383         else      assert( false , __FUNCTION__ , "illegal device functionnal type\n");
     383        else      assert( false , "illegal device functionnal type\n");
    384384
    385385        // get a WTI mailbox from local XCU descriptor 
     
    439439    else
    440440    {
    441         assert( false , __FUNCTION__ , "illegal device functionnal type\n" );
     441        assert( false , "illegal device functionnal type\n" );
    442442    }
    443443}  // end soclib_pic_bind_irq();
     
    474474    else
    475475    {
    476         assert( false , __FUNCTION__ , "illegal IRQ type\n" );
     476        assert( false , "illegal IRQ type\n" );
    477477    }
    478478} // end soclib_pic_enable_irq()
     
    509509    else
    510510    {
    511         assert( false , __FUNCTION__ , "illegal IRQ type\n" );
     511        assert( false , "illegal IRQ type\n" );
    512512    }
    513513} // end soclib_pic_enable_irq()
  • trunk/hal/tsar_mips32/drivers/soclib_tty.c

    r457 r492  
    233233    else
    234234    {
    235         assert( false , __FUNCTION__ , "illegal TXT command\n" );
     235        assert( false , "illegal TXT command\n" );
    236236    }
    237237
     
    329329               
    330330                // check process exist
    331                 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,
     331                assert( (owner_xp != XPTR_NULL) ,
    332332                "TXT owner process not found\n" );
    333333
     
    387387
    388388                // check process exist
    389                 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,
     389                assert( (owner_xp != XPTR_NULL) ,
    390390                "TXT owner process not found\n" );
    391391
  • trunk/hal/x86_64/drivers/pic_apic.c

    r482 r492  
    8080                irq_id = iopic_input.txt[channel];
    8181        else
    82                 assert(false, __FUNCTION__, "unsupported device\n");
     82                assert(false, "unsupported device\n");
    8383
    8484        /* get the ISR pointer */
     
    109109                irq_id = iopic_input.txt[channel];
    110110        else
    111                 assert(false, __FUNCTION__, "unsupported device\n");
     111                assert(false, "unsupported device\n");
    112112
    113113        /* enable the line */
     
    128128                irq_id = iopic_input.txt[channel];
    129129        else
    130                 assert(false, __FUNCTION__, "unsupported device\n");
     130                assert(false, "unsupported device\n");
    131131
    132132        /* disable the line */
  • trunk/kernel/devices/dev_dma.c

    r457 r492  
    6969    if( error )
    7070    {
    71         assert( false , __FUNCTION__ , "cannot create server thread" );
     71        assert( false , "cannot create server thread" );
    7272    }
    7373
     
    103103    xptr_t  dev_xp = chdev_dir.dma[channel];
    104104
    105     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined DMA chdev descriptor" );
     105    assert( (dev_xp != XPTR_NULL) , "undefined DMA chdev descriptor" );
    106106
    107107    // register command in calling thread descriptor
  • trunk/kernel/devices/dev_fbf.c

    r483 r492  
    5959    else
    6060    {
    61         assert( false , __FUNCTION__ , "undefined FBF device implementation" );
     61        assert( false , "undefined FBF device implementation" );
    6262    }
    6363
     
    7171    xptr_t  dev_xp = chdev_dir.fbf[0];
    7272
    73     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined FBF chdev descriptor" );
     73    assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    7474
    7575    // get FBF chdev cluster and local pointer
     
    8989    xptr_t  dev_xp = chdev_dir.fbf[0];
    9090
    91     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined FBF chdev descriptor" );
     91    assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    9292
    9393    // get FBF chdev cluster and local pointer
     
    106106    xptr_t  dev_xp = chdev_dir.fbf[0];
    107107
    108     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined FBF chdev descriptor" );
     108    assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    109109
    110110    // get FBF chdev cluster and local pointer
     
    132132    xptr_t  fbf_xp = chdev_dir.fbf[0];
    133133
    134     assert( (fbf_xp != XPTR_NULL) , __FUNCTION__ , "undefined FBF chdev descriptor" );
     134    assert( (fbf_xp != XPTR_NULL) , "undefined FBF chdev descriptor" );
    135135
    136136    // get FBF chdev cluster and local pointer
     
    144144
    145145    // check offset and length versus FBF size
    146     assert( ((offset + length) <= (width * height)) , __FUNCTION__ ,
     146    assert( ((offset + length) <= (width * height)) ,
    147147    "offset %d / length %d / width %d / height %d\n", offset, length, width, height );
    148148
  • trunk/kernel/devices/dev_ioc.c

    r457 r492  
    4444    xptr_t  pic_xp  = chdev_dir.pic;
    4545
    46     assert( (pic_xp != XPTR_NULL) , __FUNCTION__ , "PIC not initialised before IOC" );
     46    assert( (pic_xp != XPTR_NULL) , "PIC not initialised before IOC" );
    4747
    4848    // get implementation and channel from chdev descriptor
     
    7575                                  lid );
    7676
    77     assert( (error == 0) , __FUNCTION__ , "cannot create server thread" );
     77    assert( (error == 0) , "cannot create server thread" );
    7878
    7979    // set "server" field in chdev descriptor
     
    111111    xptr_t  dev_xp = chdev_dir.ioc[0];
    112112
    113     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined IOC chdev descriptor" );
     113    assert( (dev_xp != XPTR_NULL) , "undefined IOC chdev descriptor" );
    114114
    115115    // register command in calling thread descriptor
     
    199199    xptr_t  ioc_xp = chdev_dir.ioc[0];
    200200
    201     assert( (ioc_xp != XPTR_NULL) , __FUNCTION__ , "undefined IOC chdev descriptor" );
     201    assert( (ioc_xp != XPTR_NULL) , "undefined IOC chdev descriptor" );
    202202
    203203    // register command in calling thread descriptor
  • trunk/kernel/devices/dev_mmc.c

    r457 r492  
    6767    xptr_t  dev_xp = this->mmc_cmd.dev_xp;
    6868
    69     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "target MMC device undefined" );
     69    assert( (dev_xp != XPTR_NULL) , "target MMC device undefined" );
    7070
    7171    // get MMC device cluster identifier & local pointer
     
    110110    void * buf_ptr = GET_PTR( buf_xp );
    111111   
    112     assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , __FUNCTION__ ,
     112    assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) ,
    113113             "buffer not aligned on cache line" );
    114114
     
    151151    void * buf_ptr = GET_PTR( buf_xp );
    152152   
    153     assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , __FUNCTION__ ,
     153    assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) ,
    154154             "buffer not aligned on cache line" );
    155155
  • trunk/kernel/devices/dev_nic.c

    r457 r492  
    4343    xptr_t  pic_xp  = chdev_dir.pic;
    4444
    45     assert( (pic_xp != XPTR_NULL) , __FUNCTION__ , "ICU not initialised before NIC" );
     45    assert( (pic_xp != XPTR_NULL) , "ICU not initialised before NIC" );
    4646
    4747    // get "impl" , "channel" , "is_rx" fields from chdev descriptor
     
    7474                                  lid );
    7575
    76     assert( (error == 0) , __FUNCTION__ , "cannot create server thread" );
     76    assert( (error == 0) , "cannot create server thread" );
    7777
    7878    // set "server" field in chdev descriptor
     
    112112    chdev_t  * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    113113
    114     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined NIC chdev descriptor" );
    115 
    116     assert( (dev_cxy == local_cxy) , __FUNCTION__ , " chdev must be local" );
     114    assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" );
     115
     116    assert( (dev_cxy == local_cxy) , " chdev must be local" );
    117117
    118118    // initialize command in thread descriptor
     
    190190    chdev_t  * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
    191191
    192     assert ( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined NIC chdev descriptor" );
    193 
    194     assert( (dev_cxy == local_cxy) , __FUNCTION__ , " chdev must be local" );
     192    assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" );
     193
     194    assert( (dev_cxy == local_cxy) , " chdev must be local" );
    195195
    196196    // initialize command in thread descriptor
  • trunk/kernel/devices/dev_txt.c

    r457 r492  
    6969    bool_t    is_rx   = txt->is_rx;
    7070
    71     assert( (pic_xp != XPTR_NULL) || (channel == 0) , __FUNCTION__ ,
     71    assert( (pic_xp != XPTR_NULL) || (channel == 0) ,
    7272            "PIC not initialised before TXT" );
    7373
     
    107107                                      lid );
    108108
    109         assert( (error == 0) , __FUNCTION__ , "cannot create server thread" );
     109        assert( (error == 0) , "cannot create server thread" );
    110110
    111111        // set "server" field in chdev descriptor
     
    132132
    133133    // check channel argument
    134     assert( (channel < CONFIG_MAX_TXT_CHANNELS) , __FUNCTION__ , "illegal channel index" );
     134    assert( (channel < CONFIG_MAX_TXT_CHANNELS) , "illegal channel index" );
    135135
    136136    // get extended pointer on remote TXT chdev descriptor
     
    138138    else                     dev_xp = chdev_dir.txt_rx[channel];
    139139
    140     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , "undefined TXT chdev descriptor" );
     140    assert( (dev_xp != XPTR_NULL) , "undefined TXT chdev descriptor" );
    141141
    142142    // register command in calling thread descriptor
     
    221221    xptr_t  dev_xp = chdev_dir.txt_tx[0];
    222222
    223     assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,
     223    assert( (dev_xp != XPTR_NULL) ,
    224224    "undefined TXT0 chdev descriptor" );
    225225
  • trunk/kernel/fs/devfs.c

    r484 r492  
    108108                                     devfs_dev_inode_xp );
    109109
    110     assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" );
     110    assert( (error == 0) , "cannot create <dev>\n" );
    111111
    112112#if( DEBUG_DEVFS_INIT & 1 )
     
    124124                                     devfs_external_inode_xp );
    125125
    126     assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" );
     126    assert( (error == 0) , "cannot create <external>\n" );
    127127
    128128#if DEBUG_DEVFS_INIT
     
    372372                     uint32_t   size )
    373373{
    374     assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , "file_xp == XPTR_NULL" );
    375 
    376     assert( ( size < CONFIG_TXT_KBUF_SIZE ) , __FUNCTION__ , "string size too large" );
     374    assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );
     375
     376    assert( ( size < CONFIG_TXT_KBUF_SIZE ) , "string size too large" );
    377377
    378378    xptr_t             chdev_xp;
     
    471471    else
    472472    {
    473         assert( false , __FUNCTION__ ,
     473        assert( false ,
    474474        "%s does not support direct user access", chdev_func_str(func) );
    475475
  • trunk/kernel/fs/fatfs.c

    r484 r492  
    259259    uint32_t   next_cluster_id;        // content of current FAT slot
    260260
    261     assert( (searched_page_index > 0) , __FUNCTION__ ,
     261    assert( (searched_page_index > 0) ,
    262262    "no FAT access required for first page\n");
    263263
     
    352352#endif
    353353
    354     assert( (fatfs_ctx != NULL) , __FUNCTION__ ,
     354    assert( (fatfs_ctx != NULL) ,
    355355    "cannot allocate memory for FATFS context\n" );
    356356
     
    360360        buffer      = (uint8_t *)kmem_alloc( &req );
    361361
    362     assert( (buffer != NULL) , __FUNCTION__ ,
     362    assert( (buffer != NULL) ,
    363363    "cannot allocate memory for 512 bytes buffer\n" );
    364364     
     
    367367    error = dev_ioc_sync_read( buffer , 0 , 1 );
    368368
    369     assert( (error == 0) , __FUNCTION__ ,
     369    assert( (error == 0) ,
    370370    "cannot access boot record\n" );
    371371
     
    393393    uint32_t sector_size = fatfs_get_record( BPB_BYTSPERSEC , buffer , 1 );
    394394
    395     assert( (sector_size == 512) , __FUNCTION__ ,
     395    assert( (sector_size == 512) ,
    396396            "sector size must be 512 bytes\n" );
    397397
     
    399399    uint32_t nb_sectors = fatfs_get_record( BPB_SECPERCLUS , buffer , 1 );
    400400
    401     assert( (nb_sectors == 8) , __FUNCTION__ ,
     401    assert( (nb_sectors == 8) ,
    402402    "cluster size must be 8 sectors\n" );
    403403
     
    405405    uint32_t nb_fats = fatfs_get_record( BPB_NUMFATS , buffer , 1 );
    406406
    407     assert( (nb_fats == 1) , __FUNCTION__ ,
     407    assert( (nb_fats == 1) ,
    408408    "number of FAT copies must be 1\n" );
    409409
     
    411411    uint32_t fat_sectors = fatfs_get_record( BPB_FAT32_FATSZ32 , buffer , 1 );
    412412
    413     assert( ((fat_sectors & 0xF) == 0) , __FUNCTION__ ,
     413    assert( ((fat_sectors & 0xF) == 0) ,
    414414    "FAT not multiple of 16 sectors\n");
    415415
     
    417417    uint32_t root_cluster = fatfs_get_record( BPB_FAT32_ROOTCLUS , buffer , 1 );
    418418
    419     assert( (root_cluster == 2) , __FUNCTION__ ,
     419    assert( (root_cluster == 2) ,
    420420    "root cluster index must be  2\n");
    421421
     
    431431    mapper_t * fat_mapper = mapper_create( FS_TYPE_FATFS );
    432432
    433     assert( (fat_mapper != NULL) , __FUNCTION__ ,
     433    assert( (fat_mapper != NULL) ,
    434434    "no memory for FAT mapper" );
    435435
     
    632632    mapper_t * mapper = parent_inode->mapper;
    633633
    634     assert( (mapper != NULL) , __FUNCTION__ , "parent mapper undefined\n");
     634    assert( (mapper != NULL) , "parent mapper undefined\n");
    635635   
    636636    char       cname[CONFIG_VFS_MAX_NAME_LENGTH];  // name extracter from each directory entry
     
    659659        page = mapper_get_page( mapper , index );
    660660
    661         assert( (page != NULL) , __FUNCTION__ , "bad parent mapper\n");
     661        assert( (page != NULL) , "bad parent mapper\n");
    662662
    663663        // get page base
  • trunk/kernel/fs/vfs.c

    r484 r492  
    171171    {
    172172        ctx = NULL;
    173                 assert( false , __FUNCTION__ , "illegal file system type = %d\n" , fs_type );
     173                assert( false , "illegal file system type = %d\n" , fs_type );
    174174    }
    175175
     
    250250error_t vfs_inode_destroy( vfs_inode_t * inode )
    251251{
    252     assert( (inode->refcount == 0), __FUNCTION__ , "inode refcount non zero\n" );
     252    assert( (inode->refcount == 0) , "inode refcount non zero\n" );
    253253
    254254    // release memory allocated for mapper
     
    280280    error_t error = 0;
    281281
    282     assert( (parent != NULL) , __FUNCTION__ , "parent pointer is NULL\n");
    283 
    284     assert( (child_xp != XPTR_NULL) , __FUNCTION__ , "child pointer is NULL\n");
     282    assert( (parent != NULL) , "parent pointer is NULL\n");
     283
     284    assert( (child_xp != XPTR_NULL) , "child pointer is NULL\n");
    285285
    286286    // get parent inode FS type
     
    294294    else if( fs_type == FS_TYPE_RAMFS )
    295295    {
    296         assert( false , __FUNCTION__ , "should not be called for RAMFS\n" );
     296        assert( false , "should not be called for RAMFS\n" );
    297297    }
    298298    else if( fs_type == FS_TYPE_DEVFS )
    299299    {
    300         assert( false , __FUNCTION__ , "should not be called for DEVFS\n" );
     300        assert( false , "should not be called for DEVFS\n" );
    301301    }
    302302    else
    303303    {
    304         assert( false , __FUNCTION__ , "undefined file system type\n" );
     304        assert( false , "undefined file system type\n" );
    305305    }
    306306
     
    581581    if( file->refcount )
    582582    {
    583         assert( false , __FUNCTION__ , "refcount non zero\n" );
     583        assert( false , "refcount non zero\n" );
    584584    }       
    585585
     
    713713                   uint32_t size )
    714714{
    715     assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , "file_xp == XPTR_NULL" );
     715    assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );
    716716
    717717    cxy_t              file_cxy;     // remote file descriptor cluster
     
    729729    inode_type = hal_remote_lw( XPTR( file_cxy , &file_ptr->type   ) );
    730730   
    731     assert( (inode_type == INODE_TYPE_FILE) , __FUNCTION__ ,
     731    assert( (inode_type == INODE_TYPE_FILE) ,
    732732    "inode type is not INODE_TYPE_FILE" );
    733733
     
    768768                         uint32_t size )
    769769{
    770     assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , "file_xp == XPTR_NULL" );
     770    assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );
    771771
    772772    cxy_t              file_cxy;     // remote file descriptor cluster
     
    835835    uint32_t       new;
    836836
    837     assert( (file_xp != XPTR_NULL) , __FUNCTION__ , "file_xp == XPTR_NULL" );
     837    assert( (file_xp != XPTR_NULL) , "file_xp == XPTR_NULL" );
    838838
    839839    // get cluster and local pointer on remote file descriptor
     
    899899    process_t  * process_ptr;      // process copy local pointer
    900900
    901     assert( (file_xp != XPTR_NULL) , __FUNCTION__ , "file_xp == XPTR_NULL" );
    902 
    903     assert( (file_id < CONFIG_PROCESS_FILE_MAX_NR) , __FUNCTION__ , "illegal file_id" );
     901    assert( (file_xp != XPTR_NULL) , "file_xp == XPTR_NULL" );
     902
     903    assert( (file_id < CONFIG_PROCESS_FILE_MAX_NR) , "illegal file_id" );
    904904
    905905    thread_t  * this    = CURRENT_THREAD;
     
    996996                    char   * path )
    997997{
    998     assert( false , __FUNCTION__ , "not implemented\n", cwd_xp, path );
     998    assert( false , "not implemented cwd_xp %x, path <%s> \n",
     999      cwd_xp, path );   
    9991000    return 0;
    10001001}
     
    10041005                  struct stat * k_stat )
    10051006{
    1006     assert( false , __FUNCTION__ , "not implemented\n", file_xp, k_stat );
     1007    assert( false , "not implemented file_xp: %x, k_stat ptr %x\n",
     1008      file_xp, k_stat );
    10071009    return 0;
    10081010}
     
    10121014                     struct dirent * k_dirent )
    10131015{
    1014     assert( false , __FUNCTION__ , "not implemented\n", file_xp, k_dirent );
     1016    assert( false , "not implemented file_xp: %x, k_dirent ptr %x\n",
     1017      file_xp, k_dirent );
    10151018    return 0;
    10161019}
     
    10211024                   uint32_t   mode )
    10221025{
    1023     assert( false , __FUNCTION__ , "not implemented\n", file_xp, path, mode );
     1026    assert( false , "not implemented file_xp: %x, path <%s>, mode: %x\n",
     1027      file_xp, path, mode );
    10241028    return 0;
    10251029}
     
    10291033                   char   * path )
    10301034{
    1031     assert( false , __FUNCTION__ , "not implemented\n", file_xp, path );
     1035    assert( false , "not implemented file_xp: %x, path <%s>\n",
     1036      file_xp, path );
    10321037    return 0;
    10331038}
     
    10651070    }
    10661071
    1067     assert( false , __FUNCTION__ , "not implemented\n" );
     1072    assert( false , "not implemented\n" );
    10681073    return 0;
    10691074}
     
    10971102
    10981103   
    1099     assert( false , __FUNCTION__ , "not implemented\n" );
     1104    assert( false , "not implemented\n" );
    11001105    return 0;
    11011106}
     
    11061111                    uint32_t rights )
    11071112{
    1108     assert( false , __FUNCTION__ , "not implemented\n", cwd_xp, path, rights );
     1113    assert( false , "not implemented cwd_xp: %x, path <%s>, rights %x\n",
     1114      cwd_xp, path, rights );
    11091115    return 0;
    11101116}
     
    11681174                                        "                              " };  // level 15
    11691175
    1170     assert( (inode_xp != XPTR_NULL) , __FUNCTION__ , "inode_xp cannot be NULL\n" );
    1171     assert( (name_xp  != XPTR_NULL) , __FUNCTION__ , "name_xp cannot be NULL\n" );
    1172     assert( (indent < 16)           , __FUNCTION__ , "depth cannot be larger than 15\n" );
     1176    assert( (inode_xp != XPTR_NULL) , "inode_xp cannot be NULL\n" );
     1177    assert( (name_xp  != XPTR_NULL) , "name_xp cannot be NULL\n" );
     1178    assert( (indent < 16)           , "depth cannot be larger than 15\n" );
    11731179   
    11741180    // get inode cluster and local pointer
     
    19441950    error_t error = 0;
    19451951
    1946     assert( (page != NULL) , __FUNCTION__ , "page pointer is NULL\n" );
     1952    assert( (page != NULL) , "page pointer is NULL\n" );
    19471953
    19481954    mapper_t    * mapper = page->mapper;
    19491955
    1950     assert( (mapper != NULL) , __FUNCTION__ , "no mapper for page\n" );
     1956    assert( (mapper != NULL) , "no mapper for page\n" );
    19511957
    19521958#if DEBUG_VFS_MAPPER_MOVE
     
    19691975    else if( fs_type == FS_TYPE_RAMFS )
    19701976    {
    1971         assert( false , __FUNCTION__ , "should not be called for RAMFS\n" );
     1977        assert( false , "should not be called for RAMFS\n" );
    19721978    }
    19731979    else if( fs_type == FS_TYPE_DEVFS )
    19741980    {
    1975         assert( false , __FUNCTION__ , "should not be called for DEVFS\n" );
     1981        assert( false , "should not be called for DEVFS\n" );
    19761982    }
    19771983    else
    19781984    {
    1979         assert( false , __FUNCTION__ , "undefined file system type\n" );
     1985        assert( false , "undefined file system type\n" );
    19801986    }
    19811987
     
    19942000error_t vfs_mapper_load_all( vfs_inode_t * inode )
    19952001{
    1996     assert( (inode != NULL) , __FUNCTION__ , "inode pointer is NULL\n" );
     2002    assert( (inode != NULL) , "inode pointer is NULL\n" );
    19972003
    19982004    uint32_t   index;
     
    20022008    uint32_t   size   = inode->size;
    20032009
    2004     assert( (mapper != NULL) , __FUNCTION__ , "mapper pointer is NULL\n" );
     2010    assert( (mapper != NULL) , "mapper pointer is NULL\n" );
    20052011
    20062012#if DEBUG_VFS_MAPPER_LOAD
  • trunk/kernel/kern/chdev.c

    r485 r492  
    264264
    265265    // deschedule
    266     assert( thread_can_yield( this ) , __FUNCTION__ , "illegal sched_yield\n" );
     266    assert( thread_can_yield( this ) , "illegal sched_yield\n" );
    267267    sched_yield("blocked on I/O");
    268268
     
    327327
    328328            // deschedule
    329             assert( thread_can_yield( server ) , __FUNCTION__ , "illegal sched_yield\n" );
     329            assert( thread_can_yield( server ) , "illegal sched_yield\n" );
    330330            sched_yield("I/O queue empty");
    331331        }
     
    408408    chdev_t     * chdev_ptr;
    409409
    410     assert( (file_xp != XPTR_NULL) , __FUNCTION__,
     410    assert( (file_xp != XPTR_NULL) ,
    411411    "file_xp == XPTR_NULL\n" );
    412412
     
    420420    inode_ptr  = (vfs_inode_t *)hal_remote_lpt( XPTR( file_cxy , &file_ptr->inode ) );
    421421
    422     assert( (inode_type == INODE_TYPE_DEV) , __FUNCTION__ ,
     422    assert( (inode_type == INODE_TYPE_DEV) ,
    423423    "inode type %d is not INODE_TYPE_DEV\n", inode_type );
    424424
  • trunk/kernel/kern/cluster.c

    r485 r492  
    450450
    451451    // check lpid
    452     assert( (lpid < CONFIG_MAX_PROCESS_PER_CLUSTER), __FUNCTION__ ,
     452    assert( (lpid < CONFIG_MAX_PROCESS_PER_CLUSTER),
    453453    "illegal LPID = %d" , lpid );
    454454
    455455    // check owner cluster
    456     assert( (owner_cxy == local_cxy) , __FUNCTION__ ,
     456    assert( (owner_cxy == local_cxy) ,
    457457    "local_cluster %x !=  owner_cluster %x" , local_cxy , owner_cxy );
    458458
     
    650650
    651651    assert( (cluster_is_undefined( cxy ) == false),
    652     __FUNCTION__, "illegal cluster index" );
     652    "illegal cluster index" );
    653653
    654654    // get extended pointer on root and lock for local process list in cluster
  • trunk/kernel/kern/do_syscall.c

    r488 r492  
    3636static int sys_undefined()
    3737{
    38     assert( false , __FUNCTION__ , "undefined system call" );
     38    assert( false , "undefined system call" );
    3939    return 0;
    4040}
     
    176176        int  error = 0;
    177177       
    178     assert( (this == CURRENT_THREAD), __FUNCTION__,
     178    assert( (this == CURRENT_THREAD),
    179179    "wrong <this> argument\n" );
    180180
     
    200200
    201201    // check kernel stack overflow
    202     assert( (CURRENT_THREAD->signature == THREAD_SIGNATURE), __FUNCTION__,
     202    assert( (CURRENT_THREAD->signature == THREAD_SIGNATURE),
    203203    "kernel stack overflow after for thread %x in cluster %x\n", CURRENT_THREAD, local_cxy );
    204204
  • trunk/kernel/kern/dqdt.c

    r485 r492  
    102102                    uint32_t y_width )
    103103{
    104     assert( ((x_size <= 32) && (y_size <= 32)) , __FUNCTION__ , "illegal mesh size\n");
     104    assert( ((x_size <= 32) && (y_size <= 32)) , "illegal mesh size\n");
    105105
    106106        dqdt_node_t * node;
  • trunk/kernel/kern/kernel_init.c

    r490 r492  
    231231        if (func == DEV_FUNC_TXT )
    232232        {
    233             assert( (channels > 0) , __FUNCTION__ , "number of TXT channels cannot be 0\n");
     233            assert( (channels > 0) , "number of TXT channels cannot be 0\n");
    234234
    235235            // initializes TXT_TX[0] chdev
     
    298298        if( func == DEV_FUNC_MMC ) 
    299299        {
    300             assert( (channels == 1) , __FUNCTION__ ,
    301                     "MMC device must be single channel\n" );
     300            assert( (channels == 1) , "MMC device must be single channel\n" );
    302301
    303302            // create chdev in local cluster
     
    308307                                      base );
    309308
    310             assert( (chdev_ptr != NULL) , __FUNCTION__ ,
     309            assert( (chdev_ptr != NULL) ,
    311310                    "cannot allocate memory for MMC chdev\n" );
    312311           
     
    344343                                          base );
    345344
    346                 assert( (chdev_ptr != NULL) , __FUNCTION__ ,
    347                         "cannot allocate memory for DMA chdev" );
     345                assert( (chdev_ptr != NULL) , "cannot allocate memory for DMA chdev" );
    348346           
    349347                // make DMA specific initialisation
     
    420418
    421419        // check PIC device initialized
    422         assert( (chdev_dir.pic != XPTR_NULL ) , __FUNCTION__ ,
     420        assert( (chdev_dir.pic != XPTR_NULL ) ,
    423421              "PIC device must be initialized before other devices\n" );
    424422
     
    428426                  (func == DEV_FUNC_TXT) ||
    429427                  (func == DEV_FUNC_NIC) ||
    430                   (func == DEV_FUNC_FBF) ) , __FUNCTION__ ,
     428                  (func == DEV_FUNC_FBF) ) ,
    431429                  "undefined external peripheral type\n" );
    432430
     
    456454                                          base );
    457455
    458                     assert( (chdev != NULL), __FUNCTION__ ,
     456                    assert( (chdev != NULL),
    459457                            "cannot allocate external device" );
    460458
     
    544542    }
    545543
    546     assert( found , __FUNCTION__ , "PIC device not found\n" );
     544    assert( found , "PIC device not found\n" );
    547545
    548546    // allocate and initialize the PIC chdev in cluster 0
     
    553551                          base );
    554552
    555     assert( (chdev != NULL), __FUNCTION__ , "no memory for PIC chdev\n" );
     553    assert( (chdev != NULL), "no memory for PIC chdev\n" );
    556554
    557555    // make PIC device type specific initialisation
     
    607605            else if((func == DEV_FUNC_TXT) && (is_rx == 0)) ptr = &iopic_input.txt_tx[channel];
    608606            else if((func == DEV_FUNC_TXT) && (is_rx != 0)) ptr = &iopic_input.txt_rx[channel];
    609             else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel]; 
    610             else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 
    611             else if( func == DEV_FUNC_IOB )                 ptr = &iopic_input.iob; 
    612             else     assert( false , __FUNCTION__ , "illegal source device for IOPIC input" );
     607            else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel];
     608            else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel];
     609            else if( func == DEV_FUNC_IOB )                 ptr = &iopic_input.iob;
     610            else     assert( false , "illegal source device for IOPIC input" );
    613611
    614612            // set one entry in all "iopic_input" structures
     
    697695                if     ( func == DEV_FUNC_MMC ) lapic_input.mmc = id;
    698696                else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id;
    699                 else assert( false , __FUNCTION__ , "illegal source device for LAPIC input" );
     697                else assert( false , "illegal source device for LAPIC input" );
    700698            }
    701699        }
     
    818816    if( error )
    819817    {
    820         assert( false , __FUNCTION__ ,
     818        assert( false ,
    821819        "illegal core identifiers gid = %x / cxy = %x / lid = %d",
    822820        core_lid , core_cxy , core_lid );
     
    830828        if( error )
    831829        {
    832             assert( false , __FUNCTION__ ,
     830            assert( false ,
    833831            "cannot initialise cluster %x", local_cxy );
    834832        }
     
    950948            fatfs_ctx_t * fatfs_ctx = fatfs_ctx_alloc();
    951949
    952             assert( (fatfs_ctx != NULL) , __FUNCTION__ ,
     950            assert( (fatfs_ctx != NULL) ,
    953951                    "cannot create FATFS context in cluster 0\n" );
    954952
     
    973971                                      &vfs_root_inode_xp );                // return
    974972
    975             assert( (error == 0) , __FUNCTION__ ,
     973            assert( (error == 0) ,
    976974                    "cannot create VFS root inode\n" );
    977975
     
    987985            vfs_ctx_t   * vfs_ctx = &fs_context[FS_TYPE_FATFS];
    988986            assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8),
    989             __FUNCTION__ , "illegal value for FATFS context in cluster %x\n", local_cxy );
     987            "illegal value for FATFS context in cluster %x\n", local_cxy );
    990988        }
    991989        else
    992990        {
    993             assert( false , __FUNCTION__ ,
     991            assert( false ,
    994992            "root FS must be FATFS" );
    995993        }
     
    10281026            fatfs_ctx_t * local_fatfs_ctx = fatfs_ctx_alloc();
    10291027
    1030             assert( (local_fatfs_ctx != NULL) , __FUNCTION__ ,
     1028            assert( (local_fatfs_ctx != NULL) ,
    10311029            "cannot create FATFS context in cluster %x\n", local_cxy );
    10321030
     
    10501048            // 7. check initialisation
    10511049            assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8),
    1052             __FUNCTION__ , "illegal value for FATFS context in cluster %x\n", local_cxy );
     1050            "illegal value for FATFS context in cluster %x\n", local_cxy );
    10531051        }
    10541052
     
    10891087        devfs_ctx_t * devfs_ctx = devfs_ctx_alloc();
    10901088
    1091         assert( (devfs_ctx != NULL) , __FUNCTION__ ,
     1089        assert( (devfs_ctx != NULL) ,
    10921090                "cannot create DEVFS context in cluster IO\n");
    10931091
  • trunk/kernel/kern/process.c

    r485 r492  
    132132    // initialize vmm as empty
    133133    error = vmm_init( process );
    134     assert( (error == 0) , __FUNCTION__ , "cannot initialize VMM\n" );
     134    assert( (error == 0) , "cannot initialize VMM\n" );
    135135 
    136136#if (DEBUG_PROCESS_REFERENCE_INIT & 1)
     
    175175                           &stdin_id );
    176176
    177         assert( (error == 0) , __FUNCTION__ , "cannot open stdin pseudo file" );
    178         assert( (stdin_id == 0) , __FUNCTION__ , "stdin index must be 0" );
     177        assert( (error == 0) , "cannot open stdin pseudo file" );
     178        assert( (stdin_id == 0) , "stdin index must be 0" );
    179179
    180180#if (DEBUG_PROCESS_REFERENCE_INIT & 1)
     
    193193                           &stdout_id );
    194194
    195         assert( (error == 0) , __FUNCTION__ , "cannot open stdout pseudo file" );
    196         assert( (stdout_id == 1) , __FUNCTION__ , "stdout index must be 1" );
     195        assert( (error == 0) , "cannot open stdout pseudo file" );
     196        assert( (stdout_id == 1) , "stdout index must be 1" );
    197197
    198198#if (DEBUG_PROCESS_REFERENCE_INIT & 1)
     
    211211                           &stderr_id );
    212212
    213         assert( (error == 0) , __FUNCTION__ , "cannot open stderr pseudo file" );
    214         assert( (stderr_id == 2) , __FUNCTION__ , "stderr index must be 2" );
     213        assert( (error == 0) , "cannot open stderr pseudo file" );
     214        assert( (stderr_id == 2) , "stderr index must be 2" );
    215215
    216216#if (DEBUG_PROCESS_REFERENCE_INIT & 1)
     
    330330    // reset local process vmm
    331331    error = vmm_init( local_process );
    332     assert( (error == 0) , __FUNCTION__ , "cannot initialize VMM\n");
     332    assert( (error == 0) , "cannot initialize VMM\n");
    333333
    334334    // reset process file descriptors array
     
    393393    pid_t       pid = process->pid;
    394394
    395         assert( (process->th_nr == 0) , __FUNCTION__ ,
     395        assert( (process->th_nr == 0) ,
    396396    "process %x in cluster %x has still active threads", pid , local_cxy );
    397397
     
    511511    assert( ((type == DELETE_ALL_THREADS ) ||
    512512             (type == BLOCK_ALL_THREADS )  ||
    513              (type == UNBLOCK_ALL_THREADS )), __FUNCTION__ , "illegal action type" );
     513             (type == UNBLOCK_ALL_THREADS )), "illegal action type" );
    514514             
    515515
     
    843843        xptr_t ref_xp = cluster_get_reference_process_from_pid( pid );
    844844
    845         assert( (ref_xp != XPTR_NULL) , __FUNCTION__ , "illegal pid\n" );
     845        assert( (ref_xp != XPTR_NULL) , "illegal pid\n" );
    846846
    847847        // allocate memory for local process descriptor
     
    10461046 
    10471047
    1048     assert( (process != NULL) , __FUNCTION__ , "process argument is NULL" );
    1049 
    1050     assert( (thread != NULL) , __FUNCTION__ , "thread argument is NULL" );
     1048    assert( (process != NULL) , "process argument is NULL" );
     1049
     1050    assert( (thread != NULL) , "thread argument is NULL" );
    10511051
    10521052    // take lock protecting th_tbl, depending on thread type:
     
    10891089    uint32_t count;  // number of threads in local process descriptor
    10901090
    1091     assert( (thread != NULL) , __FUNCTION__ , "thread argument is NULL" );
     1091    assert( (thread != NULL) , "thread argument is NULL" );
    10921092
    10931093    process_t * process = thread->process;
     
    11011101    count = process->th_nr;
    11021102
    1103     assert( (count > 0) , __FUNCTION__ , "process th_nr cannot be 0\n" );
     1103    assert( (count > 0) , "process th_nr cannot be 0\n" );
    11041104
    11051105    // remove thread from th_tbl[]
     
    11401140    ref_xp = hal_remote_lwd( XPTR( parent_process_cxy , &parent_process_ptr->ref_xp ) );
    11411141
    1142     assert( (parent_process_xp == ref_xp ) , __FUNCTION__ ,
     1142    assert( (parent_process_xp == ref_xp ) ,
    11431143    "parent process must be the reference process\n" );
    11441144
     
    12431243
    12441244    // check main thread LTID
    1245     assert( (LTID_FROM_TRDID(thread->trdid) == 0) , __FUNCTION__ ,
     1245    assert( (LTID_FROM_TRDID(thread->trdid) == 0) ,
    12461246    "main thread must have LTID == 0\n" );
    12471247
     
    14211421    }
    14221422
    1423     assert( false, __FUNCTION__, "we should not execute this code");
     1423    assert( false, "we should not execute this code");
    14241424 
    14251425        return 0;
     
    14911491        process = process_alloc();
    14921492       
    1493     assert( (process != NULL), __FUNCTION__,
     1493    assert( (process != NULL),
    14941494    "no memory for process descriptor in cluster %x\n", local_cxy  );
    14951495
     
    14971497    error = cluster_pid_alloc( process , &pid );
    14981498
    1499     assert( (error == 0), __FUNCTION__,
     1499    assert( (error == 0),
    15001500    "cannot allocate PID in cluster %x\n", local_cxy );
    15011501
    1502     assert( (pid == 1) , __FUNCTION__,
     1502    assert( (pid == 1) ,
    15031503    "process INIT must be first process in cluster 0\n" );
    15041504
     
    15181518                            &file_id );
    15191519
    1520         assert( (error == 0), __FUNCTION__,
     1520        assert( (error == 0),
    15211521    "failed to open file <%s>\n", CONFIG_PROCESS_INIT_PATH );
    15221522
     
    15251525        error = elf_load_process( file_xp , process );
    15261526
    1527         assert( (error == 0), __FUNCTION__,
     1527        assert( (error == 0),
    15281528    "cannot access .elf file <%s>\n", CONFIG_PROCESS_INIT_PATH );
    15291529
     
    15531553                                &thread );
    15541554
    1555         assert( (error == 0), __FUNCTION__,
     1555        assert( (error == 0),
    15561556    "cannot create main thread for <%s>\n", CONFIG_PROCESS_INIT_PATH );
    15571557
    1558     assert( (thread->trdid == 0), __FUNCTION__,
     1558    assert( (thread->trdid == 0),
    15591559    "main thread must have index 0 for <%s>\n", CONFIG_PROCESS_INIT_PATH );
    15601560
     
    16311631    txt_file_xp = hal_remote_lwd( XPTR( owner_cxy , &owner_ptr->fd_array.array[0] ) );
    16321632
    1633     assert( (txt_file_xp != XPTR_NULL) , __FUNCTION__ ,
     1633    assert( (txt_file_xp != XPTR_NULL) ,
    16341634    "process must be attached to one TXT terminal\n" );
    16351635
     
    16951695    }
    16961696
    1697     assert( false , __FUNCTION__ , "no free TXT terminal found" );
     1697    assert( false , "no free TXT terminal found" );
    16981698
    16991699    return -1;
     
    17121712
    17131713    // check process is in owner cluster
    1714     assert( (CXY_FROM_PID( process->pid ) == local_cxy) , __FUNCTION__ ,
     1714    assert( (CXY_FROM_PID( process->pid ) == local_cxy) ,
    17151715    "process descriptor not in owner cluster" );
    17161716
    17171717    // check terminal index
    17181718    assert( (txt_id < LOCAL_CLUSTER->nb_txt_channels) ,
    1719     __FUNCTION__ , "illegal TXT terminal index" );
     1719    "illegal TXT terminal index" );
    17201720
    17211721    // get pointers on TXT_RX[txt_id] chdev
     
    17611761    // check process descriptor in owner cluster
    17621762    process_pid = hal_remote_lw( XPTR( process_cxy , &process_ptr->pid ) );
    1763     assert( (CXY_FROM_PID( process_pid ) == process_cxy ) , __FUNCTION__ ,
     1763    assert( (CXY_FROM_PID( process_pid ) == process_cxy ) ,
    17641764    "process descriptor not in owner cluster" );
    17651765
     
    18111811
    18121812    // check owner cluster
    1813     assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,
     1813    assert( (process_cxy == CXY_FROM_PID( process_pid )) ,
    18141814    "process descriptor not in owner cluster\n" );
    18151815
     
    18641864
    18651865    // check owner cluster
    1866     assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,
     1866    assert( (process_cxy == CXY_FROM_PID( process_pid )) ,
    18671867    "process descriptor not in owner cluster\n" );
    18681868
     
    19221922
    19231923            // PANIC if KSH not found
    1924             assert( false , __FUNCTION__ , "KSH process not found for TXT %d" );
     1924            assert( false , "KSH process not found for TXT %d" );
    19251925
    19261926            return;
     
    19951995    // check owner cluster
    19961996    pid_t process_pid = hal_remote_lw( XPTR( process_cxy , &process_ptr->pid ) );
    1997     assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,
     1997    assert( (process_cxy == CXY_FROM_PID( process_pid )) ,
    19981998    "process descriptor not in owner cluster\n" );
    19991999
     
    20412041   
    20422042    assert( (txt_id < LOCAL_CLUSTER->nb_txt_channels) ,
    2043     __FUNCTION__ , "illegal TXT terminal index" );
     2043    "illegal TXT terminal index" );
    20442044
    20452045    // get pointers on TXT0 chdev
  • 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
  • trunk/kernel/kern/scheduler.c

    r470 r492  
    124124        while( done == false )
    125125        {
    126             assert( (count < sched->k_threads_nr), __FUNCTION__, "bad kernel threads list" );
     126            assert( (count < sched->k_threads_nr), "bad kernel threads list" );
    127127
    128128            // get next entry in kernel list
     
    159159        while( done == false )
    160160        {
    161             assert( (count < sched->u_threads_nr), __FUNCTION__, "bad user threads list" );
     161            assert( (count < sched->u_threads_nr), "bad user threads list" );
    162162
    163163            // get next entry in user list
     
    228228            // check thread blocked
    229229            assert( (thread->blocked & THREAD_BLOCKED_GLOBAL) ,
    230             __FUNCTION__ , "thread not blocked" );
     230            "thread not blocked" );
    231231 
    232232            // decrement response counter
     
    249249            uint32_t threads_nr = sched->u_threads_nr;
    250250
    251             assert( (threads_nr != 0) , __FUNCTION__ , "u_threads_nr cannot be 0\n" );
     251            assert( (threads_nr != 0) , "u_threads_nr cannot be 0\n" );
    252252
    253253            sched->u_threads_nr = threads_nr - 1;
     
    327327
    328328    // check next thread kernel_stack overflow
    329     assert( (next->signature == THREAD_SIGNATURE), __FUNCTION__ ,
     329    assert( (next->signature == THREAD_SIGNATURE),
    330330    "kernel stack overflow for thread %x on core[%x,%d] \n", next, local_cxy, core->lid );
    331331
    332332    // check next thread attached to same core as the calling thread
    333     assert( (next->core == current->core), __FUNCTION__ ,
     333    assert( (next->core == current->core),
    334334    "next core %x != current core %x\n", next->core, current->core );
    335335
    336336    // check next thread not blocked when type != IDLE
    337     assert( ((next->blocked == 0) || (next->type == THREAD_IDLE)) , __FUNCTION__ ,
     337    assert( ((next->blocked == 0) || (next->type == THREAD_IDLE)) ,
    338338    "next thread %x (%s) is blocked on core[%x,%d]\n",
    339339    next->trdid , thread_type_str(next->type) , local_cxy , core->lid );
     
    396396    uint32_t       save_sr;
    397397
    398     assert( (lid < LOCAL_CLUSTER->cores_nr), __FUNCTION__, "illegal core index %d\n", lid);
     398    assert( (lid < LOCAL_CLUSTER->cores_nr), "illegal core index %d\n", lid);
    399399
    400400    core_t       * core    = &LOCAL_CLUSTER->core_tbl[lid];
     
    456456    // check cxy
    457457    bool_t undefined = cluster_is_undefined( cxy );
    458     assert( (undefined == false), __FUNCTION__, "illegal cluster %x\n", cxy );
     458    assert( (undefined == false), "illegal cluster %x\n", cxy );
    459459
    460460    // check lid
    461461    uint32_t cores = hal_remote_lw( XPTR( cxy , &LOCAL_CLUSTER->cores_nr ) );
    462     assert( (lid < cores), __FUNCTION__, "illegal core index %d\n", lid);
     462    assert( (lid < cores), "illegal core index %d\n", lid);
    463463
    464464    // get local pointer on target scheduler
  • trunk/kernel/kern/thread.c

    r485 r492  
    238238    vseg_t       * vseg;         // stack vseg
    239239
    240     assert( (attr != NULL) , __FUNCTION__, "pthread attributes must be defined" );
     240    assert( (attr != NULL) , "pthread attributes must be defined" );
    241241
    242242#if DEBUG_THREAD_USER_CREATE
     
    594594#endif
    595595
    596         assert( (thread->type == THREAD_USER )          , __FUNCTION__, "bad type" );
    597         assert( (thread->signature == THREAD_SIGNATURE) , __FUNCTION__, "bad signature" );
    598         assert( (thread->local_locks == 0)              , __FUNCTION__, "bad local locks" );
    599         assert( (thread->remote_locks == 0)             , __FUNCTION__, "bad remote locks" );
     596        assert( (thread->type == THREAD_USER )          , "bad type" );
     597        assert( (thread->signature == THREAD_SIGNATURE) , "bad signature" );
     598        assert( (thread->local_locks == 0)              , "bad local locks" );
     599        assert( (thread->remote_locks == 0)             , "bad remote locks" );
    600600
    601601        // re-initialize various thread descriptor fields
     
    662662        hal_cpu_context_exec( thread );
    663663
    664     assert( false, __FUNCTION__, "we should execute this code");
     664    assert( false, "we should execute this code");
    665665 
    666666    return 0;
     
    679679
    680680    assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) ,
    681     __FUNCTION__ , "illegal thread type" );
     681        "illegal thread type" );
    682682
    683683    assert( (core_lid < LOCAL_CLUSTER->cores_nr) ,
    684             __FUNCTION__ , "illegal core_lid" );
     684            "illegal core_lid" );
    685685
    686686#if DEBUG_THREAD_KERNEL_CREATE
     
    740740                           lid_t           core_lid )
    741741{
    742     assert( (type == THREAD_IDLE) , __FUNCTION__ , "illegal thread type" );
    743     assert( (core_lid < LOCAL_CLUSTER->cores_nr) , __FUNCTION__ , "illegal core index" );
     742    assert( (type == THREAD_IDLE) , "illegal thread type" );
     743    assert( (core_lid < LOCAL_CLUSTER->cores_nr) , "illegal core index" );
    744744
    745745    // initialize thread descriptor
     
    752752                                  0 , 0 );   // no user stack for a kernel thread
    753753
    754     assert( (error == 0), __FUNCTION__, "cannot create thread idle" );
     754    assert( (error == 0), "cannot create thread idle" );
    755755
    756756    // allocate & initialize CPU context if success
    757757    error = hal_cpu_context_alloc( thread );
    758758
    759     assert( (error == 0), __FUNCTION__, "cannot allocate CPU context" );
     759    assert( (error == 0), "cannot allocate CPU context" );
    760760
    761761    hal_cpu_context_init( thread );
     
    782782#endif
    783783
    784     assert( (thread->local_locks == 0) , __FUNCTION__ ,
     784    assert( (thread->local_locks == 0) ,
    785785    "local lock not released for thread %x in process %x", thread->trdid, process->pid );
    786786
    787     assert( (thread->remote_locks == 0) , __FUNCTION__ ,
     787    assert( (thread->remote_locks == 0) ,
    788788    "remote lock not released for thread %x in process %x", thread->trdid, process->pid );
    789789
     
    867867
    868868    // check signal pending in scheduler
    869     assert( sched->req_ack_pending , __FUNCTION__ , "no pending signal" );
     869    assert( sched->req_ack_pending , "no pending signal" );
    870870   
    871871    // enter critical section
     
    10051005    // must be deleted by the parent process sys_wait() function
    10061006    owner_cxy = CXY_FROM_PID( pid );
    1007     assert( ((owner_cxy != target_cxy) || (target_ltid != 0)), __FUNCTION__,
     1007    assert( ((owner_cxy != target_cxy) || (target_ltid != 0)),
    10081008    "tharget thread cannot be the main thread\n" );
    10091009
  • trunk/kernel/libk/grdxt.c

    r473 r492  
    165165    if( (key >> (w1 + w2 + w3)) != 0 )
    166166    {
    167         assert( false , __FUNCTION__ ,
     167        assert( false ,
    168168        "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 );
    169169    }
     
    237237    if( (key >> (w1 + w2 + w3)) != 0 )
    238238    {
    239         assert( false , __FUNCTION__ ,
     239        assert( false ,
    240240        "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 );
    241241    }
     
    279279    if( (key >> (w1 + w2 + w3)) != 0 )
    280280    {
    281         assert( false , __FUNCTION__ ,
     281        assert( false ,
    282282        "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 );
    283283    }
     
    322322    if( (start_key >> (w1 + w2 + w3)) != 0 )
    323323    {
    324         assert( false , __FUNCTION__ ,
     324        assert( false ,
    325325        "start_key value %x exceed (%d + %d + %d) bits", start_key , w1 , w2 , w3 );
    326326    }
  • trunk/kernel/libk/htab.c

    r457 r492  
    9999    else
    100100    {
    101         assert( false , __FUNCTION__ , "undefined item type\n" );
     101        assert( false , "undefined item type\n" );
    102102    }
    103103
  • trunk/kernel/libk/xhtab.c

    r457 r492  
    139139    else
    140140    {
    141         assert( false , __FUNCTION__ , "illegal item type\n" );
     141        assert( false , "illegal item type\n" );
    142142    }
    143143
  • trunk/kernel/mm/kcm.c

    r464 r492  
    5656#endif
    5757
    58         assert( kcm_page->active , __FUNCTION__ , "kcm_page should be active" );
     58        assert( kcm_page->active , "kcm_page should be active" );
    5959
    6060        // get first block available
    6161        int32_t index = bitmap_ffs( kcm_page->bitmap , kcm->blocks_nr );
    6262
    63         assert( (index != -1) , __FUNCTION__ , "kcm_page should not be full" );
     63        assert( (index != -1) , "kcm_page should not be full" );
    6464
    6565        // allocate block
     
    113113        index = ((uint8_t *)ptr - (uint8_t *)kcm_page - CONFIG_KCM_SLOT_SIZE) / kcm->block_size;
    114114
    115         assert( !bitmap_state( kcm_page->bitmap , index ) , __FUNCTION__ , "page already freed" );
    116         assert( (kcm_page->count > 0) , __FUNCTION__ , "count already zero" );
     115        assert( !bitmap_state( kcm_page->bitmap , index ) , "page already freed" );
     116        assert( (kcm_page->count > 0) , "count already zero" );
    117117
    118118        bitmap_set( kcm_page->bitmap , index );
     
    216216        // the kcm_page descriptor mut fit in the KCM slot
    217217        assert( (sizeof(kcm_page_t) <= CONFIG_KCM_SLOT_SIZE) ,
    218                  __FUNCTION__ , "KCM slot too small\n" );
     218                "KCM slot too small\n" );
    219219
    220220        // initialize lock
     
    329329        kcm_t      * kcm;
    330330
    331         assert( (ptr != NULL) , __FUNCTION__ , "pointer cannot be NULL" );
     331        assert( (ptr != NULL) , "pointer cannot be NULL" );
    332332
    333333        kcm_page = (kcm_page_t *)((intptr_t)ptr & ~CONFIG_PPM_PAGE_MASK);
  • trunk/kernel/mm/khm.c

    r457 r492  
    4040{
    4141        // check config parameters
    42         assert( ((CONFIG_PPM_PAGE_SHIFT + CONFIG_PPM_HEAP_ORDER) < 32 ) , __FUNCTION__ ,
     42        assert( ((CONFIG_PPM_PAGE_SHIFT + CONFIG_PPM_HEAP_ORDER) < 32 ) ,
    4343                 "CONFIG_PPM_HEAP_ORDER too large" );
    4444
     
    142142        spinlock_lock(&khm->lock);
    143143
    144         assert( (current->busy == 1) , __FUNCTION__ , "page already freed" );
     144        assert( (current->busy == 1) , "page already freed" );
    145145
    146146        // release block
  • trunk/kernel/mm/kmem.c

    r486 r492  
    143143        kcm_t    * kcm;
    144144
    145         assert( ((type > 1) && (type < KMEM_TYPES_NR) ) , __FUNCTION__ , "illegal KCM type" );
     145        assert( ((type > 1) && (type < KMEM_TYPES_NR) ) , "illegal KCM type" );
    146146
    147147#if DEBUG_KMEM
     
    198198        flags = req->flags;
    199199
    200         assert( (type < KMEM_TYPES_NR) , __FUNCTION__ , "illegal KMEM request type" );
     200        assert( (type < KMEM_TYPES_NR) , "illegal KMEM request type" );
    201201
    202202#if DEBUG_KMEM
     
    293293        if( req->type >= KMEM_TYPES_NR )
    294294        {
    295                 assert( false , __FUNCTION__ , "illegal request type\n" );
     295                assert( false , "illegal request type\n" );
    296296        }
    297297
  • trunk/kernel/mm/ppm.c

    r486 r492  
    152152        page_t   * pages_tbl   = ppm->pages_tbl;
    153153
    154         assert( !page_is_flag( page , PG_FREE ) , __FUNCTION__ ,
     154        assert( !page_is_flag( page , PG_FREE ) ,
    155155    "page already released : ppn = %x\n" , ppm_page2ppn(XPTR(local_cxy,page)) );
    156156
    157         assert( !page_is_flag( page , PG_RESERVED ) , __FUNCTION__ ,
     157        assert( !page_is_flag( page , PG_RESERVED ) ,
    158158    "reserved page : ppn = %x\n" , ppm_page2ppn(XPTR(local_cxy,page)) );
    159159
     
    215215        ppm_t    * ppm = &LOCAL_CLUSTER->ppm;
    216216
    217         assert( (order < CONFIG_PPM_MAX_ORDER) , __FUNCTION__ ,
     217        assert( (order < CONFIG_PPM_MAX_ORDER) ,
    218218    "illegal order argument = %x\n" , order );
    219219
  • trunk/kernel/mm/vmm.c

    r473 r492  
    7979
    8080    assert( ((CONFIG_VMM_KENTRY_SIZE + CONFIG_VMM_ARGS_SIZE + CONFIG_VMM_ENVS_SIZE)
    81             <= CONFIG_VMM_ELF_BASE) , __FUNCTION__ , "UTILS zone too small\n" );
    82 
    83     assert( (CONFIG_THREAD_MAX_PER_CLUSTER <= 32) , __FUNCTION__ ,
     81            <= CONFIG_VMM_ELF_BASE) , "UTILS zone too small\n" );
     82
     83    assert( (CONFIG_THREAD_MAX_PER_CLUSTER <= 32) ,
    8484            "no more than 32 threads per cluster for a single process\n");
    8585
    8686    assert( ((CONFIG_VMM_STACK_SIZE * CONFIG_THREAD_MAX_PER_CLUSTER) <=
    87              (CONFIG_VMM_VSPACE_SIZE - CONFIG_VMM_STACK_BASE)) , __FUNCTION__ ,
     87             (CONFIG_VMM_VSPACE_SIZE - CONFIG_VMM_STACK_BASE)) ,
    8888             "STACK zone too small\n");
    8989
     
    274274
    275275    // check cluster is reference
    276     assert( (GET_CXY( process->ref_xp ) == local_cxy) , __FUNCTION__,
     276    assert( (GET_CXY( process->ref_xp ) == local_cxy) ,
    277277    "not called in reference cluster\n");
    278278
     
    346346
    347347    // check cluster is reference
    348     assert( (GET_CXY( process->ref_xp ) == local_cxy) , __FUNCTION__,
     348    assert( (GET_CXY( process->ref_xp ) == local_cxy) ,
    349349    "local cluster is not process reference cluster\n");
    350350
     
    386386            vseg     = GET_PTR( vseg_xp );
    387387
    388             assert( (GET_CXY( vseg_xp ) == local_cxy) , __FUNCTION__,
     388            assert( (GET_CXY( vseg_xp ) == local_cxy) ,
    389389            "all vsegs in reference VSL must be local\n" );
    390390
     
    11121112
    11131113            // check small page
    1114             assert( (attr & GPT_SMALL) , __FUNCTION__ ,
     1114            assert( (attr & GPT_SMALL) ,
    11151115            "an user vseg must use small pages" );
    11161116
     
    13801380    uint32_t     flags = vseg->flags;
    13811381
    1382     assert( ( type != VSEG_TYPE_FILE ) , __FUNCTION__ , "illegal vseg type\n" );
     1382    assert( ( type != VSEG_TYPE_FILE ) , "illegal vseg type\n" );
    13831383
    13841384    if( flags & VSEG_DISTRIB )    // distributed => cxy depends on vpn LSB
     
    14481448        xptr_t mapper_xp = vseg->mapper_xp;
    14491449
    1450         assert( (mapper_xp != XPTR_NULL), __FUNCTION__,
     1450        assert( (mapper_xp != XPTR_NULL),
    14511451        "mapper not defined for a FILE vseg\n" );
    14521452       
     
    14861486            xptr_t     mapper_xp = vseg->mapper_xp;
    14871487
    1488             assert( (mapper_xp != XPTR_NULL), __FUNCTION__,
     1488            assert( (mapper_xp != XPTR_NULL),
    14891489            "mapper not defined for a CODE or DATA vseg\n" );
    14901490       
     
    16551655
    16561656    // vseg has been checked by the vmm_handle_page_fault() function
    1657     assert( (vseg != NULL) , __FUNCTION__,
    1658     "vseg undefined / vpn %x / thread %x in process %x / core[%x,%d] / cycle %d\n",
    1659     vpn, this->trdid, process->pid, local_cxy, this->core->lid,
    1660     (uint32_t)hal_get_cycles() );
     1657    assert( (vseg != NULL) , "vseg undefined / vpn %x\n");
    16611658
    16621659    if( cow )  //////////////// copy_on_write request //////////////////////
     
    16691666        hal_gpt_get_pte( &vmm->gpt , vpn , &old_attr , &old_ppn );
    16701667
    1671         assert( (old_attr & GPT_MAPPED), __FUNCTION__,
    1672         "PTE unmapped for a COW exception / vpn %x / thread %x in process %x / cycle %d\n",
    1673         vpn, this, process->pid, (uint32_t)hal_get_cycles() );
     1668        assert( (old_attr & GPT_MAPPED),
     1669          "PTE unmapped for a COW exception / vpn %x\n" );
    16741670
    16751671#if( DEBUG_VMM_GET_PTE & 1 )
  • trunk/kernel/mm/vseg.c

    r473 r492  
    145145    else
    146146    {
    147             assert( false , __FUNCTION__ , "illegal vseg type\n" );
     147            assert( false , "illegal vseg type\n" );
    148148    }
    149149
     
    191191        default:
    192192        {
    193             assert( false, __FUNCTION__, "Illegal vseg type" );
     193            assert( false, "Illegal vseg type" );
    194194            break;
    195195        }
  • trunk/kernel/syscalls/sys_exec.c

    r457 r492  
    174174    pid_t         pid     = process->pid;
    175175
    176     assert( (CXY_FROM_PID( pid ) == local_cxy) , __FUNCTION__ ,
     176    assert( (CXY_FROM_PID( pid ) == local_cxy) ,
    177177    "must be called in the owner cluster\n");
    178178
    179     assert( (LTID_FROM_TRDID( this->trdid ) == 0) , __FUNCTION__ ,
     179    assert( (LTID_FROM_TRDID( this->trdid ) == 0) ,
    180180    "must be called by the main thread\n");
    181181
    182     assert( (args == NULL) , __FUNCTION__ ,
     182    assert( (args == NULL) ,
    183183    "args not supported yet\n" );
    184184
    185     assert( (envs == NULL) , __FUNCTION__ ,
     185    assert( (envs == NULL) ,
    186186    "args not supported yet\n" );
    187187
     
    252252    }
    253253
    254     assert( false , __FUNCTION__, "we should not execute this code" );
     254    assert( false , "we should not execute this code" );
    255255
    256256    return 0; 
  • trunk/kernel/syscalls/sys_read.c

    r469 r492  
    209209    {
    210210        nbytes = 0;
    211         assert( false , __FUNCTION__ , "file type %d non supported yet\n", type );
     211        assert( false , "file type %d non supported yet\n", type );
    212212    }
    213213
  • trunk/kernel/syscalls/sys_write.c

    r469 r492  
    173173    {
    174174        nbytes = 0;
    175         assert( false , __FUNCTION__ , "file type %d non supported\n", type );
     175        assert( false , "file type %d non supported\n", type );
    176176    }
    177177
Note: See TracChangeset for help on using the changeset viewer.