Changeset 436 for trunk/kernel/syscalls/sys_fg.c
- Timestamp:
- Mar 7, 2018, 9:02:03 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_fg.c
r421 r436 45 45 thread_t * this = CURRENT_THREAD; 46 46 47 #if CONFIG_ SYSCALL_DEBUG47 #if CONFIG_DEBUG_SYS_FG 48 48 uint64_t tm_start; 49 49 uint64_t tm_end; 50 50 tm_start = hal_get_cycles(); 51 printk("\n[DBG] %s : core[%x,%d] enter / process %x / cycle %d\n", 52 __FUNCTION__ , local_cxy , this->core->lid , pid, (uint32_t)tm_start ); 51 if( CONFIG_DEBUG_SYS_FG < tm_start ) 52 printk("\n[DBG] %s : thread %x enter / process %x / cycle %d\n", 53 __FUNCTION__ , CURRENT_THREAD , pid, (uint32_t)tm_start ); 53 54 #endif 54 55 … … 58 59 if( process_xp == XPTR_NULL ) 59 60 { 60 syscall_dmsg("\n[ERROR] in %s : process %x not found\n", 61 __FUNCTION__ , pid ); 61 62 #if CONFIG_DEBUG_SYSCALLS_ERROR 63 printk("\n[ERROR] in %s : process %x not found\n", __FUNCTION__ , pid ); 64 #endif 62 65 this->errno = EINVAL; 63 66 return -1; … … 72 75 73 76 // get chdev cluster and local pointer 74 chdev_ptr = (chdev_t *)GET_PTR( chdev_xp );77 chdev_ptr = GET_PTR( chdev_xp ); 75 78 chdev_cxy = GET_CXY( chdev_xp ); 76 79 … … 80 83 hal_fence(); 81 84 82 #if CONFIG_ SYSCALL_DEBUG85 #if CONFIG_DEBUG_SYS_FG 83 86 tm_end = hal_get_cycles(); 84 printk("\n[DBG] %s : core[%x,%d] exit / process %x / cost = %d\n", 85 __FUNCTION__ , local_cxy , this->core->lid , pid, (uint32_t)(tm_end - tm_start) ); 87 if( CONFIG_DEBUG_SYS_FG < tm_end ) 88 printk("\n[DBG] %s : thread %x exit / process %x get TXT_%d ownership / cycle %d\n", 89 __FUNCTION__ , CURRENT_THREAD , pid, 90 hal_remote_lw( XPTR( chdev_cxy , &chdev_ptr->channel ) ) , (uint32_t)tm_end ); 86 91 #endif 87 92 88 93 return 0; 89 94 90 } // end sys_ kill()95 } // end sys_fg() 91 96
Note: See TracChangeset
for help on using the changeset viewer.