Changeset 683 for trunk/kernel/syscalls/sys_thread_exit.c
- Timestamp:
- Jan 13, 2021, 12:36:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/sys_thread_exit.c
r670 r683 2 2 * sys_thread_exit.c - terminates the execution of calling thread 3 3 * 4 * Authors Alain Greiner (2016,2017,2018,2019 )4 * Authors Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 44 44 pid_t pid = process->pid; 45 45 46 #if DEBUG_SYS_THREAD_EXIT || DEBUG_SYSCALLS_ERROR 47 uint64_t tm_start = hal_get_cycles(); 48 #endif 49 46 50 // check exit_value pointer in user space if required 47 51 if( exit_status != NULL ) … … 53 57 54 58 #if DEBUG_SYSCALLS_ERROR 55 printk("\n[ERROR] in %s : exit_status buffer %x unmapped / thread[%x,%x]\n", 56 __FUNCTION__, (intptr_t)exit_status, process->pid, this->trdid ); 59 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 60 printk("\n[WARNING] in %s : exit_status buffer %x unmapped / thread[%x,%x]\n", 61 __FUNCTION__, (intptr_t)exit_status, pid, trdid ); 57 62 #endif 58 63 this->errno = EINVAL; … … 67 72 68 73 #if DEBUG_SYSCALLS_ERROR 69 printk("\n[ERROR] in %s : busylocks count = %d / thread[%x,%x]\n", 70 __FUNCTION__ , count, process->pid, this->trdid ); 74 if( DEBUG_SYSCALLS_ERROR < (uint32_t)tm_start ) 75 printk("\n[WARNING] in %s : busylocks count = %d / thread[%x,%x]\n", 76 __FUNCTION__ , count, pid, trdid ); 71 77 #endif 72 78 this->errno = EINVAL; … … 84 90 85 91 #if DEBUG_SYS_THREAD_EXIT 86 uint64_t tm_start = hal_get_cycles(); 87 if( DEBUG_SYS_THREAD_EXIT < tm_start ) 92 if( DEBUG_SYS_THREAD_EXIT < (uint32_t)tm_start ) 88 93 printk("\n[%s] thread[%x,%x] is main => delete process / cycle %d\n", 89 94 __FUNCTION__ , pid , trdid , (uint32_t)tm_start ); … … 96 101 97 102 #if DEBUG_SYS_THREAD_EXIT 98 uint64_t tm_start = hal_get_cycles(); 99 if( DEBUG_SYS_THREAD_EXIT < tm_start ) 103 if( DEBUG_SYS_THREAD_EXIT < (uint32_t)tm_start ) 100 104 printk("\n[%s] thread[%x,%x] is not main => delete thread / cycle %d\n", 101 105 __FUNCTION__ , pid , trdid , (uint32_t)tm_start );
Note: See TracChangeset
for help on using the changeset viewer.