Changeset 440 for trunk/kernel/syscalls/sys_get_core.c
- Timestamp:
- May 3, 2018, 5:51:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_get_core.c
r410 r440 37 37 uint32_t * lid ) 38 38 { 39 paddr_t paddr; 39 error_t error; 40 vseg_t * vseg; 40 41 uint32_t k_cxy; 41 42 uint32_t k_lid; 42 43 error_t error = 0;44 43 45 44 thread_t * this = CURRENT_THREAD; 46 45 process_t * process = this->process; 47 46 48 // check buffers in user space 49 error |= vmm_v2p_translate( false , cxy , &paddr ); 50 error |= vmm_v2p_translate( false , lid , &paddr ); 47 // check cxy buffer in user space 48 error = vmm_get_vseg( process , (intptr_t)cxy , &vseg ); 51 49 52 50 if( error ) 53 51 { 54 printk("\n[ERROR] in %s : user buffer unmapped for thread %x in process %x\n", 55 __FUNCTION__ , this->trdid , process->pid ); 52 53 #if DEBUG_SYSCALLS_ERROR 54 printk("\n[ERROR] in %s : cxy buffer unmapped %x / thread %x / process %x\n", 55 __FUNCTION__ , (intptr_t)cxy , this->trdid , process->pid ); 56 vmm_display( process , false ); 57 #endif 58 this->errno = EFAULT; 59 return -1; 60 } 61 62 // check lid buffer in user space 63 error = vmm_get_vseg( process , (intptr_t)lid , &vseg ); 64 65 if( error ) 66 { 67 68 #if DEBUG_SYSCALLS_ERROR 69 printk("\n[ERROR] in %s : lid buffer unmapped %x / thread %x / process %x\n", 70 __FUNCTION__ , (intptr_t)lid , this->trdid , process->pid ); 71 vmm_display( process , false ); 72 #endif 56 73 this->errno = EFAULT; 57 74 return -1;
Note: See TracChangeset
for help on using the changeset viewer.