Changeset 593


Ignore:
Timestamp:
Nov 10, 2018, 2:16:38 PM (6 years ago)
Author:
alain
Message:

Cosmetic: improve debug.

Location:
trunk/kernel/kern
Files:
6 edited

Legend:

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

    r583 r593  
    174174uint32_t rx_cycle = (uint32_t)hal_get_cycles();
    175175if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    176 printk("\n[DBG] %s : client_thread %x (%s) enter for RX / server = %x / cycle %d\n",
    177 __FUNCTION__, this, thread_type_str(this->type) , server_ptr, rx_cycle );
     176printk("\n[%s] client[%x,%x] enter for RX / server[%x,%x] / cycle %d\n",
     177__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, rx_cycle );
    178178#endif
    179179
     
    181181uint32_t tx_cycle = (uint32_t)hal_get_cycles();
    182182if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    183 printk("\n[DBG] %s : client_thread %x (%s) enter for TX / server = %x / cycle %d\n",
    184 __FUNCTION__, this, thread_type_str(this->type) , server_ptr, tx_cycle );
     183printk("\n[%s] client[%x,%x] enter for TX / server[%x,%x] / cycle %d\n",
     184__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid, tx_cycle );
    185185#endif
    186186
     
    222222#if (DEBUG_CHDEV_CMD_TX & 1)
    223223if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    224 printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this );
     224printk("\n[%s] client thread[%x,%x] blocked\n",
     225__FUNCTION__, this->process_pid, this->trdid );
    225226#endif
    226227
    227228#if (DEBUG_CHDEV_CMD_RX & 1)
    228229if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    229 printk("\n[DBG] in %s : client thread %x blocked\n", __FUNCTION__, this );
     230printk("\n[%s] client thread[%x,%x] blocked\n",
     231__FUNCTION__, this->process_pid, this->trdid );
    230232#endif
    231233
     
    236238#if (DEBUG_CHDEV_CMD_TX & 1)
    237239if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    238 printk("\n[DBG] in %s : TX server thread %x unblocked\n", __FUNCTION__, server_ptr );
     240printk("\n[%s] TX server thread[%x,%x] unblocked\n",
     241__FUNCTION__, server_ptr->process->pid, server_ptr->trdid );
    239242#endif
    240243
    241244#if (DEBUG_CHDEV_CMD_RX & 1)
    242245if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    243 printk("\n[DBG] in %s : RX server thread %x unblocked\n", __FUNCTION__, server_ptr );
     246printk("\n[%s] RX server thread[%x,%x] unblocked\n",
     247__FUNCTION__, server_ptr->process->pid, server_ptr->trdid );
    244248#endif
    245249
     
    249253#if (DEBUG_CHDEV_CMD_TX & 1)
    250254if( (is_rx == 0)  && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    251 printk("\n[DBG] in %s : thread %x registered write request in chdev\n", __FUNCTION__, this );
     255printk("\n[%s] client thread[%x,%x] registered write request in chdev\n",
     256__FUNCTION__, this->process->pid, this->trdid );
    252257#endif
    253258 
    254259#if (DEBUG_CHDEV_CMD_RX & 1)
    255260if( (is_rx)  && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    256 printk("\n[DBG] in %s : thread %x registered read request in chdev\n", __FUNCTION__, this );
     261printk("\n[%s] client thread[%x,%x] registered read request in chdev\n",
     262__FUNCTION__, this->process->pid, this->trdid );
    257263#endif
    258264 
     
    264270#if (DEBUG_CHDEV_CMD_TX & 1)
    265271if( (is_rx == 0)  && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    266 printk("\n[DBG] in %s : client thread %x sent IPI to TX server thread %x\n",
    267 __FUNCTION__, this, server_ptr );
     272printk("\n[%s] client thread[%x,%x] sent IPI to TX server thread[%x,%x]\n",
     273__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid );
    268274#endif
    269275
    270276#if (DEBUG_CHDEV_CMD_RX & 1)
    271277if( (is_rx)  && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    272 printk("\n[DBG] in %s : client thread %x sent IPI to RX server thread %x\n",
    273 __FUNCTION__, this, server_ptr );
     278printk("\n[%s] client thread[%x,%x] sent IPI to RX server thread[%x,%x]\n",
     279__FUNCTION__, this->process->pid, this->trdid, server_ptr->process->pid, server_ptr->trdid );
    274280#endif
    275281
     
    288294rx_cycle = (uint32_t)hal_get_cycles();
    289295if( (is_rx) && (DEBUG_CHDEV_CMD_RX < rx_cycle) )
    290 printk("\n[DBG] %s : client_thread %x (%s) exit for RX / cycle %d\n",
    291 __FUNCTION__, this, thread_type_str(this->type) , rx_cycle );
     296printk("\n[%s] client_thread[%x,%x] exit for RX / cycle %d\n",
     297__FUNCTION__, this->process->pid, this->trdid, rx_cycle );
    292298#endif
    293299
     
    295301tx_cycle = (uint32_t)hal_get_cycles();
    296302if( (is_rx == 0) && (DEBUG_CHDEV_CMD_TX < tx_cycle) )
    297 printk("\n[DBG] %s : client_thread %x (%s) exit for TX / cycle %d\n",
    298 __FUNCTION__, this, thread_type_str(this->type) , tx_cycle );
     303printk("\n[%s] client_thread[%x,%x] exit for TX / cycle %d\n",
     304__FUNCTION__, this->process->pid, this->trdid, tx_cycle );
    299305#endif
    300306
     
    335341uint32_t rx_cycle = (uint32_t)hal_get_cycles();
    336342if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
    337 printk("\n[DBG] %s : dev_thread %x start RX / cycle %d\n",
    338 __FUNCTION__ , server->trdid , rx_cycle );
     343printk("\n[%s] dev_thread[%x,%x] start RX / cycle %d\n",
     344__FUNCTION__ , server->process->pid, server->trdid, rx_cycle );
    339345#endif
    340346
     
    342348uint32_t tx_cycle = (uint32_t)hal_get_cycles();
    343349if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
    344 printk("\n[DBG] %s : dev_thread %x start TX / cycle %d\n",
    345 __FUNCTION__ , server->trdid , tx_cycle );
     350printk("\n[%s] dev_thread[%x,%x] start TX / cycle %d\n",
     351__FUNCTION__ , server->process->pid, server->trdid, tx_cycle );
    346352#endif
    347353
     
    356362rx_cycle = (uint32_t)hal_get_cycles();
    357363if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
    358 printk("\n[DBG] %s : dev_thread %x found RX queue empty => blocks / cycle %d\n",
    359 __FUNCTION__ , server->trdid , rx_cycle );
     364printk("\n[%s] dev_thread[%x,%x] found RX queue empty => blocks / cycle %d\n",
     365__FUNCTION__ , server->process->pid, server->trdid, rx_cycle );
    360366#endif
    361367
     
    363369tx_cycle = (uint32_t)hal_get_cycles();
    364370if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
    365 printk("\n[DBG] %s : dev_thread %x found TX queue empty => blocks / cycle %d\n",
    366 __FUNCTION__ , server->trdid , tx_cycle );
     371printk("\n[%s] dev_thread[%x,%x] found TX queue empty => blocks / cycle %d\n",
     372__FUNCTION__ , server->process->pid, server->trdid, tx_cycle );
    367373#endif
    368374
     
    398404rx_cycle = (uint32_t)hal_get_cycles();
    399405if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
    400 printk("\n[DBG] %s : dev_thread %x for RX found client thread %x in process %x / cycle %d\n",
    401 __FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, rx_cycle );
     406printk("\n[%s] dev_thread[%x,%x] for RX get client thread[%x,%x] / cycle %d\n",
     407__FUNCTION__, server->process->pid, server->trdid,
     408client_ptr->process->pid, client_ptr->trdid, rx_cycle );
    402409#endif
    403410
     
    405412tx_cycle = (uint32_t)hal_get_cycles();
    406413if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
    407 printk("\n[DBG] %s : dev_thread %x for TX found client thread %x in process %x / cycle %d\n",
    408 __FUNCTION__, server->trdid ,client_ptr->trdid ,client_ptr->process->pid, tx_cycle );
     414printk("\n[%s] dev_thread[%x,%x] for TX get client thread[%x,%x] / cycle %d\n",
     415__FUNCTION__, server->process->pid, server->trdid,
     416client_ptr->process->pid, client_ptr->trdid, tx_cycle );
    409417#endif
    410418
     
    426434rx_cycle = (uint32_t)hal_get_cycles();
    427435if( (chdev->is_rx) && (DEBUG_CHDEV_SERVER_RX < rx_cycle) )
    428 printk("\n[DBG] %s : dev_thread %x completes RX for client %x in process %x / cycle %d\n",
    429 __FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, rx_cycle );
     436printk("\n[%s] dev_thread[%x,%x] completes RX for client thread[%x,%x] / cycle %d\n",
     437__FUNCTION__, server->process->pid, server->trdid,
     438client_ptr->process->pid, client_ptr->trdid, rx_cycle );
    430439#endif
    431440
     
    433442tx_cycle = (uint32_t)hal_get_cycles();
    434443if( (chdev->is_rx == 0) && (DEBUG_CHDEV_SERVER_TX < tx_cycle) )
    435 printk("\n[DBG] %s : dev_thread %x completes TX for client %x in process %x / cycle %d\n",
    436 __FUNCTION__, server->trdid, client_ptr->trdid, client_ptr->process->pid, tx_cycle );
     444printk("\n[%s] dev_thread[%x,%x] completes TX for client thread[%x,%x] / cycle %d\n",
     445__FUNCTION__, server->process->pid, server->trdid,
     446client_ptr->process->pid, client_ptr->trdid, tx_cycle );
    437447#endif
    438448
  • trunk/kernel/kern/cluster.c

    r583 r593  
    113113
    114114#if DEBUG_CLUSTER_INIT
    115 uint32_t cycle = (uint32_t)hal_get_cycles();
     115uint32_t   cycle = (uint32_t)hal_get_cycles();
     116thread_t * this  = CURRENT_THREAD;
    116117if( DEBUG_CLUSTER_INIT < cycle )
    117 printk("\n[DBG] %s : thread %x in process %x enters for cluster %x / cycle %d\n",
    118 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, local_cxy , cycle );
     118printk("\n[%s] thread[%x,%x] enters for cluster %x / cycle %d\n",
     119__FUNCTION__, this->process->pid, this->trdid, local_cxy , cycle );
    119120#endif
    120121
     
    132133cycle = (uint32_t)hal_get_cycles();
    133134if( DEBUG_CLUSTER_INIT < cycle )
    134 printk("\n[DBG] %s : PPM initialized in cluster %x / cycle %d\n",
     135printk("\n[%s] PPM initialized in cluster %x / cycle %d\n",
    135136__FUNCTION__ , local_cxy , cycle );
    136137#endif
     
    142143cycle = (uint32_t)hal_get_cycles();
    143144if( DEBUG_CLUSTER_INIT < cycle )
    144 printk("\n[DBG] %s : KHM initialized in cluster %x at cycle %d\n",
     145printk("\n[%s] KHM initialized in cluster %x at cycle %d\n",
    145146__FUNCTION__ , local_cxy , hal_get_cycles() );
    146147#endif
     
    152153cycle = (uint32_t)hal_get_cycles();
    153154if( DEBUG_CLUSTER_INIT < cycle )
    154 printk("\n[DBG] %s : KCM initialized in cluster %x at cycle %d\n",
     155printk("\n[%s] KCM initialized in cluster %x at cycle %d\n",
    155156__FUNCTION__ , local_cxy , hal_get_cycles() );
    156157#endif
     
    167168cycle = (uint32_t)hal_get_cycles();
    168169if( DEBUG_CLUSTER_INIT < cycle )
    169 printk("\n[DBG] %s : cores initialized in cluster %x / cycle %d\n",
     170printk("\n[%s] cores initialized in cluster %x / cycle %d\n",
    170171__FUNCTION__ , local_cxy , cycle );
    171172#endif
     
    181182cycle = (uint32_t)hal_get_cycles();
    182183if( DEBUG_CLUSTER_INIT < cycle )
    183 printk("\n[DBG] %s : RPC fifo inialized in cluster %x at cycle %d\n",
     184printk("\n[%s] RPC fifo inialized in cluster %x at cycle %d\n",
    184185__FUNCTION__ , local_cxy , hal_get_cycles() );
    185186#endif
     
    212213cycle = (uint32_t)hal_get_cycles();
    213214if( DEBUG_CLUSTER_INIT < cycle )
    214 printk("\n[DBG] %s : thread %x in process %x exit for cluster %x / cycle %d\n",
    215 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid , local_cxy , cycle );
     215printk("\n[%s] thread[%x,%x] exit for cluster %x / cycle %d\n",
     216__FUNCTION__, this->process->pid, this->trdid, local_cxy, cycle );
    216217#endif
    217218
     
    430431
    431432#if DEBUG_CLUSTER_PID_ALLOC
    432 uint32_t cycle = (uint32_t)hal_get_cycles();
     433uint32_t   cycle = (uint32_t)hal_get_cycles();
     434thread_t * this  = CURRENT_THREAD;
    433435if( DEBUG_CLUSTER_PID_ALLOC < cycle )
    434 printk("\n[DBG] %s : thread %x enters in cluster %x / cycle %d\n",
    435 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     436printk("\n[%s] thread[%x,%x] enters in cluster %x / cycle %d\n",
     437__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    436438#endif
    437439
     
    477479cycle = (uint32_t)hal_get_cycles();
    478480if( DEBUG_CLUSTER_PID_ALLOC < cycle )
    479 printk("\n[DBG] %s : thread %x exit in cluster %x / pid %x / cycle %d\n",
    480 __FUNCTION__ , CURRENT_THREAD , local_cxy , *pid , cycle );
     481printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
     482__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    481483#endif
    482484
     
    488490
    489491#if DEBUG_CLUSTER_PID_RELEASE
    490 uint32_t cycle = (uint32_t)hal_get_cycles();
    491 if( DEBUG_CLUSTER_PID_RELEASE < cycle )
    492 printk("\n[DBG] %s : thread %x enters in cluster %x / pid %x / cycle %d\n",
    493 __FUNCTION__ , CURRENT_THREAD , local_cxy , pid , cycle );
     492uint32_t   cycle = (uint32_t)hal_get_cycles();
     493thread_t * this  = CURRENT_THREAD;
     494if( DEBUG_CLUSTER_PID_ALLOC < cycle )
     495printk("\n[%s] thread[%x,%x] enters in cluster %x / pid %x / cycle %d\n",
     496__FUNCTION__ , this->process->pid , this->trdid , local_cxy , pid, cycle );
    494497#endif
    495498
     
    519522#if DEBUG_CLUSTER_PID_RELEASE
    520523cycle = (uint32_t)hal_get_cycles();
    521 if( DEBUG_CLUSTER_PID_RELEASE < cycle )
    522 printk("\n[DBG] %s : thread %x exit in cluster %x / cycle %d\n",
    523 __FUNCTION__ , CURRENT_THREAD , local_cxy , cycle );
     524if( DEBUG_CLUSTER_PID_ALLOC < cycle )
     525printk("\n[%s] thread[%x,%x] exit in cluster %x / cycle %d\n",
     526__FUNCTION__ , this->process->pid , this->trdid , local_cxy , cycle );
    524527#endif
    525528
     
    599602
    600603#if DEBUG_CLUSTER_PROCESS_COPIES
    601 uint32_t cycle = (uint32_t)hal_get_cycles();
     604uint32_t   cycle = (uint32_t)hal_get_cycles();
     605thread_t * this  = CURRENT_THREAD;
    602606if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    603 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    604 __FUNCTION__ , local_cxy , process , cycle );
     607printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
     608__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    605609#endif
    606610
     
    632636cycle = (uint32_t)hal_get_cycles();
    633637if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    634 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    635 __FUNCTION__ , local_cxy , process , cycle );
     638printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
     639__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    636640#endif
    637641
     
    644648
    645649#if DEBUG_CLUSTER_PROCESS_COPIES
    646 uint32_t cycle = (uint32_t)hal_get_cycles();
     650uint32_t   cycle = (uint32_t)hal_get_cycles();
     651thread_t * this  = CURRENT_THREAD;
    647652if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    648 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n",
    649 __FUNCTION__ , local_cxy , process , cycle );
     653printk("\n[%s] thread[%x,%x] enters for process %x / cycle %d\n",
     654__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    650655#endif
    651656
     
    674679cycle = (uint32_t)hal_get_cycles();
    675680if( DEBUG_CLUSTER_PROCESS_COPIES < cycle )
    676 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n",
    677 __FUNCTION__ , local_cxy , process , cycle );
     681printk("\n[%s] thread[%x,%x] exit for process %x / cycle %d\n",
     682__FUNCTION__ , this->process->pid , this->trdid , process->pid , cycle );
    678683#endif
    679684
  • trunk/kernel/kern/process.c

    r583 r593  
    123123uint32_t cycle = (uint32_t)hal_get_cycles();
    124124if( DEBUG_PROCESS_REFERENCE_INIT )
    125 printk("\n[DBG] %s : thread %x in process %x enter to initalialize process %x / cycle %d\n",
     125printk("\n[%s] thread %x in process %x enter to initalialize process %x / cycle %d\n",
    126126__FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid , cycle );
    127127#endif
     
    142142cycle = (uint32_t)hal_get_cycles();
    143143if( DEBUG_PROCESS_REFERENCE_INIT )
    144 printk("\n[DBG] %s : thread %x in process %x / vmm empty for process %x / cycle %d\n",
     144printk("\n[%s] thread %x in process %x / vmm empty for process %x / cycle %d\n",
    145145__FUNCTION__, CURRENT_THREAD->trdid, parent_pid , pid, cycle );
    146146#endif
     
    162162cycle = (uint32_t)hal_get_cycles();
    163163if( DEBUG_PROCESS_REFERENCE_INIT )
    164 printk("\n[DBG] %s : thread %x in process %x / process %x attached to TXT%d / cycle %d\n",
     164printk("\n[%s] thread %x in process %x / process %x attached to TXT%d / cycle %d\n",
    165165__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, txt_id, cycle );
    166166#endif
     
    183183cycle = (uint32_t)hal_get_cycles();
    184184if( DEBUG_PROCESS_REFERENCE_INIT )
    185 printk("\n[DBG] %s : thread %x in process %x / stdin open for process %x / cycle %d\n",
     185printk("\n[%s] thread %x in process %x / stdin open for process %x / cycle %d\n",
    186186__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
    187187#endif
     
    201201cycle = (uint32_t)hal_get_cycles();
    202202if( DEBUG_PROCESS_REFERENCE_INIT )
    203 printk("\n[DBG] %s : thread %x in process %x / stdout open for process %x / cycle %d\n",
     203printk("\n[%s] thread %x in process %x / stdout open for process %x / cycle %d\n",
    204204__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
    205205#endif
     
    219219cycle = (uint32_t)hal_get_cycles();
    220220if( DEBUG_PROCESS_REFERENCE_INIT )
    221 printk("\n[DBG] %s : thread %x in process %x / stderr open for process %x / cycle %d\n",
     221printk("\n[%s] thread %x in process %x / stderr open for process %x / cycle %d\n",
    222222__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
    223223#endif
     
    260260cycle = (uint32_t)hal_get_cycles();
    261261if( DEBUG_PROCESS_REFERENCE_INIT )
    262 printk("\n[DBG] %s : thread %x in process %x / set fd_array for process %x / cycle %d\n",
     262printk("\n[%s] thread %x in process %x / set fd_array for process %x / cycle %d\n",
    263263__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid , cycle );
    264264#endif
     
    301301cycle = (uint32_t)hal_get_cycles();
    302302if( DEBUG_PROCESS_REFERENCE_INIT )
    303 printk("\n[DBG] %s : thread %x in process %x exit for process %x / cycle %d\n",
     303printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n",
    304304__FUNCTION__, CURRENT_THREAD->trdid, parent_pid, pid, cycle );
    305305#endif
     
    328328uint32_t cycle = (uint32_t)hal_get_cycles();
    329329if( DEBUG_PROCESS_COPY_INIT )
    330 printk("\n[DBG] %s : thread %x in process %x enter for process %x / cycle %d\n",
     330printk("\n[%s] thread %x in process %x enter for process %x / cycle %d\n",
    331331__FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle );
    332332#endif
     
    383383cycle = (uint32_t)hal_get_cycles();
    384384if( DEBUG_PROCESS_COPY_INIT )
    385 printk("\n[DBG] %s : thread %x in process %x exit for process %x / cycle %d\n",
     385printk("\n[%s] thread %x in process %x exit for process %x / cycle %d\n",
    386386__FUNCTION__, this->trdid, this->process->pid, local_process->pid, cycle );
    387387#endif
     
    402402    pid_t       pid = process->pid;
    403403
    404         assert( (process->th_nr == 0) ,
    405     "process %x in cluster %x has still active threads", pid , local_cxy );
     404// check no more threads
     405assert( (process->th_nr == 0) , "process %x in cluster %x contains threads", pid , local_cxy );
    406406
    407407#if DEBUG_PROCESS_DESTROY
    408408uint32_t cycle = (uint32_t)hal_get_cycles();
    409409if( DEBUG_PROCESS_DESTROY )
    410 printk("\n[DBG] %s : thread %x in process %x enter for process %x in cluster %x / cycle %d\n",
     410printk("\n[%s] thread %x in process %x enter for process %x in cluster %x / cycle %d\n",
    411411__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle );
    412412#endif
     
    457457cycle = (uint32_t)hal_get_cycles();
    458458if( DEBUG_PROCESS_DESTROY )
    459 printk("\n[DBG] %s : thread %x in process %x exit / process %x in cluster %x / cycle %d\n",
     459printk("\n[%s] thread %x in process %x exit / process %x in cluster %x / cycle %d\n",
    460460__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, pid, local_cxy, cycle );
    461461#endif
     
    506506uint32_t cycle = (uint32_t)hal_get_cycles();
    507507if( DEBUG_PROCESS_SIGACTION < cycle )
    508 printk("\n[DBG] %s : thread[%x,%x] enter to %s process %x / cycle %d\n",
     508printk("\n[%s] thread[%x,%x] enter to %s process %x / cycle %d\n",
    509509__FUNCTION__ , client->process->pid, client->trdid,
    510510process_action_str( type ) , pid , cycle );
     
    518518    lpid      = LPID_FROM_PID( pid );
    519519
    520     // get root of list of copies, lock, and number of copies from owner cluster
     520    // get root of list of copies and lock from owner cluster
    521521    root_xp   = XPTR( owner_cxy , &cluster->pmgr.copies_root[lpid] );
    522522    lock_xp   = XPTR( owner_cxy , &cluster->pmgr.copies_lock[lpid] );
     
    527527         (type == UNBLOCK_ALL_THREADS )), "illegal action type" );
    528528             
    529     // The client thread send parallel RPCs to all remote clusters containing
     529    // This client thread send parallel RPCs to all remote clusters containing
    530530    // target process copies, wait all responses, and then handles directly
    531531    // the threads in local cluster, when required.
     
    561561        process_ptr = GET_PTR( process_xp );
    562562
    563         if( process_cxy == local_cxy )    // process is local
     563// printk("\n@@@ in %s : process_cxy %x / process_ptr %x / pid %x\n",
     564// __FUNCTION__, process_cxy, process_ptr, hal_remote_l32( XPTR( process_cxy , &process_ptr->pid ) ) );
     565
     566        if( process_cxy == local_cxy )    // process copy is local
    564567        {
    565568            local = process_ptr;
    566569        }
    567         else                              // process is remote
     570        else                              // process copy is remote
    568571        {
    569572            // update number of remote process copies
     
    575578#if DEBUG_PROCESS_SIGACTION
    576579if( DEBUG_PROCESS_SIGACTION < cycle )
    577 printk("\n[DBG] %s : thread[%x,%x] send RPC to cluster %x for process %x\n",
     580printk("\n[%s] thread[%x,%x] send RPC to cluster %x for process %x\n",
    578581__FUNCTION__, client->process->pid, client->trdid, process_cxy, pid );
    579582#endif
     
    607610#if DEBUG_PROCESS_SIGACTION
    608611if( DEBUG_PROCESS_SIGACTION < cycle )
    609 printk("\n[DBG] %s : thread[%x,%x] handles local process %x in cluster %x\n",
     612printk("\n[%s] thread[%x,%x] handles local process %x in cluster %x\n",
    610613__FUNCTION__, client->process->pid, client->trdid, pid , local_cxy );
    611614#endif
     
    618621cycle = (uint32_t)hal_get_cycles();
    619622if( DEBUG_PROCESS_SIGACTION < cycle )
    620 printk("\n[DBG] %s : thread[%x,%x] exit after %s process %x / cycle %d\n",
     623printk("\n[%s] thread[%x,%x] exit after %s process %x / cycle %d\n",
    621624__FUNCTION__, client->process->pid, client->trdid,
    622625process_action_str( type ), pid, cycle );
     
    633636    cxy_t               owner_cxy;      // target process owner cluster
    634637    uint32_t            count;          // requests counter
    635     volatile uint32_t   ack_count;      // scheduler acknowledge counter
     638    volatile uint32_t   ack_count;      // acknowledges counter
    636639
    637640    // get calling thread pointer
     
    642645uint32_t cycle = (uint32_t)hal_get_cycles();
    643646if( DEBUG_PROCESS_SIGACTION < cycle )
    644 printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
     647printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
    645648__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
    646649#endif
     
    657660    // loop on target process local threads
    658661    // we use both "ltid" and "count" because it can exist "holes" in th_tbl
     662    // - if the calling thread and the target thread are not running on the same
     663    //   core, we ask the target scheduler to acknowlege the blocking
     664    //   to be sure that the target thread is not running.
     665    // - if the calling thread and the target thread are running on the same core,
     666    //   we don't need confirmation from scheduler.
     667           
    659668    for( ltid = 0 , count = 0 , ack_count = 0 ; count < process->th_nr ; ltid++ )
    660669    {
     
    668677            thread_block( XPTR( local_cxy , target ) , THREAD_BLOCKED_GLOBAL );
    669678 
    670             // - if the calling thread and the target thread are running on the same core,
    671             //   we don't need confirmation from scheduler,
    672             // - if the calling thread and the target thread are not running on the same
    673             //   core, we ask the target scheduler to acknowlege the blocking
    674             //   to be sure that the target thread is not running.
    675            
    676679            if( this->core->lid != target->core->lid )
    677680            {
     
    691694    rwlock_rd_release( &process->th_lock );
    692695
    693     // busy waiting acknowledges
    694     // TODO this could be improved...
     696    // wait other threads acknowledges  TODO this could be improved...
    695697    while( 1 )
    696698    {
     
    705707cycle = (uint32_t)hal_get_cycles();
    706708if( DEBUG_PROCESS_SIGACTION < cycle )
    707 printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
    708 __FUNCTION__, this, this->process->pid, pid, local_cxy , cycle );
     709printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
     710__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
    709711#endif
    710712
     
    729731
    730732#if DEBUG_PROCESS_SIGACTION
    731 pid_t pid = process->pid;
    732733uint32_t cycle = (uint32_t)hal_get_cycles();
    733734if( DEBUG_PROCESS_SIGACTION < cycle )
    734 printk("\n[DBG] %s : thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",
     735printk("\n[%s] thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",
    735736__FUNCTION__, this->process->pid, this->trdid, local_cxy, process->pid, cycle );
    736737#endif
    737738
    738739// check target process is an user process
    739 assert( ( LPID_FROM_PID( process->pid ) != 0 ),
    740 "target process must be an user process" );
     740assert( (LPID_FROM_PID( process->pid ) != 0), "process %x not an user process", process->pid );
    741741
    742742    // get lock protecting process th_tbl[]
     
    770770cycle = (uint32_t)hal_get_cycles();
    771771if( DEBUG_PROCESS_SIGACTION < cycle )
    772 printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
    773 __FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
     772printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
     773__FUNCTION__, this->process->pid, this->trdid, process->pid, local_cxy , cycle );
    774774#endif
    775775
     
    791791uint32_t cycle = (uint32_t)hal_get_cycles();
    792792if( DEBUG_PROCESS_SIGACTION < cycle )
    793 printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
     793printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
    794794__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy , cycle );
    795795#endif
     
    823823cycle = (uint32_t)hal_get_cycles();
    824824if( DEBUG_PROCESS_SIGACTION < cycle )
    825 printk("\n[DBG] %s : thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
     825printk("\n[%s] thread[%x,%x] exit for process %x in cluster %x / cycle %d\n",
    826826__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle );
    827827#endif
     
    842842uint32_t cycle = (uint32_t)hal_get_cycles();
    843843if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle )
    844 printk("\n[DBG] %s : thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
     844printk("\n[%s] thread[%x,%x] enter for process %x in cluster %x / cycle %d\n",
    845845__FUNCTION__, this->process->pid, this->trdid, pid, local_cxy, cycle );
    846846#endif
     
    889889cycle = (uint32_t)hal_get_cycles();
    890890if( DEBUG_PROCESS_GET_LOCAL_COPY < cycle )
    891 printk("\n[DBG] %s : thread[%x,%x] exit in cluster %x / process %x / cycle %d\n",
     891printk("\n[%s] thread[%x,%x] exit in cluster %x / process %x / cycle %d\n",
    892892__FUNCTION__, this->process->pid, this->trdid, local_cxy, process_ptr, cycle );
    893893#endif
     
    12051205pid_t      pid   = this->process->pid;
    12061206if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1207 printk("\n[DBG] %s : thread[%x,%x] enter / cluster %x / cycle %d\n",
     1207printk("\n[%s] thread[%x,%x] enter / cluster %x / cycle %d\n",
    12081208__FUNCTION__, pid, trdid, local_cxy, cycle );
    12091209#endif
     
    12311231cycle = (uint32_t)hal_get_cycles();
    12321232if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1233 printk("\n[DBG] %s : thread[%x,%x] allocated process %x / cycle %d\n",
     1233printk("\n[%s] thread[%x,%x] allocated process %x / cycle %d\n",
    12341234__FUNCTION__, pid, trdid, new_pid, cycle );
    12351235#endif
     
    12431243cycle = (uint32_t)hal_get_cycles();
    12441244if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1245 printk("\n[DBG] %s : thread[%x,%x] initialized child_process %x / cycle %d\n",
     1245printk("\n[%s] thread[%x,%x] initialized child_process %x / cycle %d\n",
    12461246__FUNCTION__, pid, trdid, new_pid, cycle );
    12471247#endif
     
    12631263cycle = (uint32_t)hal_get_cycles();
    12641264if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1265 printk("\n[DBG] %s : thread[%x,%x] copied VMM from parent to child / cycle %d\n",
     1265printk("\n[%s] thread[%x,%x] copied VMM from parent to child / cycle %d\n",
    12661266__FUNCTION__, pid, trdid, cycle );
    12671267#endif
     
    12761276cycle = (uint32_t)hal_get_cycles();
    12771277if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1278 printk("\n[DBG] %s : thread[%x,%x] / child takes TXT ownership / cycle %d\n",
     1278printk("\n[%s] thread[%x,%x] / child takes TXT ownership / cycle %d\n",
    12791279__FUNCTION__ , pid, trdid, cycle );
    12801280#endif
     
    13051305cycle = (uint32_t)hal_get_cycles();
    13061306if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1307 printk("\n[DBG] %s : thread[%x,%x] created main thread %x / cycle %d\n",
     1307printk("\n[%s] thread[%x,%x] created main thread %x / cycle %d\n",
    13081308__FUNCTION__, pid, trdid, thread, cycle );
    13091309#endif
     
    13271327cycle = (uint32_t)hal_get_cycles();
    13281328if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1329 printk("\n[DBG] %s : thread[%x,%x] set COW in parent and child / cycle %d\n",
     1329printk("\n[%s] thread[%x,%x] set COW in parent and child / cycle %d\n",
    13301330__FUNCTION__, pid, trdid, cycle );
    13311331#endif
     
    13491349cycle = (uint32_t)hal_get_cycles();
    13501350if( DEBUG_PROCESS_MAKE_FORK < cycle )
    1351 printk("\n[DBG] %s : thread[%x,%x] exit / created process %x / cycle %d\n",
     1351printk("\n[%s] thread[%x,%x] exit / created process %x / cycle %d\n",
    13521352__FUNCTION__, pid, trdid, new_pid, cycle );
    13531353#endif
     
    13831383uint32_t cycle = (uint32_t)hal_get_cycles();
    13841384if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1385 printk("\n[DBG] %s : thread[%x,%x] enters for %s / cycle %d\n",
     1385printk("\n[%s] thread[%x,%x] enters for %s / cycle %d\n",
    13861386__FUNCTION__, pid, thread->trdid, path, cycle );
    13871387#endif
     
    14051405cycle = (uint32_t)hal_get_cycles();
    14061406if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1407 printk("\n[DBG] %s : thread[%x,%x] opened file <%s> / cycle %d\n",
     1407printk("\n[%s] thread[%x,%x] opened file <%s> / cycle %d\n",
    14081408__FUNCTION__, pid, thread->trdid, path, cycle );
    14091409#endif
     
    14151415cycle = (uint32_t)hal_get_cycles();
    14161416if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1417 printk("\n[DBG] %s : thread[%x,%x] deleted all threads / cycle %d\n",
     1417printk("\n[%s] thread[%x,%x] deleted all threads / cycle %d\n",
    14181418__FUNCTION__, pid, thread->trdid, cycle );
    14191419#endif
     
    14251425cycle = (uint32_t)hal_get_cycles();
    14261426if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1427 printk("\n[DBG] %s : thread[%x,%x] reset VMM / cycle %d\n",
     1427printk("\n[%s] thread[%x,%x] reset VMM / cycle %d\n",
    14281428__FUNCTION__, pid, thread->trdid, cycle );
    14291429#endif
     
    14421442cycle = (uint32_t)hal_get_cycles();
    14431443if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1444 printk("\n[DBG] %s : thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n",
     1444printk("\n[%s] thread[%x,%x] / kentry/args/envs vsegs registered / cycle %d\n",
    14451445__FUNCTION__, pid, thread->trdid, cycle );
    14461446#endif
     
    14601460cycle = (uint32_t)hal_get_cycles();
    14611461if( DEBUG_PROCESS_MAKE_EXEC < cycle )
    1462 printk("\n[DBG] %s : thread[%x,%x] / code/data vsegs registered / cycle %d\n",
     1462printk("\n[%s] thread[%x,%x] / code/data vsegs registered / cycle %d\n",
    14631463__FUNCTION__, pid, thread->trdid, cycle );
    14641464#endif
     
    14921492uint32_t cycle = (uint32_t)hal_get_cycles();
    14931493if( DEBUG_PROCESS_ZERO_CREATE < cycle )
    1494 printk("\n[DBG] %s : enter / cluster %x / cycle %d\n",
     1494printk("\n[%s] enter / cluster %x / cycle %d\n",
    14951495__FUNCTION__, local_cxy, cycle );
    14961496#endif
     
    15391539cycle = (uint32_t)hal_get_cycles();
    15401540if( DEBUG_PROCESS_ZERO_CREATE < cycle )
    1541 printk("\n[DBG] %s : exit / cluster %x / cycle %d\n",
     1541printk("\n[%s] exit / cluster %x / cycle %d\n",
    15421542__FUNCTION__, local_cxy, cycle );
    15431543#endif
     
    15601560uint32_t cycle = (uint32_t)hal_get_cycles();
    15611561if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1562 printk("\n[DBG] %s : thread %x in process %x enter / cycle %d\n",
     1562printk("\n[%s] thread %x in process %x enter / cycle %d\n",
    15631563__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle );
    15641564#endif
     
    15891589#if(DEBUG_PROCESS_INIT_CREATE & 1)
    15901590if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1591 printk("\n[DBG] %s : thread %x in process %x initialized process descriptor\n",
     1591printk("\n[%s] thread %x in process %x initialized process descriptor\n",
    15921592__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
    15931593#endif
     
    16081608#if(DEBUG_PROCESS_INIT_CREATE & 1)
    16091609if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1610 printk("\n[DBG] %s : thread %x in process %x open .elf file decriptor\n",
     1610printk("\n[%s] thread %x in process %x open .elf file decriptor\n",
    16111611__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
    16121612#endif
     
    16211621#if(DEBUG_PROCESS_INIT_CREATE & 1)
    16221622if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1623 printk("\n[DBG] %s : thread %x in process %x registered code/data vsegs in VMM\n",
     1623printk("\n[%s] thread %x in process %x registered code/data vsegs in VMM\n",
    16241624__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
    16251625#endif
     
    16411641#if(DEBUG_PROCESS_INIT_CREATE & 1)
    16421642if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1643 printk("\n[DBG] %s : thread %x in process %x registered init process in parent\n",
     1643printk("\n[%s] thread %x in process %x registered init process in parent\n",
    16441644__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
    16451645#endif
     
    16681668#if(DEBUG_PROCESS_INIT_CREATE & 1)
    16691669if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1670 printk("\n[DBG] %s : thread %x in process %x created main thread\n",
     1670printk("\n[%s] thread %x in process %x created main thread\n",
    16711671__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
    16721672#endif
     
    16801680cycle = (uint32_t)hal_get_cycles();
    16811681if( DEBUG_PROCESS_INIT_CREATE < cycle )
    1682 printk("\n[DBG] %s : thread %x in process %x exit / cycle %d\n",
     1682printk("\n[%s] thread %x in process %x exit / cycle %d\n",
    16831683__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, cycle );
    16841684#endif
     
    18671867uint32_t cycle = (uint32_t)hal_get_cycles();
    18681868if( DEBUG_PROCESS_TXT < cycle )
    1869 printk("\n[DBG] %s : thread %x in process %x attached process %x to TXT %d / cycle %d\n",
     1869printk("\n[%s] thread %x in process %x attached process %x to TXT %d / cycle %d\n",
    18701870__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    18711871process->pid, txt_id , cycle );
     
    19221922uint32_t txt_id = hal_remote_l32( XPTR( chdev_cxy , &chdev_ptr->channel ) );
    19231923if( DEBUG_PROCESS_TXT < cycle )
    1924 printk("\n[DBG] %s : thread %x in process %x detached process %x from TXT %d / cycle %d\n",
     1924printk("\n[%s] thread %x in process %x detached process %x from TXT %d / cycle %d\n",
    19251925__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    19261926process_pid, txt_id, cycle );
     
    19641964uint32_t txt_id = hal_remote_l32( XPTR( txt_cxy , &txt_ptr->channel ) );
    19651965if( DEBUG_PROCESS_TXT < cycle )
    1966 printk("\n[DBG] %s : thread %x in process %x give TXT %d to process %x / cycle %d\n",
     1966printk("\n[%s] thread %x in process %x give TXT %d to process %x / cycle %d\n",
    19671967__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, process_pid, cycle );
    19681968#endif
     
    20452045uint32_t ksh_pid = hal_remote_l32( XPTR( current_cxy , &current_ptr->pid ) );
    20462046if( DEBUG_PROCESS_TXT < cycle )
    2047 printk("\n[DBG] %s : thread %x in process %x release TXT %d to KSH %x / cycle %d\n",
     2047printk("\n[%s] thread %x in process %x release TXT %d to KSH %x / cycle %d\n",
    20482048__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, ksh_pid, cycle );
    20492049process_txt_display( txt_id );
     
    20822082uint32_t new_pid = hal_remote_l32( XPTR( current_cxy , &current_ptr->pid ) );
    20832083if( DEBUG_PROCESS_TXT < cycle )
    2084 printk("\n[DBG] %s : thread %x in process %x release TXT %d to process %x / cycle %d\n",
     2084printk("\n[%s] thread %x in process %x release TXT %d to process %x / cycle %d\n",
    20852085__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, new_pid, cycle );
    20862086process_txt_display( txt_id );
     
    20992099cycle = (uint32_t)hal_get_cycles();
    21002100if( DEBUG_PROCESS_TXT < cycle )
    2101 printk("\n[DBG] %s : thread %x in process %x release TXT %d to nobody / cycle %d\n",
     2101printk("\n[%s] thread %x in process %x release TXT %d to nobody / cycle %d\n",
    21022102__FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, txt_id, cycle );
    21032103process_txt_display( txt_id );
     
    21122112cycle = (uint32_t)hal_get_cycles();
    21132113if( DEBUG_PROCESS_TXT < cycle )
    2114 printk("\n[DBG] %s : thread %x in process %d does nothing (not TXT owner) / cycle %d\n",
     2114printk("\n[%s] thread %x in process %d does nothing (not TXT owner) / cycle %d\n",
    21152115__FUNCTION__, CURRENT_THREAD->trdid, process_pid, cycle );
    21162116process_txt_display( txt_id );
  • trunk/kernel/kern/process.h

    r583 r593  
    289289 * all threads of a process identified by the <pid> argument, depending on the
    290290 * <action_type> argument.
    291  * WARNING : the DELETE and BLOCK actions are NOT executed on the target process main thread
    292  * (thread 0 in process owner cluster), and not executed on the calling thread itself.
     291 *
    293292 * It uses the multicast, non blocking rpc_process_sigaction_client() function to send
    294293 * parallel requests to all remote clusters containing process copies.
     
    298297 * It is also used by the process_make_exec() function to handle the "exec" syscall.
    299298 * It is also called by the TXT device ISR to execute the ctrl C & ctrl Z commands.
     299 *
     300 * WARNING (1) the DELETE action is NOT executed on the target process main thread
     301 * (thread 0 in process owner cluster), and not executed on the client thread itself.
     302 *
     303 * WARNING (2) the BLOCK action is executed on all target process threads, and this function
     304 * returns only when all threads BUT the client thread are actually blocked and not running.
     305 * When the client thread is also a target thread, it is blocked but not descheduled.
     306 *
     307 * WARNING (3) the UNBLOCK action is executed on all target process threads, as the
     308 * client thread cannot be a target thread.
    300309 *
    301310 * Implementation note:
     
    328337 * It scan the list of local thread, and sets the THREAD_BLOCKED_GLOBAL bit for all threads.
    329338 * It request the relevant schedulers to acknowledge the blocking, using IPI if required,
    330  * and returns only when all threads in cluster are actually blocked.
     339 * and returns only when all threads in cluster, but the calling thread, are actually blocked.
    331340 * The threads are not detached from the scheduler, and not detached from the local process.
    332341 *********************************************************************************************
  • trunk/kernel/kern/scheduler.c

    r592 r593  
    179179    sched = &core->scheduler;
    180180
    181     // take the lock protecting sheduler state
    182     busylock_acquire( &sched->lock );
    183 
    184     ////// scan user threads to handle both ACK and DELETE requests
     181    /////////////// scan user threads to handle both ACK and DELETE requests
    185182    root = &sched->u_root;
    186183    iter = root->next;
     
    215212            // get thread ltid
    216213            ltid = LTID_FROM_TRDID( thread->trdid);
     214
     215            // take the lock protecting sheduler state
     216            busylock_acquire( &sched->lock );
    217217
    218218            // update scheduler state
     
    236236            }
    237237
     238            // release the lock protecting sheduler state
     239            busylock_release( &sched->lock );
     240
    238241// check th_nr value
    239242assert( (process->th_nr > 0) , "process th_nr cannot be 0\n" );
     
    241244            // remove thread from process th_tbl[]
    242245            process->th_tbl[ltid] = NULL;
    243             hal_atomic_add( &process->th_nr , - 1 );
     246            count = hal_atomic_add( &process->th_nr , - 1 );
    244247 
    245248            // release memory allocated for thread descriptor
    246249            thread_destroy( thread );
     250
     251            hal_fence();
    247252
    248253#if DEBUG_SCHED_HANDLE_SIGNALS
     
    288293            // get thread ltid
    289294            ltid = LTID_FROM_TRDID( thread->trdid);
     295
     296            // take the lock protecting sheduler state
     297            busylock_acquire( &sched->lock );
    290298
    291299            // update scheduler state
     
    309317            }
    310318
     319            // release the lock protecting sheduler state
     320            busylock_release( &sched->lock );
     321
    311322            // get number of threads in local kernel process
    312323            count = process_zero.th_nr;
     
    330341        }
    331342    }
    332 
    333     // release the lock protecting sheduler state
    334     busylock_release( &sched->lock );
    335 
    336343} // end sched_handle_signals()
    337344
  • trunk/kernel/kern/thread.c

    r583 r593  
    124124// It updates the local DQDT.
    125125/////////////////////////////////////////////////////////////////////////////////////
    126 // @ thread       : pointer on thread descriptor
    127 // @ process      : pointer on process descriptor.
     126// @ thread       : pointer on local thread descriptor
     127// @ process      : pointer on local process descriptor.
    128128// @ type         : thread type.
    129129// @ func         : pointer on thread entry function.
     
    148148
    149149#if DEBUG_THREAD_INIT
    150 uint32_t cycle = (uint32_t)hal_get_cycles();
     150uint32_t   cycle = (uint32_t)hal_get_cycles();
     151thread_t * this  = CURRENT_THREAD;
    151152if( DEBUG_THREAD_INIT < cycle )
    152 printk("\n[DBG] %s : thread %x in process %x enter fot thread %x in process %x / cycle %d\n",
    153 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    154  thread, process->pid , cycle );
     153printk("\n[%s] thread[%x,%x] enter for thread %x in process %x / cycle %d\n",
     154__FUNCTION__, this->process->pid, this->trdid, thread, process->pid , cycle );
    155155#endif
    156156
     
    229229cycle = (uint32_t)hal_get_cycles();
    230230if( DEBUG_THREAD_INIT < cycle )
    231 printk("\n[DBG] %s : thread %x in process %x exit for thread %x in process %x / cycle %d\n",
    232 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    233 thread, process->pid , cycle );
     231printk("\n[%s] thread[%x,%x] exit for thread %x in process %x / cycle %d\n",
     232__FUNCTION__, this->process->pid, this->trdid, thread, process->pid, cycle );
    234233#endif
    235234
     
    251250    vseg_t       * vseg;         // stack vseg
    252251
    253     assert( (attr != NULL) , "pthread attributes must be defined" );
     252assert( (attr != NULL) , "pthread attributes must be defined" );
    254253
    255254#if DEBUG_THREAD_USER_CREATE
    256 uint32_t cycle = (uint32_t)hal_get_cycles();
     255thread_t * this  = CURRENT_THREAD;
     256uint32_t   cycle = (uint32_t)hal_get_cycles();
    257257if( DEBUG_THREAD_USER_CREATE < cycle )
    258 printk("\n[DBG] %s : thread %x in process %x enter in cluster %x / cycle %d\n",
    259 __FUNCTION__, CURRENT_THREAD->trdid, pid , local_cxy , cycle );
     258printk("\n[%s] thread[%x,%x] enter in cluster %x for process %x / cycle %d\n",
     259__FUNCTION__, this->process->pid , this->trdid , local_cxy , pid , cycle );
    260260#endif
    261261
     
    272272#if( DEBUG_THREAD_USER_CREATE & 1)
    273273if( DEBUG_THREAD_USER_CREATE < cycle )
    274 printk("\n[DBG] %s : process descriptor = %x for process %x in cluster %x\n",
     274printk("\n[%s] process descriptor = %x for process %x in cluster %x\n",
    275275__FUNCTION__, process , pid , local_cxy );
    276276#endif
     
    294294#if( DEBUG_THREAD_USER_CREATE & 1)
    295295if( DEBUG_THREAD_USER_CREATE < cycle )
    296 printk("\n[DBG] %s : core[%x,%d] selected\n",
     296printk("\n[%s] core[%x,%d] selected\n",
    297297__FUNCTION__, local_cxy , core_lid );
    298298#endif
     
    316316#if( DEBUG_THREAD_USER_CREATE & 1)
    317317if( DEBUG_THREAD_USER_CREATE < cycle )
    318 printk("\n[DBG] %s : stack vseg created / vpn_base %x / %d pages\n",
     318printk("\n[%s] stack vseg created / vpn_base %x / %d pages\n",
    319319__FUNCTION__, vseg->vpn_base, vseg->vpn_size );
    320320#endif
     
    332332#if( DEBUG_THREAD_USER_CREATE & 1)
    333333if( DEBUG_THREAD_USER_CREATE < cycle )
    334 printk("\n[DBG] %s : new thread descriptor %x allocated\n",
     334printk("\n[%s] new thread descriptor %x allocated\n",
    335335__FUNCTION__, thread );
    336336#endif
     
    355355#if( DEBUG_THREAD_USER_CREATE & 1)
    356356if( DEBUG_THREAD_USER_CREATE < cycle )
    357 printk("\n[DBG] %s : new thread descriptor initialised / trdid %x\n",
     357printk("\n[%s] new thread descriptor initialised / trdid %x\n",
    358358__FUNCTION__, thread->trdid );
    359359#endif
     
    387387#if( DEBUG_THREAD_USER_CREATE & 1)
    388388if( DEBUG_THREAD_USER_CREATE < cycle )
    389 printk("\n[DBG] %s : CPU & FPU contexts created\n",
     389printk("\n[%s] CPU & FPU contexts created\n",
    390390__FUNCTION__, thread->trdid );
    391391vmm_display( process , true );
     
    395395cycle = (uint32_t)hal_get_cycles();
    396396if( DEBUG_THREAD_USER_CREATE < cycle )
    397 printk("\n[DBG] %s : thread %x in process %x exit / new_thread %x / core %d / cycle %d\n",
    398 __FUNCTION__, CURRENT_THREAD->trdid , pid, thread->trdid, core_lid, cycle );
     397printk("\n[%s] thread[%x,%x] exit / new_thread %x / core %d / cycle %d\n",
     398__FUNCTION__, this->process->pid , this->trdid , thread->trdid, core_lid, cycle );
    399399#endif
    400400
     
    430430
    431431#if DEBUG_THREAD_USER_FORK
    432 uint32_t cycle = (uint32_t)hal_get_cycles();
     432uint32_t   cycle = (uint32_t)hal_get_cycles();
     433thread_t * this  = CURRENT_THREAD;
    433434if( DEBUG_THREAD_USER_FORK < cycle )
    434 printk("\n[DBG] %s : thread %x in process %x enter / child_process %x / cycle %d\n",
    435 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, child_process->pid, cycle );
     435printk("\n[%s] thread[%x,%x] enter / child_process %x / cycle %d\n",
     436__FUNCTION__, this->process->pid, this->trdid, child_process->pid, cycle );
    436437#endif
    437438
     
    487488#if (DEBUG_THREAD_USER_FORK & 1)
    488489if( DEBUG_THREAD_USER_FORK < cycle )
    489 printk("\n[DBG] %s : thread %x in process %x / initialised thread %x in process %x\n",
    490 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
    491 child_ptr->trdid, child_process->pid );
     490printk("\n[%s] thread[%x,%x] initialised thread %x in process %x\n",
     491__FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid );
    492492#endif
    493493
     
    522522#if (DEBUG_THREAD_USER_FORK & 1)
    523523if( DEBUG_THREAD_USER_FORK < cycle )
    524 printk("\n[DBG] %s : thread %x in process %x / created CPU & FPU contexts\n",
    525 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
     524printk("\n[%s] thread[%x,%x] created CPU & FPU contexts for thread %x in process %x\n",
     525__FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid );
    526526#endif
    527527
     
    542542#if (DEBUG_THREAD_USER_FORK & 1)
    543543if( DEBUG_THREAD_USER_FORK < cycle )
    544 printk("\n[DBG] %s : thread %x in process %x / created stack vseg\n",
    545 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
     544printk("\n[%s] thread[%x,%x] created stack vseg for thread %x in process %x\n",
     545__FUNCTION__, this->process->pid, this->trdid, child_ptr->trdid, child_process->pid );
    546546#endif
    547547
     
    591591cycle = (uint32_t)hal_get_cycles();
    592592if( DEBUG_THREAD_USER_FORK < cycle )
    593 printk("\n[DBG] %s : thread %x in process %x copied one PTE to child GPT : vpn %x / forks %d\n",
    594 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, vpn,
    595 hal_remote_l32( XPTR( page_cxy , &page_ptr->forks) ) );
     593printk("\n[%s] thread[%x,%x] copied one PTE to child GPT : vpn %x / forks %d\n",
     594__FUNCTION__, this->process->pid, this->trdid,
     595vpn, hal_remote_l32( XPTR( page_cxy , &page_ptr->forks) ) );
    596596#endif
    597597
     
    607607cycle = (uint32_t)hal_get_cycles();
    608608if( DEBUG_THREAD_USER_FORK < cycle )
    609 printk("\n[DBG] %s : thread %x in process %x exit / child_thread %x / cycle %d\n",
    610 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid, child_ptr, cycle );
     609printk("\n[%s] thread[%x,%x] exit / child_thread %x / cycle %d\n",
     610__FUNCTION__, this->process->pid, this->trdid, child_ptr, cycle );
    611611#endif
    612612
     
    626626uint32_t cycle = (uint32_t)hal_get_cycles();
    627627if( DEBUG_THREAD_USER_EXEC < cycle )
    628 printk("\n[DBG] %s : thread %x in process %x enter / cycle %d\n",
    629 __FUNCTION__, thread->trdid, process->pid, cycle );
     628printk("\n[%s] thread[%x,%x] enter / cycle %d\n",
     629__FUNCTION__, process->pid, thread->trdid, cycle );
    630630#endif
    631631
     
    688688cycle = (uint32_t)hal_get_cycles();
    689689if( DEBUG_THREAD_USER_EXEC < cycle )
    690 printk("\n[DBG] %s : thread %x in process %x set CPU context & jump to user code / cycle %d\n",
    691 __FUNCTION__, thread->trdid, process->pid, cycle );
     690printk("\n[%s] thread[%x,%x] set CPU context & jump to user code / cycle %d\n",
     691__FUNCTION__, process->pid, thread->trdid, cycle );
    692692vmm_display( process , true );
    693693#endif
     
    712712        thread_t     * thread;       // pointer on new thread descriptor
    713713
    714     assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) ,
    715     "illegal thread type" );
    716 
    717     assert( (core_lid < LOCAL_CLUSTER->cores_nr) ,
    718     "illegal core_lid" );
     714    thread_t * this = CURRENT_THREAD;
     715
     716assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) ,
     717"illegal thread type" );
     718
     719assert( (core_lid < LOCAL_CLUSTER->cores_nr) ,
     720"illegal core_lid" );
    719721
    720722#if DEBUG_THREAD_KERNEL_CREATE
    721 uint32_t cycle = (uint32_t)hal_get_cycles();
     723uint32_t   cycle = (uint32_t)hal_get_cycles();
    722724if( DEBUG_THREAD_KERNEL_CREATE < cycle )
    723 printk("\n[DBG] %s : thread %x enter / requested_type %s / cycle %d\n",
    724 __FUNCTION__, CURRENT_THREAD, thread, thread_type_str(type), cycle );
     725printk("\n[%s] thread[%x,%x] enter / requested_type %s / cycle %d\n",
     726__FUNCTION__, this->process->pid, this->trdid, thread_type_str(type), cycle );
    725727#endif
    726728
     
    732734        printk("\n[ERROR] in %s : thread %x in process %x\n"
    733735        "   no memory for thread descriptor\n",
    734         __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
     736        __FUNCTION__, this->trdid, this->process->pid );
    735737        return ENOMEM;
    736738    }
     
    749751        printk("\n[ERROR] in %s : thread %x in process %x\n"
    750752        "   cannot initialize thread descriptor\n",
    751         __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
     753        __FUNCTION__, this->trdid, this->process->pid );
    752754        thread_release( thread );
    753755        return ENOMEM;
     
    760762    {
    761763        printk("\n[ERROR] in %s : thread %x in process %x\n"
    762         "   cannot cannot create CPU context\n",
    763         __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid );
     764        "    cannot create CPU context\n",
     765        __FUNCTION__, this->trdid, this->process->pid );
    764766        thread_release( thread );
    765767        return EINVAL;
     
    774776cycle = (uint32_t)hal_get_cycles();
    775777if( DEBUG_THREAD_KERNEL_CREATE < cycle )
    776 printk("\n[DBG] %s : thread %x exit / new_thread %x / type %s / cycle %d\n",
    777 __FUNCTION__, CURRENT_THREAD, thread, thread_type_str(type), cycle );
     778printk("\n[%s] thread[%x,%x] exit / new_thread %x / type %s / cycle %d\n",
     779__FUNCTION__, this->process->pid, this->trdid, thread, thread_type_str(type), cycle );
    778780#endif
    779781
     
    830832thread_t * this  = CURRENT_THREAD;
    831833if( DEBUG_THREAD_DESTROY < cycle )
    832 printk("\n[DBG] %s : thread[%x,%x] enter to destroy thread[%x,%x] / cycle %d\n",
     834printk("\n[%s] thread[%x,%x] enter to destroy thread[%x,%x] / cycle %d\n",
    833835__FUNCTION__, this->process->pid, this->trdid, process->pid, thread->trdid, cycle );
    834836#endif
     
    862864cycle = (uint32_t)hal_get_cycles();
    863865if( DEBUG_THREAD_DESTROY < cycle )
    864 printk("\n[DBG] %s : thread[%x,%x] exit / destroyed thread[%x,%x] / cycle %d\n",
     866printk("\n[%s] thread[%x,%x] exit / destroyed thread[%x,%x] / cycle %d\n",
    865867__FUNCTION__, this->process->pid, this->trdid, process->pid, thread->trdid, cycle );
    866868#endif
     
    944946uint32_t    cycle   = (uint32_t)hal_get_cycles();
    945947process_t * process = hal_remote_lpt( XPTR( cxy , &ptr->process ) );
     948thread_t  * this    = CURRENT_THREAD;
    946949if( DEBUG_THREAD_BLOCK < cycle )
    947 printk("\n[DBG] %s : thread %x in process %x blocked thread %x in process %x / cause %x\n",
    948 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
     950printk("\n[%s] thread[%x,%x] blocked thread %x in process %x / cause %x\n",
     951__FUNCTION__, this->process->pid, this->trdid,
    949952ptr->trdid, hal_remote_l32(XPTR( cxy , &process->pid )), cause );
    950953#endif
     
    967970uint32_t    cycle   = (uint32_t)hal_get_cycles();
    968971process_t * process = hal_remote_lpt( XPTR( cxy , &ptr->process ) );
     972thread_t  * this    = CURRENT_THREAD;
    969973if( DEBUG_THREAD_BLOCK < cycle )
    970 printk("\n[DBG] %s : thread %x in process %x unblocked thread %x in process %x / cause %x\n",
    971 __FUNCTION__, CURRENT_THREAD->trdid, CURRENT_THREAD->process->pid,
     974printk("\n[%s] thread[%x,%x] unblocked thread %x in process %x / cause %x\n",
     975__FUNCTION__, this->process->pid, this->trdid,
    972976ptr->trdid, hal_remote_l32(XPTR( cxy , &process->pid )), cause );
    973977#endif
     
    10161020uint32_t cycle  = (uint32_t)hal_get_cycles();
    10171021if( DEBUG_THREAD_DELETE < cycle )
    1018 printk("\n[DBG] %s : killer[%x,%x] enters / target[%x,%x] / cycle %d\n",
     1022printk("\n[%s] killer[%x,%x] enters / target[%x,%x] / cycle %d\n",
    10191023__FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid, 
    10201024target_ptr->process->pid, target_ptr->trdid, cycle );
     
    10751079cycle  = (uint32_t)hal_get_cycles;
    10761080if( DEBUG_THREAD_DELETE < cycle )
    1077 printk("\n[DBG] %s : killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",
     1081printk("\n[%s] killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",
    10781082__FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid,
    10791083target_ptr->process->pid, target_ptr->trdid, cycle );
     
    10981102cycle  = (uint32_t)hal_get_cycles;
    10991103if( DEBUG_THREAD_DELETE < cycle )
    1100 printk("\n[DBG] %s : killer[%x,%x] deschedules / target[%x,%x] not completed / cycle %d\n",
     1104printk("\n[%s] killer[%x,%x] deschedules / target[%x,%x] not completed / cycle %d\n",
    11011105__FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid,
    11021106target_ptr->process->pid, target_ptr->trdid, cycle );
     
    11171121cycle  = (uint32_t)hal_get_cycles;
    11181122if( DEBUG_THREAD_DELETE < cycle )
    1119 printk("\n[DBG] %s : killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",
     1123printk("\n[%s] killer[%x,%x] exit / target[%x,%x] marked after join / cycle %d\n",
    11201124__FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid,
    11211125target_ptr->process->pid, target_ptr->trdid, cycle );
     
    11351139cycle  = (uint32_t)hal_get_cycles;
    11361140if( DEBUG_THREAD_DELETE < cycle )
    1137 printk("\n[DBG] %s : killer[%x,%x] exit / target [%x,%x] marked / no join / cycle %d\n",
     1141printk("\n[%s] killer[%x,%x] exit / target [%x,%x] marked / no join / cycle %d\n",
    11381142__FUNCTION__, killer_ptr->process->pid, killer_ptr->trdid,
    11391143target_ptr->process->pid, target_ptr->trdid, cycle );
     
    11411145
    11421146    }
    1143 
    11441147}  // end thread_delete()
    11451148
     
    11621165uint32_t cycle = (uint32_t)hal_get_cycles();
    11631166if( DEBUG_THREAD_IDLE < cycle )
    1164 printk("\n[DBG] %s : idle thread on core[%x,%d] goes to sleep / cycle %d\n",
     1167printk("\n[%s] idle thread on core[%x,%d] goes to sleep / cycle %d\n",
    11651168__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle );
    11661169}
     
    11731176uint32_t cycle = (uint32_t)hal_get_cycles();
    11741177if( DEBUG_THREAD_IDLE < cycle )
    1175 printk("\n[DBG] %s : idle thread on core[%x,%d] wake up / cycle %d\n",
     1178printk("\n[%s] idle thread on core[%x,%d] wake up / cycle %d\n",
    11761179__FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, cycle );
    11771180}
     
    12371240thread_t * this = CURRENT_THREAD;
    12381241if( DEBUG_THREAD_GET_XPTR < cycle )
    1239 printk("\n[DBG] %s : thread %x in process %x enters / pid %x / trdid %x / cycle %d\n",
     1242printk("\n[%s] thread %x in process %x enters / pid %x / trdid %x / cycle %d\n",
    12401243__FUNCTION__, this->trdid, this->process->pid, pid, trdid, cycle );
    12411244#endif
     
    12621265#if( DEBUG_THREAD_GET_XPTR & 1 )
    12631266if( DEBUG_THREAD_GET_XPTR < cycle )
    1264 printk("\n[DBG]  %s : scan processes in cluster %x :\n", __FUNCTION__, target_cxy );
     1267printk("\n[%s] scan processes in cluster %x :\n", __FUNCTION__, target_cxy );
    12651268#endif
    12661269
     
    12951298#if( DEBUG_THREAD_GET_XPTR & 1 )
    12961299if( DEBUG_THREAD_GET_XPTR < cycle )
    1297 printk("\n[DBG] %s : pid %x not found in cluster %x\n",
     1300printk("\n[%s] pid %x not found in cluster %x\n",
    12981301__FUNCTION__, pid, target_cxy );
    12991302#endif
     
    13101313#if( DEBUG_THREAD_GET_XPTR & 1 )
    13111314if( DEBUG_THREAD_GET_XPTR < cycle )
    1312 printk("\n[DBG] %s : thread %x not registered in process %x in cluster %x\n",
     1315printk("\n[%s] thread %x not registered in process %x in cluster %x\n",
    13131316__FUNCTION__, trdid, pid, target_cxy );
    13141317#endif
     
    13191322cycle  = (uint32_t)hal_get_cycles();
    13201323if( DEBUG_THREAD_GET_XPTR < cycle )
    1321 printk("\n[DBG] %s : thread %x in process %x exit / pid %x / trdid %x / cycle %d\n",
     1324printk("\n[%s] thread %x in process %x exit / pid %x / trdid %x / cycle %d\n",
    13221325__FUNCTION__, this->trdid, this->process->pid, pid, trdid, cycle );
    13231326#endif
     
    13471350
    13481351        // display error message on TXT0
    1349         nolock_printk("\n[PANIC] in %s / thread %x in process %x [%x] cannot yield : "
     1352        nolock_printk("\n[PANIC] in %s / thread[%x,%x] cannot yield : "
    13501353        "hold %d busylock(s) / cycle %d\n",
    1351         func_str, thread->trdid, thread->process->pid, thread,
     1354        func_str, thread->process->pid, thread->trdid,
    13521355        thread->busylocks, (uint32_t)hal_get_cycles() );
    13531356
Note: See TracChangeset for help on using the changeset viewer.