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

Fix a bug in scheduler related to RPC blocking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/kernel_init.c

    r437 r438  
    125125// these debug variables are used to analyse the sys_read() syscall timing
    126126
    127 #if CONFIG_DEBUG_SYS_READ
     127#if DEBUG_SYS_READ
    128128uint32_t   enter_sys_read;
    129129uint32_t   exit_sys_read;
     
    150150// these debug variables are used to analyse the sys_write() syscall timing
    151151
    152 #if CONFIG_DEBUG_SYS_WRITE   
     152#if DEBUG_SYS_WRITE   
    153153uint32_t   enter_sys_write;
    154154uint32_t   exit_sys_write;
     
    324324            }
    325325
    326 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
    327 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
     326#if( DEBUG_KERNEL_INIT & 0x1 )
     327if( hal_time_stamp() > DEBUG_KERNEL_INIT )
    328328printk("\n[DBG] %s : created MMC in cluster %x / chdev = %x\n",
    329329__FUNCTION__ , local_cxy , chdev_ptr );
     
    353353                chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr );
    354354
    355 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
    356 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
     355#if( DEBUG_KERNEL_INIT & 0x1 )
     356if( hal_time_stamp() > DEBUG_KERNEL_INIT )
    357357printk("\n[DBG] %s : created DMA[%d] in cluster %x / chdev = %x\n",
    358358__FUNCTION__ , channel , local_cxy , chdev_ptr );
     
    488488                    }
    489489
    490 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
    491 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
     490#if( DEBUG_KERNEL_INIT & 0x1 )
     491if( hal_time_stamp() > DEBUG_KERNEL_INIT )
    492492printk("\n[DBG] %s : create chdev %s / channel = %d / rx = %d / cluster %x / chdev = %x\n",
    493493__FUNCTION__ , chdev_func_str( func ), channel , rx , local_cxy , chdev );
     
    623623    }
    624624
    625 #if( CONFIG_DEBUG_KERNEL_INIT & 0x1 )
    626 if( hal_time_stamp() > CONFIG_DEBUG_KERNEL_INIT )
     625#if( DEBUG_KERNEL_INIT & 0x1 )
     626if( hal_time_stamp() > DEBUG_KERNEL_INIT )
    627627{
    628628    printk("\n[DBG] %s created PIC chdev in cluster %x at cycle %d\n",
     
    807807    /////////////////////////////////////////////////////////////////////////////////
    808808
    809 #if CONFIG_DEBUG_KERNEL_INIT
    810 if( (core_lid ==  0) && (local_cxy == 0) )
     809#if DEBUG_KERNEL_INIT
     810if( (core_lid ==  0) & (local_cxy == 0) )
    811811printk("\n[DBG] %s : exit barrier 0 : TXT0 initialized / cycle %d\n",
    812812__FUNCTION__, (uint32_t)hal_get_cycles() );
     
    845845    /////////////////////////////////////////////////////////////////////////////////
    846846
    847 #if CONFIG_DEBUG_KERNEL_INIT
    848 if( (core_lid ==  0) && (local_cxy == 0) )
     847#if DEBUG_KERNEL_INIT
     848if( (core_lid ==  0) & (local_cxy == 0) )
    849849printk("\n[DBG] %s : exit barrier 1 : clusters initialised / cycle %d\n",
    850850__FUNCTION__, (uint32_t)hal_get_cycles() );
     
    872872    ////////////////////////////////////////////////////////////////////////////////
    873873
    874 #if CONFIG_DEBUG_KERNEL_INIT
    875 if( (core_lid ==  0) && (local_cxy == 0) )
     874#if DEBUG_KERNEL_INIT
     875if( (core_lid ==  0) & (local_cxy == 0) )
    876876printk("\n[DBG] %s : exit barrier 2 : PIC initialised / cycle %d\n",
    877877__FUNCTION__, (uint32_t)hal_get_cycles() );
     
    905905    /////////////////////////////////////////////////////////////////////////////////
    906906
    907 #if CONFIG_DEBUG_KERNEL_INIT
    908 if( (core_lid ==  0) && (local_cxy == 0) )
     907#if DEBUG_KERNEL_INIT
     908if( (core_lid ==  0) & (local_cxy == 0) )
    909909printk("\n[DBG] %s : exit barrier 3 : all chdev initialised / cycle %d\n",
    910910__FUNCTION__, (uint32_t)hal_get_cycles() );
    911911#endif
    912912
    913 #if( CONFIG_DEBUG_KERNEL_INIT & 1 )
     913#if( DEBUG_KERNEL_INIT & 1 )
    914914chdev_dir_display();
    915915#endif
     
    927927
    928928    // all cores initialize the idle thread descriptor
    929     error = thread_kernel_init( thread,
    930                                 THREAD_IDLE,
    931                                 &thread_idle_func,
    932                                 NULL,
    933                                 core_lid );
     929    error = thread_idle_init( thread,
     930                              THREAD_IDLE,
     931                              &thread_idle_func,
     932                              NULL,
     933                              core_lid );
    934934    if( error )
    935935    {
     
    942942    core->scheduler.idle = thread;
    943943
    944 #if( CONFIG_DEBUG_KERNEL_INIT & 1 )
     944#if( DEBUG_KERNEL_INIT & 1 )
    945945sched_display( core_lid );
    946946#endif
     
    10141014    /////////////////////////////////////////////////////////////////////////////////
    10151015
    1016 #if CONFIG_DEBUG_KERNEL_INIT
    1017 if( (core_lid ==  0) && (local_cxy == 0) )
     1016#if DEBUG_KERNEL_INIT
     1017if( (core_lid ==  0) & (local_cxy == 0) )
    10181018printk("\n[DBG] %s : exit barrier 4 : VFS_root = %l in cluster 0 / cycle %d\n",
    10191019__FUNCTION__, vfs_root_inode_xp , (uint32_t)hal_get_cycles());
     
    10751075    /////////////////////////////////////////////////////////////////////////////////
    10761076
    1077 #if CONFIG_DEBUG_KERNEL_INIT
    1078 if( (core_lid ==  0) && (local_cxy == io_cxy) )
     1077#if DEBUG_KERNEL_INIT
     1078if( (core_lid ==  0) & (local_cxy == 0) )
    10791079printk("\n[DBG] %s : exit barrier 5 : VFS_root = %l in cluster %x / cycle %d\n",
    10801080__FUNCTION__, vfs_root_inode_xp , io_cxy , (uint32_t)hal_get_cycles());
     
    11101110    /////////////////////////////////////////////////////////////////////////////////
    11111111
    1112 #if CONFIG_DEBUG_KERNEL_INIT
    1113 if( (core_lid ==  0) && (local_cxy == io_cxy) )
     1112#if DEBUG_KERNEL_INIT
     1113if( (core_lid ==  0) & (local_cxy == 0) )
    11141114printk("\n[DBG] %s : exit barrier 6 : dev_root = %l in cluster %x / cycle %d\n",
    11151115__FUNCTION__, devfs_dev_inode_xp , io_cxy , (uint32_t)hal_get_cycles() );
     
    11491149    /////////////////////////////////////////////////////////////////////////////////
    11501150
    1151 #if CONFIG_DEBUG_KERNEL_INIT
    1152 if( (core_lid ==  0) && (local_cxy == 0) )
     1151#if DEBUG_KERNEL_INIT
     1152if( (core_lid ==  0) & (local_cxy == 0) )
    11531153printk("\n[DBG] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n",
    11541154__FUNCTION__, devfs_dev_inode_xp , (uint32_t)hal_get_cycles() );
     
    11621162    {
    11631163
    1164 #if( CONFIG_DEBUG_KERNEL_INIT & 1 )
     1164#if( DEBUG_KERNEL_INIT & 1 )
    11651165vfs_display( vfs_root_inode_xp );
    11661166#endif
     
    11751175    /////////////////////////////////////////////////////////////////////////////////
    11761176
    1177 #if CONFIG_DEBUG_KERNEL_INIT
    1178 if( (core_lid ==  0) && (local_cxy == 0) )
     1177#if DEBUG_KERNEL_INIT
     1178if( (core_lid ==  0) & (local_cxy == 0) )
    11791179printk("\n[DBG] %s : exit barrier 8 : process init created / cycle %d\n",
    11801180__FUNCTION__ , (uint32_t)hal_get_cycles() );
     
    11891189        print_banner( (info->x_size * info->y_size) , info->cores_nr );
    11901190
    1191 #if( CONFIG_DEBUG_KERNEL_INIT & 1 )
     1191#if( DEBUG_KERNEL_INIT & 1 )
    11921192printk("\n\n***** memory fooprint for main kernel objects\n\n"
    11931193                   " - thread descriptor  : %d bytes\n"
Note: See TracChangeset for help on using the changeset viewer.