Changeset 438 for trunk/kernel/fs


Ignore:
Timestamp:
Apr 4, 2018, 2:49:02 PM (7 years ago)
Author:
alain
Message:

Fix a bug in scheduler related to RPC blocking.

Location:
trunk/kernel/fs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/devfs.c

    r437 r438  
    4242extern chdev_directory_t    chdev_dir;      // allocated in kernel_init.c
    4343
    44 #if (CONFIG_DEBUG_SYS_READ & 1)
     44#if (DEBUG_SYS_READ & 1)
    4545extern uint32_t  enter_devfs_read;
    4646extern uint32_t  exit_devfs_read;
    4747#endif
    4848
    49 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     49#if (DEBUG_SYS_WRITE & 1)
    5050extern uint32_t  enter_devfs_write;
    5151extern uint32_t  exit_devfs_write;
     
    9292    error_t  error;
    9393
    94 #if CONFIG_DEBUG_DEVFS_INIT
     94#if DEBUG_DEVFS_INIT
    9595uint32_t cycle = (uint32_t)hal_get_cycles();
    96 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     96if( DEBUG_DEVFS_INIT < cycle )
    9797printk("\n[DBG] %s : thread %x enter at cycle %d\n",
    9898__FUNCTION__ , CURRENT_THREAD , cycle );
     
    110110    assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" );
    111111
    112 #if( CONFIG_DEBUG_DEVFS_INIT & 1 )
    113 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     112#if( DEBUG_DEVFS_INIT & 1 )
     113if( DEBUG_DEVFS_INIT < cycle )
    114114printk("\n[DBG] %s : created <dev> inode at cycle %d\n", __FUNCTION__, cycle );
    115115#endif
     
    126126    assert( (error == 0) , __FUNCTION__ , "cannot create <external>\n" );
    127127
    128 #if CONFIG_DEBUG_DEVFS_INIT
     128#if DEBUG_DEVFS_INIT
    129129cycle = (uint32_t)hal_get_cycles();
    130 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     130if( DEBUG_DEVFS_INIT < cycle )
    131131printk("\n[DBG] %s : thread %x exit at cycle %d\n",
    132132__FUNCTION__ , CURRENT_THREAD , cycle );
     
    147147    uint32_t      channel;
    148148
    149 #if CONFIG_DEBUG_DEVFS_INIT
     149#if DEBUG_DEVFS_INIT
    150150uint32_t cycle = (uint32_t)hal_get_cycles();
    151 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     151if( DEBUG_DEVFS_INIT < cycle )
    152152printk("\n[DBG] %s : thread %x enter at cycle %d\n",
    153153__FUNCTION__ , CURRENT_THREAD , cycle );
     
    357357    }
    358358
    359 #if CONFIG_DEBUG_DEVFS_INIT
     359#if DEBUG_DEVFS_INIT
    360360cycle = (uint32_t)hal_get_cycles();
    361 if( CONFIG_DEBUG_DEVFS_INIT < cycle )
     361if( DEBUG_DEVFS_INIT < cycle )
    362362printk("\n[DBG] %s : thread %x exit at cycle %d\n",
    363363__FUNCTION__ , CURRENT_THREAD , cycle );
     
    385385    char               k_buf[CONFIG_TXT_KBUF_SIZE];  // local kernel buffer
    386386
    387 #if (CONFIG_DEBUG_SYS_READ & 1)
     387#if (DEBUG_SYS_READ & 1)
    388388enter_devfs_read = hal_time_stamp();
    389389#endif
    390390
    391 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     391#if (DEBUG_SYS_WRITE & 1)
    392392enter_devfs_write = hal_time_stamp();
    393393#endif
    394394
    395 #if CONFIG_DEBUG_DEVFS_MOVE
     395#if DEBUG_DEVFS_MOVE
    396396uint32_t cycle = (uint32_t)hal_get_cycles();
    397 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     397if( DEBUG_DEVFS_MOVE < cycle )
    398398printk("\n[DBG] %s : thread %x enter / to_mem %d / cycle %d\n",
    399399__FUNCTION__ , CURRENT_THREAD , to_buffer , cycle );
     
    431431             }
    432432
    433 #if CONFIG_DEBUG_DEVFS_MOVE
     433#if DEBUG_DEVFS_MOVE
    434434cycle = (uint32_t)hal_get_cycles();
    435 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     435if( DEBUG_DEVFS_MOVE < cycle )
    436436printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n",
    437437__FUNCTION__ , CURRENT_THREAD , to_buffer / cycle );
    438438#endif
    439439
    440 #if (CONFIG_DEBUG_SYS_READ & 1)
     440#if (DEBUG_SYS_READ & 1)
    441441exit_devfs_read = hal_time_stamp();
    442442#endif
     
    455455            {
    456456
    457 #if CONFIG_DEBUG_DEVFS_MOVE
     457#if DEBUG_DEVFS_MOVE
    458458cycle = (uint32_t)hal_get_cycles();
    459 if( CONFIG_DEBUG_DEVFS_MOVE < cycle )
     459if( DEBUG_DEVFS_MOVE < cycle )
    460460printk("\n[DBG] %s : thread %x exit / to_mem %d / cycle %d\n",
    461461__FUNCTION__ , CURRENT_THREAD , to_buffer / cycle );
    462462#endif
    463463
    464 #if (CONFIG_DEBUG_SYS_WRITE & 1)
     464#if (DEBUG_SYS_WRITE & 1)
    465465exit_devfs_write = hal_time_stamp();
    466466#endif
  • trunk/kernel/fs/fatfs.c

    r435 r438  
    262262    "no FAT access required for first page\n");
    263263
    264 #if CONFIG_DEBUG_FATFS_GET_CLUSTER
     264#if DEBUG_FATFS_GET_CLUSTER
    265265uint32_t cycle = (uint32_t)hal_get_cycles();
    266 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
     266if( DEBUG_FATFS_GET_CLUSTER < cycle )
    267267printk("\n[DBG] %s : thread %x enter / first_cluster_id %d / searched_index / cycle %d\n",
    268268__FUNCTION__, CURRENT_THREAD, first_cluster_id, searched_page_index, cycle );
     
    293293        next_cluster_id = current_page_buffer[current_page_offset];
    294294
    295 #if (CONFIG_DEBUG_FATFS_GET_CLUSTER & 1)
    296 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
     295#if (DEBUG_FATFS_GET_CLUSTER & 1)
     296if( DEBUG_FATFS_GET_CLUSTER < cycle )
    297297printk("\n[DBG] %s : traverse FAT / current_page_index = %d\n"
    298298"current_page_offset = %d / next_cluster_id = %d\n",
     
    308308    if( next_cluster_id == 0xFFFFFFFF ) return EIO;
    309309   
    310 #if CONFIG_DEBUG_FATFS_GET_CLUSTER
     310#if DEBUG_FATFS_GET_CLUSTER
    311311cycle = (uint32_t)hal_get_cycles();
    312 if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
     312if( DEBUG_FATFS_GET_CLUSTER < cycle )
    313313printk("\n[DBG] %s : thread %x exit / searched_cluster_id = %d / cycle %d\n",
    314314__FUNCTION__, CURRENT_THREAD, next_cluster_id / cycle );
     
    345345    uint8_t     * buffer;
    346346
    347 #if CONFIG_DEBUG_FATFS_INIT
     347#if DEBUG_FATFS_INIT
    348348uint32_t cycle = (uint32_t)hal_get_cycles();
    349 if( CONFIG_DEBUG_FATFS_INIT < cycle )
     349if( DEBUG_FATFS_INIT < cycle )
    350350printk("\n[DBG] %s : thread %x enter for fatfs_ctx = %x / cycle %d\n",
    351351__FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle );
     
    370370    "cannot access boot record\n" );
    371371
    372 #if (CONFIG_DEBUG_FATFS_INIT & 0x1)
    373 if( CONFIG_DEBUG_FATFS_INIT < cycle )
     372#if (DEBUG_FATFS_INIT & 0x1)
     373if( DEBUG_FATFS_INIT < cycle )
    374374{
    375375    uint32_t   line;
     
    448448    fatfs_ctx->fat_mapper_xp         = XPTR( local_cxy , fat_mapper );
    449449
    450 #if CONFIG_DEBUG_FATFS_INIT
     450#if DEBUG_FATFS_INIT
    451451cycle = (uint32_t)hal_get_cycles();
    452 if( CONFIG_DEBUG_FATFS_INIT < cycle )
     452if( DEBUG_FATFS_INIT < cycle )
    453453printk("\n[DBG] %s : thread %x exit for fatfs_ctx = %x / cycle %d\n",
    454454__FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle );
     
    486486    inode = mapper->inode;
    487487
    488 #if CONFIG_DEBUG_FATFS_MOVE
     488#if DEBUG_FATFS_MOVE
    489489uint32_t cycle = (uint32_t)hal_get_cycles();
    490 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     490if( DEBUG_FATFS_MOVE < cycle )
    491491printk("\n[DBG] %s : thread %x enter / page %d / inode %x / mapper %x / cycle %d\n",
    492492__FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle );
     
    507507        lba = fatfs_ctx->fat_begin_lba + (count * index);
    508508 
    509 #if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
    510 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     509#if (DEBUG_FATFS_MOVE & 0x1)
     510if( DEBUG_FATFS_MOVE < cycle )
    511511printk("\n[DBG] %s : access FAT on device / lba = %d\n", __FUNCTION__ , lba );
    512512#endif
     
    541541            {
    542542
    543 #if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
    544 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     543#if (DEBUG_FATFS_MOVE & 0x1)
     544if( DEBUG_FATFS_MOVE < cycle )
    545545print("\n[DBG] %s : access local FAT mapper\n"
    546546"fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n",
     
    555555            {
    556556
    557 #if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
    558 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     557#if (DEBUG_FATFS_MOVE & 0x1)
     558if( DEBUG_FATFS_MOVE < cycle )
    559559printk("\n[DBG] %s : access remote FAT mapper\n"
    560560"fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n",
     
    572572        }
    573573
    574 #if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
    575 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     574#if (DEBUG_FATFS_MOVE & 0x1)
     575if( DEBUG_FATFS_MOVE < cycle )
    576576printk("\n[DBG] %s : access device for inode %x / cluster_id %d\n",
    577577__FUNCTION__ , inode , searched_cluster_id );
     
    588588    }
    589589
    590 #if CONFIG_DEBUG_FATFS_MOVE
     590#if DEBUG_FATFS_MOVE
    591591cycle = (uint32_t)hal_get_cycles();
    592 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     592if( DEBUG_FATFS_MOVE < cycle )
    593593printk("\n[DBG] %s : thread %x exit / page %d / inode %x / mapper %x / cycle %d\n",
    594594__FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle );
    595595#endif
    596596
    597 #if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
    598 if( CONFIG_DEBUG_FATFS_MOVE < cycle )
     597#if (DEBUG_FATFS_MOVE & 0x1)
     598if( DEBUG_FATFS_MOVE < cycle )
    599599{
    600600    uint32_t * tab = (uint32_t *)buffer;
     
    623623    // - scan the directory entries in each 4 Kbytes page
    624624
    625 #if CONFIG_DEBUG_FATFS_LOAD
     625#if DEBUG_FATFS_LOAD
    626626uint32_t cycle = (uint32_t)hal_get_cycles();
    627 if( CONFIG_DEBUG_FATFS_LOAD < cycle )
     627if( DEBUG_FATFS_LOAD < cycle )
    628628printk("\n[DBG] %s : thread %x enter for child <%s> in parent inode %x / cycle %d\n",
    629629__FUNCTION__ , CURRENT_THREAD , name , parent_inode , cycle );
     
    665665        base = (uint8_t *)GET_PTR( base_xp );
    666666
    667 #if (CONFIG_DEBUG_FATFS_LOAD & 0x1)
    668 if( CONFIG_DEBUG_FATFS_LOAD < cycle )
     667#if (DEBUG_FATFS_LOAD & 0x1)
     668if( DEBUG_FATFS_LOAD < cycle )
    669669{
    670670    uint32_t * buf = (uint32_t *)base;
     
    749749    {
    750750
    751 #if CONFIG_DEBUG_FATFS_LOAD
     751#if DEBUG_FATFS_LOAD
    752752cycle = (uint32_t)hal_get_cycles();
    753 if( CONFIG_DEBUG_FATFS_LOAD < cycle )
     753if( DEBUG_FATFS_LOAD < cycle )
    754754printk("\n[DBG] %s : thread %x exit / child <%s> not found / cycle %d\n",
    755755__FUNCTION__ , CURRENT_THREAD, name, cycle );
     
    771771        hal_remote_sw( XPTR( child_cxy , &child_ptr->extend ) , cluster );
    772772
    773 #if CONFIG_DEBUG_FATFS_LOAD
     773#if DEBUG_FATFS_LOAD
    774774cycle = (uint32_t)hal_get_cycles();
    775 if( CONFIG_DEBUG_FATFS_LOAD < cycle )
     775if( DEBUG_FATFS_LOAD < cycle )
    776776printk("\n[DBG] %s : thread %x exit / child <%s> loaded / cycle %d\n",
    777777__FUNCTION__ , CURRENT_THREAD, name, cycle );
  • trunk/kernel/fs/vfs.c

    r437 r438  
    157157    error_t            error;
    158158
    159 #if CONFIG_DEBUG_VFS_INODE_CREATE
     159#if DEBUG_VFS_INODE_CREATE
    160160uint32_t cycle = (uint32_t)hal_get_cycles();
    161 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle )
     161if( DEBUG_VFS_INODE_CREATE < cycle )
    162162printk("\n[DBG] %s : thread %x enter / dentry = %x in cluster %x / cycle %d\n",
    163163__FUNCTION__, CURRENT_THREAD, GET_PTR(dentry_xp), GET_CXY(dentry_xp), cycle );
     
    234234    remote_spinlock_init( XPTR( local_cxy , &inode->main_lock ) );
    235235
    236 #if CONFIG_DEBUG_VFS_INODE_CREATE
     236#if DEBUG_VFS_INODE_CREATE
    237237cycle = (uint32_t)hal_get_cycles();
    238 if( CONFIG_DEBUG_VFS_INODE_CREATE < cycle )
     238if( DEBUG_VFS_INODE_CREATE < cycle )
    239239printk("\n[DBG] %s : thread %x exit / inode = %x in cluster %x / cycle %d\n",
    240240__FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle );
     
    272272{
    273273
    274 #if CONFIG_DEBUG_VFS_INODE_LOAD
     274#if DEBUG_VFS_INODE_LOAD
    275275uint32_t cycle = (uint32_t)hal_get_cycles();
    276 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle )
     276if( DEBUG_VFS_INODE_LOAD < cycle )
    277277printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n",
    278278__FUNCTION__, CURRENT_THREAD , name , cycle );
     
    306306    }
    307307
    308 #if CONFIG_DEBUG_VFS_INODE_LOAD
     308#if DEBUG_VFS_INODE_LOAD
    309309cycle = (uint32_t)hal_get_cycles();
    310 if( CONFIG_DEBUG_VFS_INODE_LOAD < cycle )
     310if( DEBUG_VFS_INODE_LOAD < cycle )
    311311printk("\n[DBG] %s : thread %x exit for <%s> / cycle %d\n",
    312312__FUNCTION__, CURRENT_THREAD , name , cycle );
     
    433433        kmem_req_t       req;        // request to kernel memory allocator
    434434
    435 #if CONFIG_DEBUG_VFS_DENTRY_CREATE
     435#if DEBUG_VFS_DENTRY_CREATE
    436436uint32_t cycle = (uint32_t)hal_get_cycles();
    437 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )
     437if( DEBUG_VFS_DENTRY_CREATE < cycle )
    438438printk("\n[DBG] %s : thread %x enter for <%s> / parent_inode %x / cycle %d\n",
    439439__FUNCTION__, CURRENT_THREAD , name , parent , cycle );
     
    456456    {
    457457
    458 #if CONFIG_DEBUG_SYSCALLS_ERROR
     458#if DEBUG_SYSCALLS_ERROR
    459459printk("\n[ERROR] in %s : name <name> too long\n", __FUNCTION__ , name );
    460460#endif
     
    471471    {
    472472
    473 #if CONFIG_DEBUG_SYSCALLS_ERROR
     473#if DEBUG_SYSCALLS_ERROR
    474474printk("\n[ERROR] in %s : cannot allocate dentry\n", __FUNCTION__ );
    475475#endif
     
    484484    strcpy( dentry->name , name );
    485485
    486 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 )
     486#if( DEBUG_VFS_DENTRY_CREATE & 1 )
    487487cycle = (uint32_t)hal_get_cycles();
    488 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )
     488if( DEBUG_VFS_DENTRY_CREATE < cycle )
    489489printk("\n[DBG] %s : dentry initialised\n", __FUNCTION__ );
    490490#endif
     
    495495                  XPTR( local_cxy , &dentry->list ) );
    496496
    497 #if( CONFIG_DEBUG_VFS_DENTRY_CREATE & 1 )
     497#if( DEBUG_VFS_DENTRY_CREATE & 1 )
    498498cycle = (uint32_t)hal_get_cycles();
    499 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )
     499if( DEBUG_VFS_DENTRY_CREATE < cycle )
    500500printk("\n[DBG] %s : dentry registerd in htab\n", __FUNCTION__ );
    501501#endif
     
    504504    *dentry_xp = XPTR( local_cxy , dentry );
    505505
    506 #if CONFIG_DEBUG_VFS_DENTRY_CREATE
     506#if DEBUG_VFS_DENTRY_CREATE
    507507cycle = (uint32_t)hal_get_cycles();
    508 if( CONFIG_DEBUG_VFS_DENTRY_CREATE < cycle )
     508if( DEBUG_VFS_DENTRY_CREATE < cycle )
    509509printk("\n[DBG] %s : thread %x exit for <%s> / dentry %x / cycle %d\n",
    510510__FUNCTION__, CURRENT_THREAD , name , dentry , cycle );
     
    627627    uint32_t      file_id;      // created file descriptor index in reference fd_array
    628628
    629 #if CONFIG_DEBUG_VFS_OPEN
     629#if DEBUG_VFS_OPEN
    630630uint32_t cycle = (uint32_t)hal_get_cycles();
    631 if( CONFIG_DEBUG_VFS_OPEN < cycle )
     631if( DEBUG_VFS_OPEN < cycle )
    632632printk("\n[DBG] %s :  thread %x enter for <%s> / cycle %d\n",
    633633__FUNCTION__, CURRENT_THREAD, path, cycle );
     
    674674    if( error ) return error;
    675675
    676 #if CONFIG_DEBUG_VFS_OPEN
     676#if DEBUG_VFS_OPEN
    677677cycle = (uint32_t)hal_get_cycles();
    678 if( CONFIG_DEBUG_VFS_OPEN < cycle )
     678if( DEBUG_VFS_OPEN < cycle )
    679679printk("\n[DBG] %s : thread %x exit for <%s> / file %x in cluster %x / cycle %d\n",
    680680__FUNCTION__, CURRENT_THREAD, path, GET_PTR(file_xp), GET_CXY(file_xp), cycle );
     
    13651365    process = this->process;
    13661366
    1367 #if CONFIG_DEBUG_VFS_LOOKUP
     1367#if DEBUG_VFS_LOOKUP
    13681368uint32_t cycle = (uint32_t)hal_get_cycles();
    1369 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1369if( DEBUG_VFS_LOOKUP < cycle )
    13701370printk("\n[DBG] %s : thread %x enter for <%s> / cycle %d\n",
    13711371__FUNCTION__, CURRENT_THREAD, pathname, cycle );
     
    13931393        vfs_get_name_from_path( current , name , &next , &last );
    13941394
    1395 #if (CONFIG_DEBUG_VFS_LOOKUP & 1)
    1396 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1395#if (DEBUG_VFS_LOOKUP & 1)
     1396if( DEBUG_VFS_LOOKUP < cycle )
    13971397printk("\n[DBG] %s : look for <%s> / last = %d\n", __FUNCTION__ , name , last );
    13981398#endif
     
    14141414        {
    14151415
    1416 #if (CONFIG_DEBUG_VFS_LOOKUP & 1)
    1417 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1416#if (DEBUG_VFS_LOOKUP & 1)
     1417if( DEBUG_VFS_LOOKUP < cycle )
    14181418printk("\n[DBG] %s : miss <%s> => load it\n", __FUNCTION__ , name );
    14191419#endif
     
    15001500            vfs_inode_lock( parent_xp );
    15011501
    1502 #if (CONFIG_DEBUG_VFS_LOOKUP & 1)
    1503 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1502#if (DEBUG_VFS_LOOKUP & 1)
     1503if( DEBUG_VFS_LOOKUP < cycle )
    15041504printk("\n[DBG] %s : created node <%s>\n", __FUNCTION__ , name );
    15051505#endif
     
    15071507        }
    15081508
    1509 #if (CONFIG_DEBUG_VFS_LOOKUP & 1)
    1510 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1509#if (DEBUG_VFS_LOOKUP & 1)
     1510if( DEBUG_VFS_LOOKUP < cycle )
    15111511printk("\n[DBG] %s : found <%s> / inode %x in cluster %x\n",
    15121512__FUNCTION__ , name , GET_PTR(child_xp) , GET_CXY(child_xp) );
     
    15361536    vfs_inode_unlock( parent_xp );
    15371537
    1538 #if CONFIG_DEBUG_VFS_LOOKUP
     1538#if DEBUG_VFS_LOOKUP
    15391539cycle = (uint32_t)hal_get_cycles();
    1540 if( CONFIG_DEBUG_VFS_LOOKUP < cycle )
     1540if( DEBUG_VFS_LOOKUP < cycle )
    15411541printk("\n[DBG] %s : thread %x exit for <%s> / inode %x in cluster %x / cycle %d\n",
    15421542__FUNCTION__, CURRENT_THREAD, pathname, GET_PTR(child_xp), GET_CXY(child_xp), cycle );
     
    16391639    parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp );
    16401640
    1641 #if CONFIG_DEBUG_VFS_ADD_CHILD
     1641#if DEBUG_VFS_ADD_CHILD
    16421642uint32_t cycle = (uint32_t)hal_get_cycles();
    1643 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )
     1643if( DEBUG_VFS_ADD_CHILD < cycle )
    16441644printk("\n[DBG] %s : thread %x enter for <%s> / child_cxy = %x / parent_cxy = %x\n",
    16451645__FUNCTION__ , CURRENT_THREAD , name , child_cxy , parent_cxy );
     
    16541654                                   &dentry_xp );
    16551655
    1656 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1)
    1657 if( (CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
     1656#if (DEBUG_VFS_ADD_CHILD & 1)
     1657if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
    16581658printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, local_cxy );
    16591659#endif
     
    16691669                                      &error );
    16701670
    1671 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1)
    1672 if( (CONFIG_DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
     1671#if (DEBUG_VFS_ADD_CHILD & 1)
     1672if( (DEBUG_VFS_ADD_CHILD < cycle) && (error == 0) )
    16731673printk("\n[DBG] %s : dentry <%s> created in cluster %x\n", __FUNCTION__, name, parent_cxy );
    16741674#endif
     
    17011701                                  &inode_xp );
    17021702
    1703 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1)
    1704 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )
     1703#if (DEBUG_VFS_ADD_CHILD & 1)
     1704if( DEBUG_VFS_ADD_CHILD < cycle )
    17051705printk("\n[DBG] %s : inode <%x> created in cluster %x\n",
    17061706__FUNCTION__ , GET_PTR(inode_xp) , local_cxy );
     
    17221722                                     &error );
    17231723
    1724 #if (CONFIG_DEBUG_VFS_ADD_CHILD & 1)
    1725 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )
     1724#if (DEBUG_VFS_ADD_CHILD & 1)
     1725if( DEBUG_VFS_ADD_CHILD < cycle )
    17261726printk("\n[DBG] %s : inode <%s> created in cluster %x\n",
    17271727__FUNCTION__ , GET_PTR(inode_xp) , child_cxy );
     
    17461746    hal_remote_swd( XPTR( dentry_cxy , &dentry_ptr->child_xp ) , inode_xp );
    17471747
    1748 #if CONFIG_DEBUG_VFS_ADD_CHILD
     1748#if DEBUG_VFS_ADD_CHILD
    17491749cycle = (uint32_t)hal_get_cycles();
    1750 if( CONFIG_DEBUG_VFS_ADD_CHILD < cycle )
     1750if( DEBUG_VFS_ADD_CHILD < cycle )
    17511751printk("\n[DBG] %s : thread %x exit for <%s>\n",
    17521752__FUNCTION__ , CURRENT_THREAD , name );
     
    17751775    assert( (mapper != NULL) , __FUNCTION__ , "no mapper for page\n" );
    17761776
    1777 #if CONFIG_DEBUG_VFS_MAPPER_MOVE
     1777#if DEBUG_VFS_MAPPER_MOVE
    17781778uint32_t cycle = (uint32_t)hal_get_cycles();
    1779 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )
     1779if( DEBUG_VFS_MAPPER_MOVE < cycle )
    17801780printk("\n[DBG] %s : thread %x enter for page %d / mapper %x / inode %x / cycle %d\n",
    17811781__FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle );
     
    18051805    }
    18061806
    1807 #if CONFIG_DEBUG_VFS_MAPPER_MOVE
     1807#if DEBUG_VFS_MAPPER_MOVE
    18081808cycle = (uint32_t)hal_get_cycles();
    1809 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )
     1809if( DEBUG_VFS_MAPPER_MOVE < cycle )
    18101810printk("\n[DBG] %s : thread %x exit for page %d / mapper %x / inode %x / cycle %d\n",
    18111811__FUNCTION__, CURRENT_THREAD, page->index, mapper, mapper->inode, cycle );
     
    18291829    assert( (mapper != NULL) , __FUNCTION__ , "mapper pointer is NULL\n" );
    18301830
    1831 #if CONFIG_DEBUG_VFS_MAPPER_LOAD
     1831#if DEBUG_VFS_MAPPER_LOAD
    18321832uint32_t cycle = (uint32_t)hal_get_cycles();
    1833 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )
     1833if( DEBUG_VFS_MAPPER_MOVE < cycle )
    18341834printk("\n[DBG] %s : thread %x enter for inode %x in cluster %x / cycle %d\n",
    18351835__FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle );
     
    18501850    }
    18511851
    1852 #if CONFIG_DEBUG_VFS_MAPPER_LOAD
     1852#if DEBUG_VFS_MAPPER_LOAD
    18531853cycle = (uint32_t)hal_get_cycles();
    1854 if( CONFIG_DEBUG_VFS_MAPPER_MOVE < cycle )
     1854if( DEBUG_VFS_MAPPER_MOVE < cycle )
    18551855printk("\n[DBG] %s : thread %x exit for inode %x in cluster %x / cycle %d\n",
    18561856__FUNCTION__, CURRENT_THREAD, inode, local_cxy, cycle );
Note: See TracChangeset for help on using the changeset viewer.