Changeset 438 for trunk/kernel/libk
- Timestamp:
- Apr 4, 2018, 2:49:02 PM (7 years ago)
- Location:
- trunk/kernel/libk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/elf.c
r433 r438 201 201 vfs_file_count_up( file_xp ); 202 202 203 #if CONFIG_DEBUG_ELF_LOAD203 #if DEBUG_ELF_LOAD 204 204 uint32_t cycle = (uint32_t)hal_get_cycles(); 205 if( CONFIG_DEBUG_ELF_LOAD < cycle )205 if( DEBUG_ELF_LOAD < cycle ) 206 206 printk("\n[DBG] %s : found %s vseg / base %x / size %x\n" 207 207 " file_size %x / file_offset %x / mapper_xp %l / cycle %d\n", … … 228 228 error_t error; 229 229 230 #if CONFIG_DEBUG_ELF_LOAD230 #if DEBUG_ELF_LOAD 231 231 uint32_t cycle = (uint32_t)hal_get_cycles(); 232 if( CONFIG_DEBUG_ELF_LOAD < cycle )232 if( DEBUG_ELF_LOAD < cycle ) 233 233 printk("\n[DBG] %s : thread %d enter for <%s> / cycle %d\n", 234 234 __FUNCTION__, CURRENT_THREAD, pathname, cycle ); … … 252 252 } 253 253 254 #if ( CONFIG_DEBUG_ELF_LOAD & 1)255 if( CONFIG_DEBUG_ELF_LOAD < cycle )254 #if (DEBUG_ELF_LOAD & 1) 255 if( DEBUG_ELF_LOAD < cycle ) 256 256 printk("\n[DBG] %s : open file <%s>\n", __FUNCTION__, pathname ); 257 257 #endif … … 268 268 } 269 269 270 #if ( CONFIG_DEBUG_ELF_LOAD & 1)271 if( CONFIG_DEBUG_ELF_LOAD < cycle )270 #if (DEBUG_ELF_LOAD & 1) 271 if( DEBUG_ELF_LOAD < cycle ) 272 272 printk("\n[DBG] %s : loaded elf header for %s\n", __FUNCTION__ , pathname ); 273 273 #endif … … 308 308 } 309 309 310 #if ( CONFIG_DEBUG_ELF_LOAD & 1)311 if( CONFIG_DEBUG_ELF_LOAD < cycle )310 #if (DEBUG_ELF_LOAD & 1) 311 if( DEBUG_ELF_LOAD < cycle ) 312 312 printk("\n[DBG] %s : segments array allocated for %s\n", __FUNCTION__ , pathname ); 313 313 #endif … … 328 328 } 329 329 330 #if ( CONFIG_DEBUG_ELF_LOAD & 1)331 if( CONFIG_DEBUG_ELF_LOAD < cycle )330 #if (DEBUG_ELF_LOAD & 1) 331 if( DEBUG_ELF_LOAD < cycle ) 332 332 printk("\n[DBG] %s loaded segments descriptors for %s \n", __FUNCTION__ , pathname ); 333 333 #endif … … 356 356 kmem_free(&req); 357 357 358 #if CONFIG_DEBUG_ELF_LOAD358 #if DEBUG_ELF_LOAD 359 359 cycle = (uint32_t)hal_get_cycles(); 360 if( CONFIG_DEBUG_ELF_LOAD < cycle )360 if( DEBUG_ELF_LOAD < cycle ) 361 361 printk("\n[DBG] %s : thread %d exit for <%s> / entry_point %x / cycle %d\n", 362 362 __FUNCTION__, CURRENT_THREAD, pathname, header.e_entry, cycle ); -
trunk/kernel/libk/remote_rwlock.c
r436 r438 41 41 hal_remote_sw ( XPTR( lock_cxy , &lock_ptr->count ) , 0 ); 42 42 43 #if CONFIG_DEBUG_REMOTE_RWLOCKS43 #if DEBUG_REMOTE_RWLOCKS 44 44 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 45 45 xlist_entry_init( XPTR( lock_cxy , &lock_ptr->list ) ); … … 86 86 thread_ptr->remote_locks++; 87 87 88 #if CONFIG_DEBUG_REMOTE_RWLOCKS88 #if DEBUG_REMOTE_RWLOCKS 89 89 xlist_add_first( XPTR( local_cxy , &thread_ptr->xlocks_root ) , 90 90 XPTR( lock_cxy , &lock_ptr->list ) ); … … 126 126 thread_ptr->remote_locks--; 127 127 128 #if CONFIG_DEBUG_REMOTE_RWLOCKS128 #if DEBUG_REMOTE_RWLOCKS 129 129 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); 130 130 #endif … … 176 176 } 177 177 178 #if CONFIG_DEBUG_REMOTE_RWLOCKS178 #if DEBUG_REMOTE_RWLOCKS 179 179 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 180 180 XPTR( local_cxy , thread_ptr ) ); -
trunk/kernel/libk/remote_rwlock.h
r436 r438 48 48 uint32_t count; /*! current number of reader threads */ 49 49 50 #if CONFIG_DEBUG_REMOTE_RWLOCKS50 #if DEBUG_REMOTE_RWLOCKS 51 51 xptr_t owner; /*! extended pointer on writer thread */ 52 52 xlist_entry_t list; /*! member of list of remote locks taken by owner */ -
trunk/kernel/libk/remote_spinlock.c
r436 r438 38 38 hal_remote_sw ( XPTR( cxy , &ptr->taken ) , 0 ); 39 39 40 #if CONFIG_DEBUG_REMOTE_SPINLOCKS40 #if DEBUG_REMOTE_SPINLOCKS 41 41 hal_remote_swd( XPTR( cxy , &ptr->owner ) , XPTR_NULL ); 42 42 xlist_entry_init( XPTR( cxy , &ptr->list ) ); … … 75 75 thread_ptr->remote_locks++; 76 76 77 #if CONFIG_DEBUG_REMOTE_SPINLOCKS77 #if DEBUG_REMOTE_SPINLOCKS 78 78 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 79 79 XPTR( local_cxy , thread_ptr) ); … … 120 120 thread_ptr->remote_locks++; 121 121 122 #if CONFIG_DEBUG_REMOTE_SPINLOCKS122 #if DEBUG_REMOTE_SPINLOCKS 123 123 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , 124 124 XPTR( local_cxy , thread_ptr) ); … … 143 143 thread_t * thread_ptr = CURRENT_THREAD; 144 144 145 #if CONFIG_DEBUG_REMOTE_SPINLOCKS145 #if DEBUG_REMOTE_SPINLOCKS 146 146 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 147 147 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); … … 196 196 thread_ptr->remote_locks++; 197 197 198 #if CONFIG_DEBUG_REMOTE_SPINLOCKS198 #if DEBUG_REMOTE_SPINLOCKS 199 199 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ), 200 200 XPTR( local_cxy , thread_ptr) ); … … 222 222 thread_t * thread_ptr = CURRENT_THREAD; 223 223 224 #if CONFIG_DEBUG_REMOTE_SPINLOCKS224 #if DEBUG_REMOTE_SPINLOCKS 225 225 hal_remote_swd( XPTR( lock_cxy , &lock_ptr->owner ) , XPTR_NULL ); 226 226 xlist_unlink( XPTR( lock_cxy , &lock_ptr->list ) ); -
trunk/kernel/libk/remote_spinlock.h
r436 r438 41 41 volatile uint32_t taken; /*! free if 0 / taken if non zero */ 42 42 43 #if CONFIG_DEBUG_REMOTE_SPINLOCKS43 #if DEBUG_REMOTE_SPINLOCKS 44 44 xptr_t owner; /*! extended pointer on the owner thread */ 45 45 xlist_entry_t list; /*! list of all remote_lock taken by owner */ -
trunk/kernel/libk/rwlock.c
r436 r438 38 38 lock->count = 0; 39 39 40 #if CONFIG_DEBUG_RWLOCKS40 #if DEBUG_RWLOCKS 41 41 lock->owner = NULL; 42 42 list_entry_init( &lock->list ); … … 70 70 this->local_locks++; 71 71 72 #if CONFIG_DEBUG_RWLOCKS72 #if DEBUG_RWLOCKS 73 73 list_add_first( &this->locks_root , &lock->list ); 74 74 #endif … … 98 98 this->local_locks--; 99 99 100 #if CONFIG_DEBUG_RWLOCKS100 #if DEBUG_RWLOCKS 101 101 list_unlink( &lock->list ); 102 102 #endif … … 138 138 this->local_locks++; 139 139 140 #if CONFIG_DEBUG_RWLOCKS140 #if DEBUG_RWLOCKS 141 141 lock->owner = this; 142 142 list_add_first( &this->locks_root , &lock->list ); … … 157 157 hal_disable_irq( &mode ); 158 158 159 #if CONFIG_DEBUG_RWLOCKS159 #if DEBUG_RWLOCKS 160 160 lock->owner = NULL; 161 161 list_unlink( &lock->list ); -
trunk/kernel/libk/rwlock.h
r436 r438 59 59 uint32_t count; /*! number of simultaneous readers threads */ 60 60 61 #if CONFIG_DEBUG_RWLOCKS61 #if DEBUG_RWLOCKS 62 62 struct thread_s * owner; /*! pointer on curent writer thread */ 63 63 list_entry_t list; /*! member of list of locks taken by owner */ -
trunk/kernel/libk/spinlock.c
r436 r438 38 38 lock->taken = 0; 39 39 40 #if CONFIG_DEBUG_SPINLOCKS40 #if DEBUG_SPINLOCKS 41 41 lock->owner = NULL; 42 42 list_entry_init( &lock->list ); … … 71 71 this->local_locks++; 72 72 73 #if CONFIG_DEBUG_SPINLOCKS73 #if DEBUG_SPINLOCKS 74 74 lock->owner = this; 75 75 list_add_first( &this->locks_root , &lock->list ); … … 86 86 thread_t * this = CURRENT_THREAD;; 87 87 88 #if CONFIG_DEBUG_SPINLOCKS88 #if DEBUG_SPINLOCKS 89 89 lock->owner = NULL; 90 90 list_unlink( &lock->list ); … … 132 132 this->local_locks++; 133 133 134 #if CONFIG_DEBUG_SPINLOCKS134 #if DEBUG_SPINLOCKS 135 135 lock->owner = this; 136 136 list_add_first( &this->locks_root , &lock->list ); … … 162 162 this->local_locks++; 163 163 164 #if CONFIG_DEBUG_SPINLOCKS164 #if DEBUG_SPINLOCKS 165 165 lock->owner = this; 166 166 list_add_first( &this->locks_root , &lock->list ); … … 177 177 thread_t * this = CURRENT_THREAD; 178 178 179 #if CONFIG_DEBUG_SPINLOCKS179 #if DEBUG_SPINLOCKS 180 180 lock->owner = NULL; 181 181 list_unlink( &lock->list ); -
trunk/kernel/libk/spinlock.h
r436 r438 62 62 uint32_t taken; /*! state : free if zero / taken if non zero */ 63 63 64 #if CONFIG_DEBUG_SPINLOCKS64 #if DEBUG_SPINLOCKS 65 65 struct thread_s * owner; /*! pointer on curent owner thread */ 66 66 list_entry_t list; /*! member of list of locks taken by owner */
Note: See TracChangeset
for help on using the changeset viewer.