Changeset 337 for trunk/kernel/kern


Ignore:
Timestamp:
Aug 7, 2017, 12:50:17 PM (5 years ago)
Author:
alain
Message:

Introduce the delayed context switch if current thread has a lock.

Location:
trunk/kernel/kern
Files:
9 edited

Legend:

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

    r296 r337  
    117117        if( (ticks % 10) == 0 ) sched_yield( NULL );
    118118
     119/*
     120    // compute elapsed time, taking into account 32 bits register wrap
     121    uint32_t elapsed;
     122    uint32_t time_now   = hal_get_cycles();
     123    uint32_t time_last  = this->time_last_check;
     124    if( time_now < time_last ) elapsed = (0xFFFFFFFF - time_last) + time_now;
     125        else                       elapsed = time_now - time_last;
     126
     127    // update thread time
     128    this->time_last_check = time_now;
     129
     130        // check elapsed time
     131        if( elapsed < CONFIG_CORE_CHECK_EVERY ) return false;
     132    else                                    return true;
     133*/
     134
    119135        // update DQDT TODO  This update should depend on the cluster identifier,
    120136        // to avoid simultaneous updates from various clusters ... AG
  • trunk/kernel/kern/kernel_init.c

    r317 r337  
    205205                }
    206206            }
    207 
    208                     kinit_dmsg("\n[INFO] %s created TXT0 chdev in cluster %x at cycle %d\n",
    209                        __FUNCTION__ , local_cxy , (uint32_t)hal_time_stamp() );
    210207        }
    211208        } // end loop on devices
     
    276273            }
    277274
    278             kinit_dmsg("\n[INFO] %s created MMC in cluster %x / chdev = %x\n",
     275            kinit_dmsg("\n[INFO] %s : created MMC in cluster %x / chdev = %x\n",
    279276                       __FUNCTION__ , channel , local_cxy , chdev_ptr );
    280277        }
     
    302299                chdev_dir.dma[channel] = XPTR( local_cxy , chdev_ptr );
    303300
    304                 kinit_dmsg("\n[INFO] %s created DMA[%d] in cluster %x / chdev = %x\n",
     301                kinit_dmsg("\n[INFO] %s : created DMA[%d] in cluster %x / chdev = %x\n",
    305302                           __FUNCTION__ , channel , local_cxy , chdev_ptr );
    306303            }
     
    434431                    }
    435432
    436                             kinit_dmsg("\n[INFO] %s create chdev %s[%d] in cluster %x / chdev = %x\n",
     433                            kinit_dmsg("\n[INFO] %s : create chdev %s[%d] in cluster %x / chdev = %x\n",
    437434                    __FUNCTION__ , chdev_func_str( func ), channel , local_cxy , chdev );
    438435
     
    10221019    //          Each CP0 get the "dev" and "external" extended pointers from
    10231020    //          values stored in cluster IO.
    1024     //          Then CP0 in cluster(i) creates the DEVFS "internal directory,
     1021    //          Then each CP0 in cluster(i) creates the DEVFS "internal directory,
    10251022    //          and creates the pseudo-files for all chdevs in cluster (i).
    10261023    /////////////////////////////////////////////////////////////////////////////////
     
    10541051    kinit_dmsg("\n[INFO] %s : exit barrier 7 : dev_root = %l in cluster 0 / cycle %d\n",
    10551052    __FUNCTION__, devfs_dev_inode_xp , hal_time_stamp() );
    1056 
    1057     #if CONFIG_KINIT_DEBUG
    1058     vfs_display( vfs_root_inode_xp );
    1059     #endif
    10601053
    10611054    /////////////////////////////////////////////////////////////////////////////////
  • trunk/kernel/kern/printk.c

    r296 r337  
    217217
    218218//////////////////////////////////////////////////////////////////////////////////////
    219 // This static function is called by printk() and user_printk() to build
     219// This static function is called by printk(), assert() and nolock_printk() to build
    220220// a formated string.
    221221//////////////////////////////////////////////////////////////////////////////////////
     
    375375}  // end kernel_printf()
    376376
    377 /////////////////////////////////
    378 void printk( char * format , ...)
     377//////////////////////////////////
     378void printk( char * format , ... )
    379379{
    380380    va_list       args;
     
    401401}
    402402
    403 ////////////////////////////////////////
    404 void nolock_printk( char * format , ...)
     403/////////////////////////////////////////
     404void nolock_printk( char * format , ... )
    405405{
    406406    va_list       args;
     
    412412}
    413413
    414 ///////////////////////////////////////////
    415 inline void assert( bool_t       condition,
    416                     const char * function_name,
    417                     char       * string )
    418 {
     414////////////////////////////////////
     415void assert( bool_t       condition,
     416             const char * function_name,
     417             char       * format, ... )
     418{
     419    va_list       args;
     420    uint32_t      save_sr;
     421
    419422    if( condition == false )
    420423    {
    421         printk("\n[PANIC] in %s : %s\n" , function_name , string );
     424        // get pointers on TXT0 chdev
     425        xptr_t    txt0_xp  = chdev_dir.txt[0];
     426        cxy_t     txt0_cxy = GET_CXY( txt0_xp );
     427        chdev_t * txt0_ptr = GET_PTR( txt0_xp );
     428
     429        // get extended pointer on remote TXT0 chdev lock
     430        xptr_t  lock_xp = XPTR( txt0_cxy , &txt0_ptr->wait_lock );
     431
     432        // get TXT0 lock in busy waiting mode
     433        remote_spinlock_lock_busy( lock_xp , &save_sr );
     434
     435        // call nolock_printk to print function_name
     436        nolock_printk("\n[PANIC] in %s : " , function_name );
     437
     438        // call kernel_printf on TXT0, in busy waiting to print format
     439        va_start( args , format );
     440        kernel_printf( 0 , 1 , format , &args );
     441        va_end( args );
     442
     443        // release TXT0 lock
     444        remote_spinlock_unlock_busy( lock_xp , save_sr );
     445
     446        // suicide
    422447        hal_core_sleep();
    423448    }
  • trunk/kernel/kern/printk.h

    r296 r337  
    8989 * @ condition     : condition that must be true.
    9090 * @ function_name : name of the calling function.
    91  * @ string        : error message if condition is false.
     91 * @ format        : formated string
    9292 *********************************************************************************/
    93 inline void assert( bool_t       condition,
    94                     const char * function_name,
    95                     char       * string );
     93void assert( bool_t       condition,
     94             const char * function_name,
     95             char       * format , ... );
    9696
    9797///////////////////////////////////////////////////////////////////////////////////
     
    255255#endif
    256256
     257#if CONFIG_RPCG_DEBUG
     258#define rpcg_dmsg(...)   printk(__VA_ARGS__)
     259#else
     260#define rpcg_dmsg(...)
     261#endif
     262
    257263#if CONFIG_SCHED_DEBUG
    258264#define sched_dmsg(...)   printk(__VA_ARGS__)
     
    286292
    287293#if CONFIG_VFS_DEBUG
    288 #define vfs_dmsg(...)   printk(__VA_ARGS__)
     294#define vfs_dmsg(...)   if(hal_time_stamp() > CONFIG_VFS_DEBUG) printk(__VA_ARGS__)
    289295#else
    290296#define vfs_dmsg(...)
  • trunk/kernel/kern/process.c

    r326 r337  
    282282
    283283    // Decrease refcount for bin file, root file and cwd file
    284         vfs_file_count_down( process->vfs_bin_xp );
    285     vfs_file_count_down( process->vfs_root_xp );
    286     vfs_file_count_down( process->vfs_cwd_xp );
     284        if( process->vfs_bin_xp  != XPTR_NULL ) vfs_file_count_down( process->vfs_bin_xp );
     285        if( process->vfs_root_xp != XPTR_NULL ) vfs_file_count_down( process->vfs_root_xp );
     286        if( process->vfs_cwd_xp  != XPTR_NULL ) vfs_file_count_down( process->vfs_cwd_xp );
    287287
    288288    // Destroy VMM
  • trunk/kernel/kern/rpc.c

    r315 r337  
    9898                                page_t  ** page )      // out
    9999{
    100     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     100    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     101    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     102    CURRENT_THREAD->core->lid , hal_time_stamp() );
    101103
    102104    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    116118    *page    = (page_t *)(intptr_t)rpc.args[1];
    117119
    118     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     120    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     121    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     122    CURRENT_THREAD->core->lid , hal_time_stamp() );
    119123}
    120124
     
    122126void rpc_pmem_get_pages_server( xptr_t xp )
    123127{
    124     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     128    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     129    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     130    CURRENT_THREAD->core->lid , hal_time_stamp() );
    125131
    126132    // get client cluster identifier and pointer on RPC descriptor
     
    137143    hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
    138144
    139     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     145    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     146    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     147    CURRENT_THREAD->core->lid , hal_time_stamp() );
    140148}
    141149
     
    150158                                   pid_t     * pid )     // out
    151159{
    152     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     160    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     161    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     162    CURRENT_THREAD->core->lid , hal_time_stamp() );
    153163
    154164    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    169179    *error  = (error_t)rpc.args[2];     
    170180
    171     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     181    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     182    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     183    CURRENT_THREAD->core->lid , hal_time_stamp() );
    172184}
    173185
     
    179191    pid_t       pid;       // output : process identifier
    180192
    181     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     193    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     194    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     195    CURRENT_THREAD->core->lid , hal_time_stamp() );
    182196
    183197    // get client cluster identifier and pointer on RPC descriptor
     
    196210    hal_remote_sw( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)pid );
    197211
    198     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     212    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     213    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     214    CURRENT_THREAD->core->lid , hal_time_stamp() );
    199215}
    200216
     
    209225                              error_t     * error )   // out
    210226{
    211     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     227    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     228    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     229    CURRENT_THREAD->core->lid , hal_time_stamp() );
    212230
    213231    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    227245    *error  = (error_t)rpc.args[1];     
    228246
    229     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     247    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     248    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     249    CURRENT_THREAD->core->lid , hal_time_stamp() );
    230250}
    231251
     
    237257    error_t       error;     // local error error status
    238258
    239     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     259    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     260    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     261    CURRENT_THREAD->core->lid , hal_time_stamp() );
    240262
    241263    // get client cluster identifier and pointer on RPC descriptor
     
    257279    hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
    258280
    259     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     281    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     282    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     283    CURRENT_THREAD->core->lid , hal_time_stamp() );
    260284}
    261285
     
    268292void rpc_process_kill_client( process_t * process )
    269293{
    270     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     294    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     295    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     296    CURRENT_THREAD->core->lid , hal_time_stamp() );
    271297
    272298    // only reference cluster can send this RPC
     
    300326    }
    301327
    302     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     328    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     329    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     330    CURRENT_THREAD->core->lid , hal_time_stamp() );
    303331
    304332
     
    309337    process_t * process; 
    310338
    311     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     339    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     340    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     341    CURRENT_THREAD->core->lid , hal_time_stamp() );
    312342
    313343    // get client cluster identifier and pointer on RPC descriptor
     
    331361    }
    332362
    333     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     363    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     364    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     365    CURRENT_THREAD->core->lid , hal_time_stamp() );
    334366}
    335367
     
    348380                                    error_t        * error )      // out
    349381{
    350     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     382    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     383    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     384    CURRENT_THREAD->core->lid , hal_time_stamp() );
    351385
    352386    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    370404    *error     = (error_t)rpc.args[5];
    371405
    372     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     406    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     407    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     408    CURRENT_THREAD->core->lid , hal_time_stamp() );
    373409}
    374410
     
    386422    error_t          error;
    387423
    388     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     424    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     425    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     426    CURRENT_THREAD->core->lid , hal_time_stamp() );
    389427
    390428    // get client cluster identifier and pointer on RPC descriptor
     
    419457    hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp );
    420458
    421     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     459    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     460    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     461    CURRENT_THREAD->core->lid , hal_time_stamp() );
    422462}
    423463
     
    434474                                      error_t * error )      // out
    435475{
    436     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     476    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     477    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     478    CURRENT_THREAD->core->lid , hal_time_stamp() );
    437479
    438480    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    455497    *error     = (error_t)rpc.args[4];
    456498
    457     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     499    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     500    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     501    CURRENT_THREAD->core->lid , hal_time_stamp() );
    458502}
    459503
     
    466510    error_t          error;   
    467511
    468     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     512    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     513    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     514    CURRENT_THREAD->core->lid , hal_time_stamp() );
    469515
    470516    // get client cluster identifier and pointer on RPC descriptor
     
    488534    hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)thread_xp );
    489535
    490     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     536    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     537    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     538    CURRENT_THREAD->core->lid , hal_time_stamp() );
    491539}
    492540
     
    500548                             uint32_t    sig_id )    // in
    501549{
    502     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     550    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     551    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     552    CURRENT_THREAD->core->lid , hal_time_stamp() );
    503553
    504554    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    516566    rpc_send_sync( cxy , &rpc );
    517567
    518     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     568    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     569    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     570    CURRENT_THREAD->core->lid , hal_time_stamp() );
    519571}
    520572
     
    525577    uint32_t     sig_id;   // signal index
    526578
    527     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     579    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     580    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     581    CURRENT_THREAD->core->lid , hal_time_stamp() );
    528582
    529583    // get client cluster identifier and pointer on RPC descriptor
     
    538592    signal_rise( process , sig_id );
    539593
    540     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     594    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     595    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     596    CURRENT_THREAD->core->lid , hal_time_stamp() );
    541597}
    542598
     
    558614                                  error_t      * error )     // out
    559615{
    560     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     616    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     617    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     618    CURRENT_THREAD->core->lid , hal_time_stamp() );
    561619
    562620    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    584642    *error    = (error_t)rpc.args[9];
    585643
    586     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     644    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     645    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     646    CURRENT_THREAD->core->lid , hal_time_stamp() );
    587647}
    588648
     
    601661    error_t          error;
    602662
    603     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     663    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     664    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     665    CURRENT_THREAD->core->lid , hal_time_stamp() );
    604666
    605667    // get client cluster identifier and pointer on RPC descriptor
     
    632694    hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error );
    633695
    634     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     696    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     697    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     698    CURRENT_THREAD->core->lid , hal_time_stamp() );
    635699}
    636700
     
    643707                                   struct vfs_inode_s * inode )
    644708{
    645     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     709    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     710    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     711    CURRENT_THREAD->core->lid , hal_time_stamp() );
    646712
    647713    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    658724    rpc_send_sync( cxy , &rpc );
    659725
    660     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     726    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     727    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     728    CURRENT_THREAD->core->lid , hal_time_stamp() );
    661729}
    662730
     
    666734    vfs_inode_t * inode;
    667735
    668     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     736    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     737    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     738    CURRENT_THREAD->core->lid , hal_time_stamp() );
    669739
    670740    // get client cluster identifier and pointer on RPC descriptor
     
    678748    vfs_inode_destroy( inode );
    679749
    680     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     750    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     751    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     752    CURRENT_THREAD->core->lid , hal_time_stamp() );
    681753}
    682754
     
    693765                                   error_t              * error )       // out
    694766{
    695     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     767    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     768    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     769    CURRENT_THREAD->core->lid , hal_time_stamp() );
    696770
    697771    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    714788    *error     = (error_t)rpc.args[4];
    715789
    716     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     790    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     791    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     792    CURRENT_THREAD->core->lid , hal_time_stamp() );
    717793}
    718794
     
    728804    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
    729805
    730     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     806    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     807    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     808    CURRENT_THREAD->core->lid , hal_time_stamp() );
    731809
    732810    // get client cluster identifier and pointer on RPC descriptor
     
    752830    hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
    753831
    754     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     832    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     833    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     834    CURRENT_THREAD->core->lid , hal_time_stamp() );
    755835}
    756836
     
    764844                                    vfs_dentry_t * dentry )
    765845{
    766     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     846    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     847    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     848    CURRENT_THREAD->core->lid , hal_time_stamp() );
    767849
    768850    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    779861    rpc_send_sync( cxy , &rpc );
    780862
    781     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     863    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     864    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     865    CURRENT_THREAD->core->lid , hal_time_stamp() );
    782866}
    783867
     
    787871    vfs_dentry_t * dentry;
    788872
    789     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     873    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     874    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     875    CURRENT_THREAD->core->lid , hal_time_stamp() );
    790876
    791877    // get client cluster identifier and pointer on RPC descriptor
     
    799885    vfs_dentry_destroy( dentry );
    800886
    801     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     887    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     888    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     889    CURRENT_THREAD->core->lid , hal_time_stamp() );
    802890}
    803891
     
    814902                                 error_t              * error )      // out
    815903{
    816     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     904    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     905    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     906    CURRENT_THREAD->core->lid , hal_time_stamp() );
    817907
    818908    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    834924    *error   = (error_t)rpc.args[3];
    835925
    836     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     926    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     927    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     928    CURRENT_THREAD->core->lid , hal_time_stamp() );
    837929}
    838930
     
    845937    error_t       error;
    846938
    847     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     939    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     940    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     941    CURRENT_THREAD->core->lid , hal_time_stamp() );
    848942
    849943    // get client cluster identifier and pointer on RPC descriptor
     
    864958    hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
    865959
    866     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     960    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     961    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     962    CURRENT_THREAD->core->lid , hal_time_stamp() );
    867963}
    868964
     
    875971                                  vfs_file_t * file )
    876972{
    877     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     973    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     974    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     975    CURRENT_THREAD->core->lid , hal_time_stamp() );
    878976
    879977    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    890988    rpc_send_sync( cxy , &rpc );
    891989
    892     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     990    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     991    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     992    CURRENT_THREAD->core->lid , hal_time_stamp() );
    893993}
    894994
     
    898998    vfs_file_t * file;
    899999
    900     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1000    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1001    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1002    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9011003
    9021004    // get client cluster identifier and pointer on RPC descriptor
     
    9101012    vfs_file_destroy( file );
    9111013
    912     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1014    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1015    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1016    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9131017}
    9141018
     
    9241028                                error_t     * error )          // out
    9251029{
    926     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1030    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1031    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1032    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9271033
    9281034    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    9441050    *error   = (error_t)rpc.args[3];
    9451051
    946     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1052    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1053    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1054    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9471055}
    9481056
     
    9571065    char          name_copy[CONFIG_VFS_MAX_NAME_LENGTH];
    9581066
    959     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1067    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1068    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1069    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9601070
    9611071    // get client cluster identifier and pointer on RPC descriptor
     
    9781088    hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
    9791089
    980     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1090    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1091    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1092    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9811093}
    9821094
     
    9901102                                     error_t     * error )     // out
    9911103{
    992     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1104    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1105    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1106    CURRENT_THREAD->core->lid , hal_time_stamp() );
    9931107
    9941108    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    10081122    *error   = (error_t)rpc.args[1];
    10091123
    1010     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1124    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1125    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1126    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10111127}
    10121128
     
    10171133    vfs_inode_t * inode;
    10181134
    1019     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1135    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1136    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1137    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10201138
    10211139    // get client cluster identifier and pointer on RPC descriptor
     
    10321150    hal_remote_swd( XPTR( client_cxy , &desc->args[3] ) , (uint64_t)error );
    10331151
    1034     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1152    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1153    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1154    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10351155}
    10361156
     
    10471167                                   error_t  * error )    // out
    10481168{
    1049     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1169    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1170    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1171    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10501172
    10511173    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    10681190    *error   = (error_t)rpc.args[4];
    10691191
    1070     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1192    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1193    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1194    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10711195}
    10721196
     
    10801204    error_t       error;
    10811205
    1082     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1206    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1207    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1208    CURRENT_THREAD->core->lid , hal_time_stamp() );
    10831209
    10841210    // get client cluster identifier and pointer on RPC descriptor
     
    10981224    hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
    10991225
    1100     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1226    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1227    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1228    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11011229}
    11021230
     
    11111239                                  xptr_t    * vseg_xp )    // out
    11121240{
    1113     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1241    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1242    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1243    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11141244
    11151245    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    11301260    *vseg_xp = rpc.args[2];
    11311261
    1132     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1262    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1263    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1264    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11331265}
    11341266
     
    11411273    xptr_t        vseg_xp;
    11421274
    1143     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1275    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1276    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1277    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11441278
    11451279    // get client cluster identifier and pointer on RPC descriptor
     
    11591293    hal_remote_swd( XPTR( client_cxy , &desc->args[2] ) , (uint64_t)vseg_xp );
    11601294
    1161     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1295    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1296    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1297    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11621298}
    11631299
     
    11751311                             error_t   * error )   // out
    11761312{
    1177     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1313    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1314    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1315    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11781316
    11791317    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    11961334    *error = (error_t)rpc.args[4];
    11971335
    1198     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1336    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1337    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1338    CURRENT_THREAD->core->lid , hal_time_stamp() );
    11991339}
    12001340
     
    12081348    error_t       error;
    12091349
    1210     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1350    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1351    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1352    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12111353
    12121354    // get client cluster identifier and pointer on RPC descriptor
     
    12261368    hal_remote_swd( XPTR( client_cxy , &desc->args[4] ) , (uint64_t)error );
    12271369
    1228     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1370    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1371    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1372    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12291373}
    12301374
     
    12381382                           xptr_t *   buf_xp )     // out
    12391383{
    1240     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1384    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1385    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1386    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12411387
    12421388    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    12561402    *buf_xp = (xptr_t)rpc.args[1];
    12571403
    1258     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1404    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1405    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1406    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12591407}
    12601408
     
    12621410void rpc_kcm_alloc_server( xptr_t xp )
    12631411{
    1264     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1412    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1413    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1414    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12651415
    12661416    // get client cluster identifier and pointer on RPC descriptor
     
    12811431    hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)buf_xp );
    12821432
    1283     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1433    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1434    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1435    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12841436}   
    12851437
     
    12931445                          uint32_t   kmem_type )   // in
    12941446{
    1295     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1447    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1448    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1449    CURRENT_THREAD->core->lid , hal_time_stamp() );
    12961450
    12971451    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    13091463    rpc_send_sync( cxy , &rpc );
    13101464
    1311     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1465    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1466    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1467    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13121468}
    13131469
     
    13151471void rpc_kcm_free_server( xptr_t xp )
    13161472{
    1317     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1473    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1474    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1475    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13181476
    13191477    // get client cluster identifier and pointer on RPC descriptor
     
    13311489    kmem_free( &req );
    13321490
    1333     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1491    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1492    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1493    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13341494}   
    13351495
     
    13481508                                    error_t  * error )        // out
    13491509{
    1350     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1510    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1511    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1512    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13511513
    13521514    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    13711533    *error     = (error_t)rpc.args[6];
    13721534
    1373     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1535    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1536    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1537    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13741538}
    13751539
     
    13861550    error_t    error;
    13871551
    1388     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1552    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1553    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1554    CURRENT_THREAD->core->lid , hal_time_stamp() );
    13891555
    13901556    // get client cluster identifier and pointer on RPC descriptor
     
    14241590    hal_remote_swd( XPTR( client_cxy , &desc->args[6] ) , (uint64_t)error );
    14251591
    1426     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1592    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1593    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1594    CURRENT_THREAD->core->lid , hal_time_stamp() );
    14271595}
    14281596
     
    14371605                                 page_t         ** page )      // out
    14381606{
    1439     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1607    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1608    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1609    CURRENT_THREAD->core->lid , hal_time_stamp() );
    14401610
    14411611    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
     
    14561626    *page = (page_t *)(intptr_t)rpc.args[2];
    14571627
    1458     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1628    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1629    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1630    CURRENT_THREAD->core->lid , hal_time_stamp() );
    14591631}
    14601632
     
    14621634void rpc_mapper_get_page_server( xptr_t xp )
    14631635{
    1464     rpc_dmsg("\n[INFO] %s : enter at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1636    rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1637    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1638    CURRENT_THREAD->core->lid , hal_time_stamp() );
    14651639
    14661640    // get client cluster identifier and pointer on RPC descriptor
     
    14781652    hal_remote_swd( XPTR( cxy , &desc->args[1] ) , (uint64_t)(intptr_t)page );
    14791653
    1480     rpc_dmsg("\n[INFO] %s : completed at cycle %d\n", __FUNCTION__ , hal_time_stamp() );
     1654    rpc_dmsg("\n[INFO] %s : exit / thread %x on core[%x,%d] / cycle %d\n",
     1655    __FUNCTION__ , CURRENT_THREAD->trdid , local_cxy,
     1656    CURRENT_THREAD->core->lid , hal_time_stamp() );
    14811657}
    14821658
     
    14951671    reg_t      sr_save;
    14961672
    1497     thread_t * this = CURRENT_THREAD;
    1498 
    1499     rpc_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n",
     1673    rpcg_dmsg("\n[INFO] %s : enter / client_cxy = %x / server_cxy = %x / cycle %d\n",
    15001674    __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() );
    15011675
     
    15141688                                      (uint64_t )desc_xp,
    15151689                                      &first );
    1516 
    15171690            if ( error )
    15181691        {
     
    15251698    while( error );
    15261699 
    1527     rpc_dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n",
     1700    rpcg_dmsg("\n[INFO] %s : RPC %l registered / server_cxy = %x / cycle %d\n",
    15281701    __FUNCTION__ , desc_xp , server_cxy , hal_time_stamp() );
    15291702       
     
    15391712                    dev_pic_send_ipi( server_cxy , 0 );
    15401713
    1541                     rpc_dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n",
     1714                    rpcg_dmsg("\n[INFO] %s : IPI sent / client_cxy = %x / server_cxy = %x\n",
    15421715            __FUNCTION__, local_cxy , server_cxy );
    15431716        }
     
    15451718
    15461719        // enable IRQs to allow incoming RPC and avoid deadlock
    1547         if( this->type == THREAD_RPC ) hal_enable_irq( &sr_save );
     1720        hal_enable_irq( &sr_save );
    15481721
    15491722    // the server thread poll the response slot until RPC completed
    15501723    // TODO this could be replaced by a descheduling policy... [AG]
    1551         while( 1 )
    1552     {
    1553         if( rpc->response == 0 ) break;
    1554     }
     1724    while( rpc->response ) asm volatile( "nop" );
    15551725
    15561726    // restore IRQs
    1557         if( this->type == THREAD_RPC ) hal_restore_irq( sr_save );
    1558 
    1559     rpc_dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n",
     1727        hal_restore_irq( sr_save );
     1728
     1729    rpcg_dmsg("\n[INFO] %s : completed / client_cxy = %x / server_cxy = %x / cycle %d\n",
    15601730    __FUNCTION__ , local_cxy , server_cxy , hal_time_stamp() );
    15611731
     
    15921762        count = 0;
    15931763
    1594     rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / fifo = %x / cycle %d\n",
     1764    rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
    15951765    __FUNCTION__, this->trdid, local_cxy, core->lid , hal_time_stamp() );
    15961766 
     
    16091779                index = hal_remote_lw( XPTR( client_cxy , &desc->index ) );
    16101780
    1611             rpc_dmsg("\n[INFO] %s : thread %x on core [%x,%d] / index = %d / &rpc = %x\n",
    1612                      __FUNCTION__ , this->trdid , core->lid , local_cxy , index , rpc_server[index] );
     1781            rpcg_dmsg("\n[INFO] %s : thread %x on core [%x,%d] / rpc = %d\n",
     1782                     __FUNCTION__ , this->trdid , core->lid , local_cxy , index );
    16131783
    16141784            // call the relevant server function
     
    16191789
    16201790            // notify RPC completion as required
    1621             hal_remote_atomic_add( XPTR(client_cxy,&desc->response) , -1 );
     1791            hal_remote_atomic_add( XPTR( client_cxy , &desc->response ) , -1 );
    16221792                }
    16231793       
     
    16781848        thread->blocked = 0;
    16791849
    1680         rpc_dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n",
     1850        rpcg_dmsg("\n[INFO] %s : activate RPC thread %x on core [%x,%d] / cycle %d\n",
    16811851                          __FUNCTION__ , thread , core->gid , local_cxy , hal_time_stamp() );
    16821852    }
     
    17031873            hal_atomic_add( &LOCAL_CLUSTER->rpc_threads , 1 );
    17041874
    1705         rpc_dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n",
     1875        rpcg_dmsg("\n[INFO] %s : create RPC thread %x on core [%x,%d] / cycle %d\n",
    17061876                          __FUNCTION__ , thread->trdid, local_cxy, core->lid, hal_time_stamp() );
    17071877    }
     
    17281898    error_t      error;
    17291899
    1730     rpc_dmsg("\n[INFO] %s : enter in cluster %x\n",
    1731              __FUNCTION__ , local_cxy );
     1900    rpcg_dmsg("\n[INFO] %s : enter / thread %x / cluster %x / cycle %d\n",
     1901             __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
    17321902
    17331903    // calling thread does nothing if light lock already taken or FIFO empty 
    17341904        if( (rpc_fifo->owner != 0) || (local_fifo_is_empty( &rpc_fifo->fifo )) )
    17351905    {
    1736         rpc_dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",
    1737                  __FUNCTION__ , local_cxy );
     1906        rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n",
     1907                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
    17381908
    17391909        return false;
     
    17541924        }
    17551925
    1756         rpc_dmsg("\n[INFO] %s : exit after activating an RPC thread in cluster %x\n",
    1757                  __FUNCTION__ , local_cxy );
     1926        rpcg_dmsg("\n[INFO] %s : exit after RPC thread activation / "
     1927                 "thread %x / cluster %x / cycle %d\n",
     1928                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
    17581929
    17591930        return true;
     
    17611932    else  // light lock taken by another thread
    17621933    {
    1763         rpc_dmsg("\n[INFO] %s : exit but do nothing in cluster %x\n",
    1764                  __FUNCTION__ , local_cxy );
     1934        rpcg_dmsg("\n[INFO] %s : exit do nothing / thread %x / cluster %x / cycle %d\n",
     1935                 __FUNCTION__ , this->trdid , local_cxy , hal_time_stamp() );
    17651936
    17661937        return false;
     
    17781949        rpc_fifo_t * rpc_fifo = &LOCAL_CLUSTER->rpc_fifo;
    17791950
    1780     rpc_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
     1951    rpcg_dmsg("\n[INFO] %s : enter / thread %x on core[%x,%d] / cycle %d\n",
    17811952             __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
    17821953
     
    18031974                if( LOCAL_CLUSTER->rpc_threads >= CONFIG_RPC_THREADS_MAX )
    18041975                {
    1805             rpc_dmsg("\n[INFO] thread %x on core[%x,%d] suicide / cycle %d\n",
     1976            rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] suicide / cycle %d\n",
    18061977                    __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
    18071978
     
    18141985        else
    18151986        {
    1816             rpc_dmsg("\n[INFO] %s : thread %x on core[%x,%d] blocks / cycle %d\n",
     1987            rpcg_dmsg("\n[INFO] %s : RPC thread %x on core[%x,%d] blocks / cycle %d\n",
    18171988                        __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
    18181989
     
    18201991            sched_yield( NULL );
    18211992
    1822                     rpc_dmsg("\n[INFO] RPC thread %x wake up on core[%x,%d] / cycle %d\n",
     1993                    rpcg_dmsg("\n[INFO] %s : RPC thread %x wake up on core[%x,%d] / cycle %d\n",
    18231994                __FUNCTION__, this->trdid, local_cxy, this->core->lid, hal_time_stamp() );
    18241995        }
  • trunk/kernel/kern/scheduler.c

    r317 r337  
    283283    __FUNCTION__, current->trdid, local_cxy, core->lid, hal_time_stamp() );
    284284
    285     // check calling thread released all locks
    286     assert( (thread_can_yield() == true), __FUNCTION__, "locks not released\n");
     285    // delay the yield if current thread has locks
     286    if( thread_can_yield() == false )
     287    {
     288        current->flags |= THREAD_FLAG_SCHED;
     289        return;
     290    }
    287291
    288292    // first loop on all threads to handle pending signals
     
    325329        // restore IRQs when calling thread resume
    326330        hal_restore_irq( sr_save );
    327 
    328         sched_dmsg("\n[INFO] %s : thread %x on core[%x,%d] / cycle %d\n",
    329         __FUNCTION__, current->trdid, local_cxy, core->lid, hal_time_stamp() );
    330331    }
    331332    else
  • trunk/kernel/kern/thread.c

    r315 r337  
    760760{
    761761    // TODO
    762     printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
     762    // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
    763763}
    764764
     
    767767{
    768768    // TODO
    769     printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
     769    // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
    770770}
    771771
     
    774774{
    775775    // TODO
    776     printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
     776    // printk("\n[WARNING] function %s not implemented\n", __FUNCTION__ );
    777777}
    778778
  • trunk/kernel/kern/thread.h

    r279 r337  
    100100#define THREAD_FLAG_JOIN         0x0004  /*! Parent thread made a join                */
    101101#define THREAD_FLAG_EXIT         0x0008  /*! This thread made an exit                 */
     102#define THREAD_FLAG_SCHED        0x0010  /*! Descheduling required for this thread    */
    102103
    103104/***************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.