Changeset 683 for trunk/kernel/syscalls/sys_timeofday.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_timeofday.c
r637 r683 2 2 * sys_timeofday.c - Get current time 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 … … 32 32 #include <core.h> 33 33 #include <shared_syscalls.h> 34 35 34 #include <syscalls.h> 36 35 … … 50 49 process_t * process = this->process; 51 50 52 #if (DEBUG_SYS_TIMEOFDAY || CONFIG_INSTRUMENTATION_SYSCALLS)51 #if DEBUG_SYS_TIMEOFDAY || DEBUG_SYSCALLS_ERROR || CONFIG_INSTRUMENTATION_SYSCALLS 53 52 uint64_t tm_start = hal_get_cycles(); 54 53 #endif 55 54 56 55 #if DEBUG_SYS_TIMEOFDAY 57 if( DEBUG_SYS_TIMEOFDAY < tm_start )56 if( DEBUG_SYS_TIMEOFDAY < (uint32_t)tm_start ) 58 57 printk("\n[%s] thread[%x,%x] enter / cycle %d\n", 59 58 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_start ); … … 65 64 66 65 #if DEBUG_SYSCALLS_ERROR 67 printk("\n[ERROR] in %s for thread %x in process %x : tz argument must be NULL\n", 66 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 67 printk("\n[ERROR] in %s : thread[%x,%x] / tz argument must be NULL\n", 68 68 __FUNCTION__ , this->trdid , process->pid ); 69 69 #endif … … 79 79 80 80 #if DEBUG_SYSCALLS_ERROR 81 printk("\n[ERROR] in %s : user buffer tz unmapped / thread %x / process %x\n", 82 __FUNCTION__ , (intptr_t)tz , this->trdid , process->pid ); 81 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 82 printk("\n[ERROR] in %s : thread[%x,%x] / user buffer tv unmapped\n", 83 __FUNCTION__ , this->trdid , process->pid , (intptr_t)tz ); 83 84 #endif 84 85 this->errno = EINVAL;
Note: See TracChangeset
for help on using the changeset viewer.