Changeset 641 for trunk/kernel/syscalls
- Timestamp:
- Oct 10, 2019, 1:42:04 PM (5 years ago)
- Location:
- trunk/kernel/syscalls
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/shared_include/shared_almos.h
r626 r641 58 58 display_type_t; 59 59 60 /******************************************************************************************* 61 * This structure defines the - user accessible - information stored in a thread. 62 ******************************************************************************************/ 63 64 typedef struct thread_info_s 65 { 66 unsigned long false_pgfault_nr; /*! number of local page fault */ 67 unsigned long false_pgfault_cost; /*! cumulated cost */ 68 unsigned long false_pgfault_max; /*! max cost of a local page fault */ 69 70 unsigned long local_pgfault_nr; /*! number of local page fault */ 71 unsigned long local_pgfault_cost; /*! cumulated cost */ 72 unsigned long local_pgfault_max; /*! max cost of a false page fault */ 73 74 unsigned long global_pgfault_nr; /*! number of global page fault */ 75 unsigned long global_pgfault_cost; /*! cumulated cost */ 76 unsigned long global_pgfault_max; /*! max cost of a global page fault */ 77 78 unsigned long long last_cycle; /*! last cycle counter value (date) */ 79 unsigned long long usr_cycles; /*! user execution duration (cycles) */ 80 unsigned long long sys_cycles; /*! system execution duration (cycles) */ 81 } 82 thread_info_t; 60 83 61 84 #endif /* _SHARED_ALMOS_H_ */ -
trunk/kernel/syscalls/shared_include/syscalls_numbers.h
r637 r641 31 31 typedef enum 32 32 { 33 SYS_THREAD_EXIT = 0,34 SYS_THREAD_YIELD = 1,35 SYS_THREAD_CREATE = 2,36 SYS_THREAD_JOIN = 3,37 SYS_THREAD_DETACH = 4,38 SYS_THREAD_CANCEL = 5,39 SYS_SEM = 6,40 SYS_CONDVAR = 7,41 SYS_BARRIER = 8,42 SYS_MUTEX = 9,33 SYS_THREAD_EXIT = 0, 34 SYS_THREAD_YIELD = 1, 35 SYS_THREAD_CREATE = 2, 36 SYS_THREAD_JOIN = 3, 37 SYS_THREAD_DETACH = 4, 38 SYS_THREAD_CANCEL = 5, 39 SYS_SEM = 6, 40 SYS_CONDVAR = 7, 41 SYS_BARRIER = 8, 42 SYS_MUTEX = 9, 43 43 44 SYS_RENAME = 10,45 SYS_MUNMAP = 11,46 SYS_OPEN = 12,47 SYS_MMAP = 13,48 SYS_READ = 14,49 SYS_WRITE = 15,50 SYS_LSEEK = 16,51 SYS_CLOSE = 17,52 SYS_UNLINK = 18,53 SYS_PIPE = 19,44 SYS_RENAME = 10, 45 SYS_MUNMAP = 11, 46 SYS_OPEN = 12, 47 SYS_MMAP = 13, 48 SYS_READ = 14, 49 SYS_WRITE = 15, 50 SYS_LSEEK = 16, 51 SYS_CLOSE = 17, 52 SYS_UNLINK = 18, 53 SYS_PIPE = 19, 54 54 55 SYS_CHDIR = 20,56 SYS_MKDIR = 21,57 SYS_MKFIFO = 22,58 SYS_OPENDIR = 23,59 SYS_READDIR = 24,60 SYS_CLOSEDIR = 25,61 SYS_GETCWD = 26,62 SYS_ISATTY = 27,63 SYS_ALARM = 28,64 SYS_RMDIR = 29,55 SYS_CHDIR = 20, 56 SYS_MKDIR = 21, 57 SYS_MKFIFO = 22, 58 SYS_OPENDIR = 23, 59 SYS_READDIR = 24, 60 SYS_CLOSEDIR = 25, 61 SYS_GETCWD = 26, 62 SYS_ISATTY = 27, 63 SYS_ALARM = 28, 64 SYS_RMDIR = 29, 65 65 66 SYS_UTLS = 30,67 SYS_CHMOD = 31,68 SYS_SIGNAL = 32,69 SYS_TIMEOFDAY = 33,70 SYS_KILL = 34,71 SYS_GETPID = 35,72 SYS_FORK = 36,73 SYS_EXEC = 37,74 SYS_STAT = 38,75 SYS_WAIT = 39,66 SYS_UTLS = 30, 67 SYS_CHMOD = 31, 68 SYS_SIGNAL = 32, 69 SYS_TIMEOFDAY = 33, 70 SYS_KILL = 34, 71 SYS_GETPID = 35, 72 SYS_FORK = 36, 73 SYS_EXEC = 37, 74 SYS_STAT = 38, 75 SYS_WAIT = 39, 76 76 77 SYS_GET_CONFIG = 40,78 SYS_GET_CORE_ID = 41,79 SYS_GET_CYCLE = 42,80 SYS_DISPLAY = 43,81 SYS_PLACE_FORK = 44,82 SYS_THREAD_SLEEP = 45,83 SYS_THREAD_WAKEUP = 46,84 SYS_TRACE = 47,85 SYS_FG = 48,86 SYS_IS_FG = 49,77 SYS_GET_CONFIG = 40, 78 SYS_GET_CORE_ID = 41, 79 SYS_GET_CYCLE = 42, 80 SYS_DISPLAY = 43, 81 SYS_PLACE_FORK = 44, 82 SYS_THREAD_SLEEP = 45, 83 SYS_THREAD_WAKEUP = 46, 84 SYS_TRACE = 47, 85 SYS_FG = 48, 86 SYS_IS_FG = 49, 87 87 88 SYS_EXIT = 50, 89 SYS_SYNC = 51, 90 SYS_FSYNC = 52, 91 SYS_GET_BEST_CORE = 53, 92 SYS_GET_NB_CORES = 54, 88 SYS_EXIT = 50, 89 SYS_SYNC = 51, 90 SYS_FSYNC = 52, 91 SYS_GET_BEST_CORE = 53, 92 SYS_GET_NB_CORES = 54, 93 SYS_GET_THREAD_INFO = 55, 93 94 94 SYSCALLS_NR = 55,95 SYSCALLS_NR = 56, 95 96 96 97 } syscalls_t; -
trunk/kernel/syscalls/sys_munmap.c
r640 r641 54 54 #if DEBUG_SYS_MUNMAP 55 55 if( DEBUG_SYS_MUNMAP < tm_start ) 56 printk("\n[ DBG] %s : thread %x enter / process %x/ cycle %d\n",57 __FUNCTION__ , this, process->pid, (uint32_t)tm_start );56 printk("\n[%s] thread[%x,%x] enter / cycle %d\n", 57 __FUNCTION__, process->pid, this->trdid, (uint32_t)tm_start ); 58 58 #endif 59 59 … … 95 95 return -1; 96 96 } 97 else if( (vseg_min == addr_min) && (vseg_m in == vseg_max) )97 else if( (vseg_min == addr_min) && (vseg_max == addr_max) ) 98 98 { 99 99 100 100 #if( DEBUG_SYS_MUNMAP & 1 ) 101 if( DEBUG_SYS_MUNMAP < cycle)102 printk("\n[%s] unmapped region[%x->%x[ / vseg[%x->%x[ => vseg deleted\n",103 __FUNCTION__, addr_min, addr_max, vseg_min, vseg_max );101 if( DEBUG_SYS_MUNMAP < tm_start ) 102 printk("\n[%s] thread[%x,%x] unmapped region[%x->%x[ / vseg[%x->%x[ => delete vseg\n", 103 __FUNCTION__, process->pid, this->trdid, addr_min, addr_max, vseg_min, vseg_max ); 104 104 #endif 105 105 // delete existing vseg … … 107 107 vseg_min ); 108 108 } 109 else if( (vseg_min == addr_min) || (vseg_m in == vseg_max) )109 else if( (vseg_min == addr_min) || (vseg_max == addr_max) ) 110 110 { 111 111 112 112 #if( DEBUG_SYS_MUNMAP & 1 ) 113 if( DEBUG_SYS_MUNMAP < cycle)114 printk("\n[%s] unmapped region[%x->%x[ / vseg[%x->%x[ => vseg resized\n",115 __FUNCTION__, addr_min, addr_max, vseg_min, vseg_max );113 if( DEBUG_SYS_MUNMAP < tm_start ) 114 printk("\n[%s] thread[%x,%x] unmapped region[%x->%x[ / vseg[%x->%x[ => resize vseg\n", 115 __FUNCTION__, process->pid, this->trdid, addr_min, addr_max, vseg_min, vseg_max ); 116 116 #endif 117 117 // resize existing vseg … … 121 121 addr_max - addr_min ); 122 122 } 123 else // vseg_min < addr_min) && (addr_max < vseg_max)123 else // addr_min > vseg_min) && (addr_max < vseg_max) 124 124 { 125 125 126 126 #if( DEBUG_SYS_MUNMAP & 1 ) 127 if( DEBUG_SYS_MUNMAP < cycle)128 printk("\n[%s] unmapped region[%x->%x[ / vseg[%x->%x[ => vseg resized & new vseg created\n",129 __FUNCTION__, addr_min, addr_max, vseg_min, vseg_max );127 if( DEBUG_SYS_MUNMAP < tm_start ) 128 printk("\n[%s] thread[%x,%x] unmapped region[%x->%x[ / vseg[%x->%x[ => create new vseg\n", 129 __FUNCTION__, process->pid, this->trdid, addr_min, addr_max, vseg_min, vseg_max ); 130 130 #endif 131 131 // resize existing vseg … … 160 160 #if DEBUG_SYS_MUNMAP 161 161 if( DEBUG_SYS_MUNMAP < tm_start ) 162 printk("\n[ DBG] %s : thread %x exit / process %x/ cycle %d\n",163 __FUNCTION__ , this, process->pid, (uint32_t)tm_end );162 printk("\n[%s] thread [%x,%x] exit / cycle %d\n", 163 __FUNCTION__ , process->pid, this->trdid, (uint32_t)tm_end ); 164 164 #endif 165 165 -
trunk/kernel/syscalls/syscalls.h
r640 r641 733 733 uint32_t * ncores ); 734 734 735 /****************************************************************************************** 736 * [55] This function implements the non-standard "get_thread_info" syscall. 737 * It copies in the user structure defined by the <info> argument the values registered 738 * in the calling thread "thread_info_t" kernel structure. 739 ****************************************************************************************** 740 * @ info : [out] pointer on thread_info_t structure in user space. 741 * @ return 0 if success / return -1 if illegal argument. 742 *****************************************************************************************/ 743 int sys_get_thread_info( thread_info_t * info ); 744 735 745 #endif // _SYSCALLS_H_
Note: See TracChangeset
for help on using the changeset viewer.