Changeset 670 for trunk/kernel/syscalls/sys_readdir.c
- Timestamp:
- Nov 19, 2020, 11:45:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_readdir.c
r637 r670 2 2 * sys_readdir.c - Copy one entry from an open VFS directory to an user buffer. 3 3 * 4 * Author Alain Greiner (2016,2017,2018,2019 )4 * Author Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 51 51 process_t * process = this->process; // client process 52 52 53 #if (DEBUG_SYS_READDIR || CONFIG_INSTRUMENTATION_SYSCALLS)53 #if (DEBUG_SYS_READDIR || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS) 54 54 uint64_t tm_start = hal_get_cycles(); 55 55 #endif … … 61 61 #endif 62 62 63 // check buffer in user space63 // check dirent buffer in user space 64 64 error = vmm_get_vseg( process , (intptr_t)buffer, &vseg ); 65 65 … … 68 68 69 69 #if DEBUG_SYSCALLS_ERROR 70 printk("\n[ERROR] in %s / thread[%x,%x] : user buffer %x unmapped\n", 70 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 71 printk("\n[ERROR] in %s : thread[%x,%x] / dirent user buffer %x unmapped\n", 71 72 __FUNCTION__ , process->pid , this->trdid, buffer ); 72 73 #endif … … 84 85 85 86 #if DEBUG_SYSCALLS_ERROR 86 printk("\n[ERROR] in %s / thread[%x,%x] : dirp %x not registered\n", 87 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 88 printk("\n[ERROR] in %s : thread[%x,%x] / dirp %x not registered\n", 87 89 __FUNCTION__ , process->pid , this->trdid, dirp ); 88 90 #endif … … 106 108 107 109 #if (DEBUG_SYS_READDIR & 1) 108 if( DEBUG_SYS_READDIR < tm_start )110 if( DEBUG_SYS_READDIR < (uint32_t)tm_start ) 109 111 printk("\n[%s] entries = %d / current = %d / direntp = %x\n", 110 112 __FUNCTION__, entries, current, direntp ); … … 126 128 127 129 #if DEBUG_SYS_READDIR 128 if( DEBUG_SYS_READDIR < tm_end )130 if( DEBUG_SYS_READDIR < (uint32_t)tm_end ) 129 131 printk("\n[%s] thread[%x,%x] exit / cycle %d\n", 130 132 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_end );
Note: See TracChangeset
for help on using the changeset viewer.