Changeset 459 for trunk/kernel/syscalls/sys_open.c
- Timestamp:
- Aug 13, 2018, 1:43:20 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_open.c
r457 r459 46 46 process_t * process = this->process; 47 47 48 #if DEBUG_SYS_OPEN 49 uint32_t tm_start; 50 uint32_t tm_end; 51 tm_start = hal_get_cycles(); 52 #endif 53 48 54 // check fd_array not full 49 55 if( process_fd_array_full() ) … … 66 72 hal_strcpy_from_uspace( kbuf , pathname , CONFIG_VFS_MAX_PATH_LENGTH ); 67 73 74 #if DEBUG_SYS_OPEN 75 if( DEBUG_SYS_OPEN < tm_start ) 76 printk("\n[DBG] %s : thread %x in process %x enter / path %s / flags %x / cycle %d\n", 77 __FUNCTION__, this->trdid, process->pid, kbuf, flags, (uint32_t)tm_start ); 78 #endif 79 68 80 // get cluster and local pointer on reference process 69 81 xptr_t ref_xp = process->ref_xp; … … 87 99 if( error ) 88 100 { 89 printk("\n[ERROR] in %s : cannot create file descriptor\n", __FUNCTION__ ); 101 printk("\n[ERROR] in %s : cannot create file descriptor for %s\n", 102 __FUNCTION__ , kbuf ); 90 103 this->errno = ENFILE; 91 104 return -1; … … 97 110 remote_spinlock_unlock( XPTR( local_cxy , &process->fd_array.lock ) ); 98 111 112 hal_fence(); 113 114 #if DEBUG_SYS_OPEN 115 tm_end = hal_get_cycles(); 116 if( DEBUG_SYS_OPEN < tm_start ) 117 printk("\n[DBG] %s : thread %x in process %x exit / cost %d / cycle %d\n", 118 __FUNCTION__, this->trdid, process->pid, (uint32_t)(tm_end - tm_start), (uint32_t)tm_start ); 119 #endif 120 99 121 return file_id; 100 122 }
Note: See TracChangeset
for help on using the changeset viewer.