Changeset 581 for trunk/kernel/syscalls/sys_barrier.c
- Timestamp:
- Oct 10, 2018, 3:11:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_barrier.c
r508 r581 31 31 #include <remote_barrier.h> 32 32 33 #if DEBUG_SYS_BARRIER 34 ////////////////////////////////////////////////////// 35 static char * sys_barrier_op_str( uint32_t operation ) 36 { 37 if ( operation == BARRIER_INIT ) return "INIT"; 38 else if( operation == BARRIER_DESTROY ) return "DESTROY"; 39 else if( operation == BARRIER_WAIT ) return "WAIT"; 40 else return "undefined"; 41 } 42 #endif 43 33 44 ////////////////////////////////// 34 45 int sys_barrier( void * vaddr, … … 41 52 thread_t * this = CURRENT_THREAD; 42 53 process_t * process = this->process; 54 55 #if DEBUG_SYS_BARRIER 56 uint64_t tm_start; 57 uint64_t tm_end; 58 tm_start = hal_get_cycles(); 59 if( DEBUG_SYS_BARRIER < tm_start ) 60 printk("\n[DBG] %s : thread %x in process %x enter for %s / count %d / cycle %d\n", 61 __FUNCTION__, this->trdid, process->pid, sys_barrier_op_str(operation), count, 62 (uint32_t)tm_start ); 63 #endif 43 64 44 65 // check vaddr in user vspace … … 125 146 } // end switch 126 147 148 #if DEBUG_SYS_BARRIER 149 tm_end = hal_get_cycles(); 150 if( DEBUG_SYS_BARRIER < tm_end ) 151 printk("\n[DBG] %s : thread %x in process %x exit for %s / cost %d / cycle %d\n", 152 __FUNCTION__, this->trdid, process->pid, sys_barrier_op_str(operation), 153 (uint32_t)(tm_end - tm_start), (uint32_t)tm_end ); 154 #endif 155 127 156 return 0; 128 157
Note: See TracChangeset
for help on using the changeset viewer.