Changeset 436 for trunk/kernel/kern/cluster.c
- Timestamp:
- Mar 7, 2018, 9:02:03 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/cluster.c
r433 r436 237 237 { 238 238 xptr_t root_xp; // xptr on root of list of processes in owner cluster 239 xptr_t lock_xp; // xptr ron lock protecting this list239 xptr_t lock_xp; // xptr on lock protecting this list 240 240 xptr_t iter_xp; // iterator 241 241 xptr_t current_xp; // xptr on current process descriptor … … 277 277 if( found ) return current_xp; 278 278 else return XPTR_NULL; 279 } 279 280 } // end cluster_get_owner_process_from_pid() 280 281 281 282 ////////////////////////////////////////////////////////// … … 440 441 void cluster_process_copies_link( process_t * process ) 441 442 { 442 uint32_tirq_state;443 reg_t irq_state; 443 444 pmgr_t * pm = &LOCAL_CLUSTER->pmgr; 445 446 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES 447 uint32_t cycle = (uint32_t)hal_get_cycles(); 448 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 449 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n", 450 __FUNCTION__ , local_cxy , process , cycle ); 451 #endif 444 452 445 453 // get owner cluster identifier CXY and process LPID … … 460 468 remote_spinlock_lock_busy( copies_lock , &irq_state ); 461 469 470 // add copy to copies_list 462 471 xlist_add_first( copies_root , copies_entry ); 463 472 hal_remote_atomic_add( XPTR( owner_cxy , &pm->copies_nr[lpid] ) , 1 ); … … 465 474 // release lock protecting copies_list[lpid] 466 475 remote_spinlock_unlock_busy( copies_lock , irq_state ); 467 } 476 477 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES 478 cycle = (uint32_t)hal_get_cycles(); 479 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 480 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n", 481 __FUNCTION__ , local_cxy , process , cycle ); 482 #endif 483 484 } // end cluster_process_copies_link() 468 485 469 486 ///////////////////////////////////////////////////////// … … 472 489 uint32_t irq_state; 473 490 pmgr_t * pm = &LOCAL_CLUSTER->pmgr; 491 492 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES 493 uint32_t cycle = (uint32_t)hal_get_cycles(); 494 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 495 printk("\n[DBG] %s enters / cluster %x / process %x / cycle %d\n", 496 __FUNCTION__ , local_cxy , process , cycle ); 497 #endif 474 498 475 499 // get owner cluster identifier CXY and process LPID … … 479 503 480 504 // get extended pointer on lock protecting copies_list[lpid] 481 xptr_t copies_lock = hal_remote_lwd( XPTR( owner_cxy , &pm->copies_lock[lpid] ));505 xptr_t copies_lock = XPTR( owner_cxy , &pm->copies_lock[lpid] ); 482 506 483 507 // get extended pointer on the local copies_list entry … … 487 511 remote_spinlock_lock_busy( copies_lock , &irq_state ); 488 512 513 // remove copy from copies_list 489 514 xlist_unlink( copies_entry ); 490 515 hal_remote_atomic_add( XPTR( owner_cxy , &pm->copies_nr[lpid] ) , -1 ); … … 492 517 // release lock protecting copies_list[lpid] 493 518 remote_spinlock_unlock_busy( copies_lock , irq_state ); 494 } 519 520 #if CONFIG_DEBUG_CLUSTER_PROCESS_COPIES 521 cycle = (uint32_t)hal_get_cycles(); 522 if( CONFIG_DEBUG_CLUSTER_PROCESS_COPIES < cycle ) 523 printk("\n[DBG] %s exit / cluster %x / process %x / cycle %d\n", 524 __FUNCTION__ , local_cxy , process , cycle ); 525 #endif 526 527 } // end cluster_process_copies_unlink() 495 528 496 529 ///////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.