Changeset 437 for trunk/kernel/syscalls/sys_munmap.c
- Timestamp:
- Mar 28, 2018, 2:40:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_munmap.c
r410 r437 3 3 * 4 4 * Authors Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Alain Greiner (2016,2017 )5 * Alain Greiner (2016,2017,2018) 6 6 * 7 7 * Copyright (c) UPMC Sorbonne Universites … … 40 40 error_t error; 41 41 42 uint32_t tm_start;43 uint32_t tm_end;44 45 tm_start = hal_get_cycles();46 47 42 thread_t * this = CURRENT_THREAD; 48 43 process_t * process = this->process; 44 45 #if CONFIG_DEBUG_SYS_MUNMAP 46 uint64_t tm_start; 47 uint64_t tm_end; 48 tm_start = hal_get_cycles(); 49 if( CONFIG_DEBUG_SYS_MUNMAP < tm_start ) 50 printk("\n[DBG] %s : thread %x enter / process %x / cycle %d\n" 51 __FUNCTION__ , this, process->pid, (uint32_t)tm_start ); 52 #endif 49 53 50 54 // call relevant kernel function … … 53 57 if ( error ) 54 58 { 55 printk("\n[ERROR] in %s : cannot remove mapping\n", __FUNCTION__ ); 59 60 #if CONFIG_DEBUG_SYSCALLS_ERROR 61 printk("\n[ERROR] in %s : cannot remove mapping\n", __FUNCTION__ ); 62 #endif 56 63 this->errno = EINVAL; 57 64 return -1; 58 65 } 59 66 60 tm_end = hal_get_cycles(); 67 #if CONFIG_DEBUG_SYS_MUNMAP 68 tm_end = hal_get_cycles(); 69 if( CONFIG_DEBUG_SYS_MUNMAP < tm_start ) 70 printk("\n[DBG] %s : thread %x exit / process %x / cycle %d\n" 71 __FUNCTION__ , this, process->pid, (uint32_t)tm_end ); 72 #endif 61 73 62 syscall_dmsg("\n[DBG] %s : core[%x,%d] removed vseg in process %x / cycle %d\n" 63 " base = %x / size = %x / cost = %d\n", 64 __FUNCTION__, local_cxy , this->core->lid , process->pid , tm_start , 65 vaddr , size , tm_end - tm_start ); 74 return 0; 66 75 67 return 0; 76 } // end sys_munmap() 68 77 69 } // end sys_mmap()70
Note: See TracChangeset
for help on using the changeset viewer.