- Timestamp:
- Aug 22, 2018, 11:55:48 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 39 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_context.c
r459 r492 119 119 error_t hal_cpu_context_alloc( thread_t * thread ) 120 120 { 121 assert( (sizeof(hal_cpu_context_t) <= CONFIG_CPU_CTX_SIZE) , __FUNCTION__ ,121 assert( (sizeof(hal_cpu_context_t) <= CONFIG_CPU_CTX_SIZE) , 122 122 "illegal CPU context size" ); 123 123 … … 146 146 hal_cpu_context_t * context = (hal_cpu_context_t *)thread->cpu_context; 147 147 148 assert( (context != NULL ), __FUNCTION__,"CPU context not allocated" );148 assert( (context != NULL ), "CPU context not allocated" ); 149 149 150 150 // initialisation depends on thread type … … 235 235 else // current == child thread 236 236 { 237 assert( (current == child_ptr) , __FUNCTION__ ,"current = %x / child = %x\n");237 assert( (current == child_ptr) , "current = %x / child = %x\n"); 238 238 } 239 239 } // end hal_cpu_context_fork() … … 300 300 error_t hal_fpu_context_alloc( thread_t * thread ) 301 301 { 302 assert( (sizeof(hal_fpu_context_t) <= CONFIG_FPU_CTX_SIZE) , __FUNCTION__ ,302 assert( (sizeof(hal_fpu_context_t) <= CONFIG_FPU_CTX_SIZE) , 303 303 "illegal CPU context size" ); 304 304 … … 322 322 hal_fpu_context_t * context = thread->fpu_context; 323 323 324 assert( (context != NULL) , __FUNCTION__ , "fpu context not allocated" );324 assert( (context != NULL) , "fpu context not allocated" ); 325 325 326 326 memset( context , 0 , sizeof(hal_fpu_context_t) ); … … 331 331 thread_t * src ) 332 332 { 333 assert( (src != NULL) , __FUNCTION__ , "src thread pointer is NULL\n");334 assert( (dst != NULL) , __FUNCTION__ , "dst thread pointer is NULL\n");333 assert( (src != NULL) , "src thread pointer is NULL\n"); 334 assert( (dst != NULL) , "dst thread pointer is NULL\n"); 335 335 336 336 // get fpu context pointers -
trunk/hal/tsar_mips32/core/hal_drivers.c
r457 r492 49 49 uint32_t impl ) 50 50 { 51 assert( (impl == IMPL_TXT_TTY), __FUNCTION__ ,"bad implementation" );51 assert( (impl == IMPL_TXT_TTY), "bad implementation" ); 52 52 53 53 soclib_tty_init( txt ); … … 62 62 uint32_t impl ) 63 63 { 64 assert( (impl == IMPL_PIC_SCL), __FUNCTION__,"bad implementation" );64 assert( (impl == IMPL_PIC_SCL), "bad implementation" ); 65 65 66 66 soclib_pic_init( pic ); … … 85 85 uint32_t impl ) 86 86 { 87 assert( (impl == IMPL_IOB_TSR), __FUNCTION__ ,"bad implementation" );87 assert( (impl == IMPL_IOB_TSR), "bad implementation" ); 88 88 89 89 soclib_iob_init( iob ); … … 116 116 else 117 117 { 118 assert( false , __FUNCTION__ ,"undefined IOC device implementation" );118 assert( false , "undefined IOC device implementation" ); 119 119 } 120 120 } … … 128 128 uint32_t impl ) 129 129 { 130 assert( (impl == IMPL_MMC_TSR), __FUNCTION__ ,"bad implementation" );130 assert( (impl == IMPL_MMC_TSR), "bad implementation" ); 131 131 132 132 soclib_mmc_init( mmc ); … … 141 141 uint32_t impl ) 142 142 { 143 assert( (impl == IMPL_NIC_CBF), __FUNCTION__ ,"bad implementation" );143 assert( (impl == IMPL_NIC_CBF), "bad implementation" ); 144 144 145 145 soclib_nic_init( nic ); … … 154 154 uint32_t impl ) 155 155 { 156 assert( (impl == IMPL_DMA_SCL), __FUNCTION__ ,"bad implementation" );156 assert( (impl == IMPL_DMA_SCL), "bad implementation" ); 157 157 158 158 soclib_dma_init( dma ); -
trunk/hal/tsar_mips32/core/hal_exception.c
r481 r492 500 500 hal_exception_dump( this , uzone , error ); 501 501 502 assert( false , __FUNCTION__ , "core[%x,%d] blocked\n", local_cxy, this->core->lid);502 assert( false , "Exception raised kernel panic see information below.\n" ); 503 503 } 504 504 -
trunk/hal/tsar_mips32/core/hal_gpt.c
r457 r492 140 140 141 141 // check page size 142 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , __FUNCTION__ ,142 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , 143 143 "for TSAR, the page size must be 4 Kbytes\n" ); 144 144 … … 283 283 vpn_t vpn; 284 284 285 assert( (process != NULL) , __FUNCTION__ ,"NULL process pointer\n");285 assert( (process != NULL) , "NULL process pointer\n"); 286 286 287 287 // get pointer on gpt … … 387 387 pte1 = *pte1_ptr; 388 388 389 assert( (pte1 == 0) , __FUNCTION__ ,389 assert( (pte1 == 0) , 390 390 "try to set a big page in a mapped PT1 entry / PT1[%d] = %x\n", ix1 , pte1 ); 391 391 … … 441 441 { 442 442 // This valid entry must be a PTD1 443 assert( (pte1 & TSAR_MMU_SMALL) , __FUNCTION__ ,443 assert( (pte1 & TSAR_MMU_SMALL) , 444 444 "try to set a small page in a big PT1 entry / PT1[%d] = %x\n", ix1 , pte1 ); 445 445 … … 792 792 793 793 // check src_pt1 and dst_pt1 existence 794 assert( (src_pt1 != NULL) , __FUNCTION__ ,"src_pt1 does not exist\n");795 assert( (dst_pt1 != NULL) , __FUNCTION__ ,"dst_pt1 does not exist\n");794 assert( (src_pt1 != NULL) , "src_pt1 does not exist\n"); 795 assert( (dst_pt1 != NULL) , "dst_pt1 does not exist\n"); 796 796 797 797 ix1 = TSAR_MMU_IX1_FROM_VPN( vpn ); … … 1010 1010 pt2 = (uint32_t*)GET_PTR( ppm_ppn2base( pt2_ppn ) ); 1011 1011 1012 assert( (GET_CXY( ppm_ppn2base( pt2_ppn ) ) == gpt_cxy ), __FUNCTION__,1012 assert( (GET_CXY( ppm_ppn2base( pt2_ppn ) ) == gpt_cxy ), 1013 1013 "PT2 and PT1 must be in the same cluster\n"); 1014 1014 -
trunk/hal/tsar_mips32/drivers/soclib_bdv.c
r451 r492 219 219 else 220 220 { 221 assert( false , __FUNCTION__ ,"IOC_SYNC_READ should not use IRQ" );221 assert( false , "IOC_SYNC_READ should not use IRQ" ); 222 222 } 223 223 -
trunk/hal/tsar_mips32/drivers/soclib_nic.c
r451 r492 53 53 54 54 // allocate memory for chbuf descriptor (one page) 55 assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) , __FUNCTION__ ,55 assert( (sizeof(nic_chbuf_t) <= CONFIG_PPM_PAGE_SIZE ) , 56 56 "chbuf descriptor exceeds one page" ); 57 57 … … 62 62 nic_chbuf_t * chbuf = (nic_chbuf_t *)kmem_alloc( &req ); 63 63 64 assert( (chbuf != NULL) , __FUNCTION__ ,64 assert( (chbuf != NULL) , 65 65 "cannot allocate chbuf descriptor" ); 66 66 … … 72 72 // allocate containers (one page per container) 73 73 // and complete chbuf descriptor initialization 74 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , __FUNCTION__ ,74 assert( (CONFIG_PPM_PAGE_SIZE == 4096) , 75 75 "chbuf container must be 4 Kbytes" ); 76 76 … … 79 79 uint32_t * container = (uint32_t *)kmem_alloc( &req ); 80 80 81 assert( (container != NULL) , __FUNCTION__ ,81 assert( (container != NULL) , 82 82 "cannot allocate container" ); 83 83 -
trunk/hal/tsar_mips32/drivers/soclib_pic.c
r481 r492 57 57 soclib_pic_cluster_t * ext_ptr = LOCAL_CLUSTER->pic_extend; 58 58 59 assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) , __FUNCTION__ ,59 assert( (ext_ptr->first_free_wti < ext_ptr->wti_nr) , 60 60 "no free WTI found : too much external IRQs\n"); 61 61 … … 146 146 if( index < LOCAL_CLUSTER->cores_nr ) // it is an IPI 147 147 { 148 assert( (index == core->lid) , __FUNCTION__ ,"illegal IPI index" );148 assert( (index == core->lid) , "illegal IPI index" ); 149 149 150 150 #if DEBUG_HAL_IRQS … … 229 229 index = pti_status - 1; 230 230 231 assert( (index == core->lid) , __FUNCTION__ ,"unconsistent PTI index\n");231 assert( (index == core->lid) , "unconsistent PTI index\n"); 232 232 233 233 #if DEBUG_HAL_IRQS … … 292 292 core_ext_ptr = kmem_alloc( &req ); 293 293 294 assert( (core_ext_ptr != NULL) , __FUNCTION__ ,294 assert( (core_ext_ptr != NULL) , 295 295 "cannot allocate memory for core extension\n"); 296 296 … … 309 309 cluster_ext_ptr = kmem_alloc( &req ); 310 310 311 assert( (cluster_ext_ptr != NULL) , __FUNCTION__ ,311 assert( (cluster_ext_ptr != NULL) , 312 312 "cannot allocate memory for cluster extension\n"); 313 313 … … 381 381 else if( (func == DEV_FUNC_NIC) && !is_rx ) hwi_id = iopic_input.nic_tx[channel]; 382 382 else if( func == DEV_FUNC_IOB ) hwi_id = iopic_input.iob; 383 else assert( false , __FUNCTION__ ,"illegal device functionnal type\n");383 else assert( false , "illegal device functionnal type\n"); 384 384 385 385 // get a WTI mailbox from local XCU descriptor … … 439 439 else 440 440 { 441 assert( false , __FUNCTION__ ,"illegal device functionnal type\n" );441 assert( false , "illegal device functionnal type\n" ); 442 442 } 443 443 } // end soclib_pic_bind_irq(); … … 474 474 else 475 475 { 476 assert( false , __FUNCTION__ ,"illegal IRQ type\n" );476 assert( false , "illegal IRQ type\n" ); 477 477 } 478 478 } // end soclib_pic_enable_irq() … … 509 509 else 510 510 { 511 assert( false , __FUNCTION__ ,"illegal IRQ type\n" );511 assert( false , "illegal IRQ type\n" ); 512 512 } 513 513 } // end soclib_pic_enable_irq() -
trunk/hal/tsar_mips32/drivers/soclib_tty.c
r457 r492 233 233 else 234 234 { 235 assert( false , __FUNCTION__ ,"illegal TXT command\n" );235 assert( false , "illegal TXT command\n" ); 236 236 } 237 237 … … 329 329 330 330 // check process exist 331 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,331 assert( (owner_xp != XPTR_NULL) , 332 332 "TXT owner process not found\n" ); 333 333 … … 387 387 388 388 // check process exist 389 assert( (owner_xp != XPTR_NULL) , __FUNCTION__,389 assert( (owner_xp != XPTR_NULL) , 390 390 "TXT owner process not found\n" ); 391 391 -
trunk/hal/x86_64/drivers/pic_apic.c
r482 r492 80 80 irq_id = iopic_input.txt[channel]; 81 81 else 82 assert(false, __FUNCTION__,"unsupported device\n");82 assert(false, "unsupported device\n"); 83 83 84 84 /* get the ISR pointer */ … … 109 109 irq_id = iopic_input.txt[channel]; 110 110 else 111 assert(false, __FUNCTION__,"unsupported device\n");111 assert(false, "unsupported device\n"); 112 112 113 113 /* enable the line */ … … 128 128 irq_id = iopic_input.txt[channel]; 129 129 else 130 assert(false, __FUNCTION__,"unsupported device\n");130 assert(false, "unsupported device\n"); 131 131 132 132 /* disable the line */ -
trunk/kernel/devices/dev_dma.c
r457 r492 69 69 if( error ) 70 70 { 71 assert( false , __FUNCTION__ ,"cannot create server thread" );71 assert( false , "cannot create server thread" ); 72 72 } 73 73 … … 103 103 xptr_t dev_xp = chdev_dir.dma[channel]; 104 104 105 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined DMA chdev descriptor" );105 assert( (dev_xp != XPTR_NULL) , "undefined DMA chdev descriptor" ); 106 106 107 107 // register command in calling thread descriptor -
trunk/kernel/devices/dev_fbf.c
r483 r492 59 59 else 60 60 { 61 assert( false , __FUNCTION__ ,"undefined FBF device implementation" );61 assert( false , "undefined FBF device implementation" ); 62 62 } 63 63 … … 71 71 xptr_t dev_xp = chdev_dir.fbf[0]; 72 72 73 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined FBF chdev descriptor" );73 assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 74 74 75 75 // get FBF chdev cluster and local pointer … … 89 89 xptr_t dev_xp = chdev_dir.fbf[0]; 90 90 91 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined FBF chdev descriptor" );91 assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 92 92 93 93 // get FBF chdev cluster and local pointer … … 106 106 xptr_t dev_xp = chdev_dir.fbf[0]; 107 107 108 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined FBF chdev descriptor" );108 assert( (dev_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 109 109 110 110 // get FBF chdev cluster and local pointer … … 132 132 xptr_t fbf_xp = chdev_dir.fbf[0]; 133 133 134 assert( (fbf_xp != XPTR_NULL) , __FUNCTION__ ,"undefined FBF chdev descriptor" );134 assert( (fbf_xp != XPTR_NULL) , "undefined FBF chdev descriptor" ); 135 135 136 136 // get FBF chdev cluster and local pointer … … 144 144 145 145 // check offset and length versus FBF size 146 assert( ((offset + length) <= (width * height)) , __FUNCTION__ ,146 assert( ((offset + length) <= (width * height)) , 147 147 "offset %d / length %d / width %d / height %d\n", offset, length, width, height ); 148 148 -
trunk/kernel/devices/dev_ioc.c
r457 r492 44 44 xptr_t pic_xp = chdev_dir.pic; 45 45 46 assert( (pic_xp != XPTR_NULL) , __FUNCTION__ ,"PIC not initialised before IOC" );46 assert( (pic_xp != XPTR_NULL) , "PIC not initialised before IOC" ); 47 47 48 48 // get implementation and channel from chdev descriptor … … 75 75 lid ); 76 76 77 assert( (error == 0) , __FUNCTION__ ,"cannot create server thread" );77 assert( (error == 0) , "cannot create server thread" ); 78 78 79 79 // set "server" field in chdev descriptor … … 111 111 xptr_t dev_xp = chdev_dir.ioc[0]; 112 112 113 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined IOC chdev descriptor" );113 assert( (dev_xp != XPTR_NULL) , "undefined IOC chdev descriptor" ); 114 114 115 115 // register command in calling thread descriptor … … 199 199 xptr_t ioc_xp = chdev_dir.ioc[0]; 200 200 201 assert( (ioc_xp != XPTR_NULL) , __FUNCTION__ ,"undefined IOC chdev descriptor" );201 assert( (ioc_xp != XPTR_NULL) , "undefined IOC chdev descriptor" ); 202 202 203 203 // register command in calling thread descriptor -
trunk/kernel/devices/dev_mmc.c
r457 r492 67 67 xptr_t dev_xp = this->mmc_cmd.dev_xp; 68 68 69 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"target MMC device undefined" );69 assert( (dev_xp != XPTR_NULL) , "target MMC device undefined" ); 70 70 71 71 // get MMC device cluster identifier & local pointer … … 110 110 void * buf_ptr = GET_PTR( buf_xp ); 111 111 112 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , __FUNCTION__ ,112 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , 113 113 "buffer not aligned on cache line" ); 114 114 … … 151 151 void * buf_ptr = GET_PTR( buf_xp ); 152 152 153 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , __FUNCTION__ ,153 assert( (((intptr_t)buf_ptr & (CONFIG_CACHE_LINE_SIZE -1)) == 0) , 154 154 "buffer not aligned on cache line" ); 155 155 -
trunk/kernel/devices/dev_nic.c
r457 r492 43 43 xptr_t pic_xp = chdev_dir.pic; 44 44 45 assert( (pic_xp != XPTR_NULL) , __FUNCTION__ ,"ICU not initialised before NIC" );45 assert( (pic_xp != XPTR_NULL) , "ICU not initialised before NIC" ); 46 46 47 47 // get "impl" , "channel" , "is_rx" fields from chdev descriptor … … 74 74 lid ); 75 75 76 assert( (error == 0) , __FUNCTION__ ,"cannot create server thread" );76 assert( (error == 0) , "cannot create server thread" ); 77 77 78 78 // set "server" field in chdev descriptor … … 112 112 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 113 113 114 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined NIC chdev descriptor" );115 116 assert( (dev_cxy == local_cxy) , __FUNCTION__ ," chdev must be local" );114 assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" ); 115 116 assert( (dev_cxy == local_cxy) , " chdev must be local" ); 117 117 118 118 // initialize command in thread descriptor … … 190 190 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 191 191 192 assert ( (dev_xp != XPTR_NULL) , __FUNCTION__, "undefined NIC chdev descriptor" );193 194 assert( (dev_cxy == local_cxy) , __FUNCTION__ ," chdev must be local" );192 assert( (dev_xp != XPTR_NULL) , "undefined NIC chdev descriptor" ); 193 194 assert( (dev_cxy == local_cxy) , " chdev must be local" ); 195 195 196 196 // initialize command in thread descriptor -
trunk/kernel/devices/dev_txt.c
r457 r492 69 69 bool_t is_rx = txt->is_rx; 70 70 71 assert( (pic_xp != XPTR_NULL) || (channel == 0) , __FUNCTION__ ,71 assert( (pic_xp != XPTR_NULL) || (channel == 0) , 72 72 "PIC not initialised before TXT" ); 73 73 … … 107 107 lid ); 108 108 109 assert( (error == 0) , __FUNCTION__ ,"cannot create server thread" );109 assert( (error == 0) , "cannot create server thread" ); 110 110 111 111 // set "server" field in chdev descriptor … … 132 132 133 133 // check channel argument 134 assert( (channel < CONFIG_MAX_TXT_CHANNELS) , __FUNCTION__ ,"illegal channel index" );134 assert( (channel < CONFIG_MAX_TXT_CHANNELS) , "illegal channel index" ); 135 135 136 136 // get extended pointer on remote TXT chdev descriptor … … 138 138 else dev_xp = chdev_dir.txt_rx[channel]; 139 139 140 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,"undefined TXT chdev descriptor" );140 assert( (dev_xp != XPTR_NULL) , "undefined TXT chdev descriptor" ); 141 141 142 142 // register command in calling thread descriptor … … 221 221 xptr_t dev_xp = chdev_dir.txt_tx[0]; 222 222 223 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ ,223 assert( (dev_xp != XPTR_NULL) , 224 224 "undefined TXT0 chdev descriptor" ); 225 225 -
trunk/kernel/fs/devfs.c
r484 r492 108 108 devfs_dev_inode_xp ); 109 109 110 assert( (error == 0) , __FUNCTION__ ,"cannot create <dev>\n" );110 assert( (error == 0) , "cannot create <dev>\n" ); 111 111 112 112 #if( DEBUG_DEVFS_INIT & 1 ) … … 124 124 devfs_external_inode_xp ); 125 125 126 assert( (error == 0) , __FUNCTION__ ,"cannot create <external>\n" );126 assert( (error == 0) , "cannot create <external>\n" ); 127 127 128 128 #if DEBUG_DEVFS_INIT … … 372 372 uint32_t size ) 373 373 { 374 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ ,"file_xp == XPTR_NULL" );375 376 assert( ( size < CONFIG_TXT_KBUF_SIZE ) , __FUNCTION__ ,"string size too large" );374 assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" ); 375 376 assert( ( size < CONFIG_TXT_KBUF_SIZE ) , "string size too large" ); 377 377 378 378 xptr_t chdev_xp; … … 471 471 else 472 472 { 473 assert( false , __FUNCTION__ ,473 assert( false , 474 474 "%s does not support direct user access", chdev_func_str(func) ); 475 475 -
trunk/kernel/fs/fatfs.c
r484 r492 259 259 uint32_t next_cluster_id; // content of current FAT slot 260 260 261 assert( (searched_page_index > 0) , __FUNCTION__ ,261 assert( (searched_page_index > 0) , 262 262 "no FAT access required for first page\n"); 263 263 … … 352 352 #endif 353 353 354 assert( (fatfs_ctx != NULL) , __FUNCTION__ ,354 assert( (fatfs_ctx != NULL) , 355 355 "cannot allocate memory for FATFS context\n" ); 356 356 … … 360 360 buffer = (uint8_t *)kmem_alloc( &req ); 361 361 362 assert( (buffer != NULL) , __FUNCTION__ ,362 assert( (buffer != NULL) , 363 363 "cannot allocate memory for 512 bytes buffer\n" ); 364 364 … … 367 367 error = dev_ioc_sync_read( buffer , 0 , 1 ); 368 368 369 assert( (error == 0) , __FUNCTION__ ,369 assert( (error == 0) , 370 370 "cannot access boot record\n" ); 371 371 … … 393 393 uint32_t sector_size = fatfs_get_record( BPB_BYTSPERSEC , buffer , 1 ); 394 394 395 assert( (sector_size == 512) , __FUNCTION__ ,395 assert( (sector_size == 512) , 396 396 "sector size must be 512 bytes\n" ); 397 397 … … 399 399 uint32_t nb_sectors = fatfs_get_record( BPB_SECPERCLUS , buffer , 1 ); 400 400 401 assert( (nb_sectors == 8) , __FUNCTION__ ,401 assert( (nb_sectors == 8) , 402 402 "cluster size must be 8 sectors\n" ); 403 403 … … 405 405 uint32_t nb_fats = fatfs_get_record( BPB_NUMFATS , buffer , 1 ); 406 406 407 assert( (nb_fats == 1) , __FUNCTION__ ,407 assert( (nb_fats == 1) , 408 408 "number of FAT copies must be 1\n" ); 409 409 … … 411 411 uint32_t fat_sectors = fatfs_get_record( BPB_FAT32_FATSZ32 , buffer , 1 ); 412 412 413 assert( ((fat_sectors & 0xF) == 0) , __FUNCTION__ ,413 assert( ((fat_sectors & 0xF) == 0) , 414 414 "FAT not multiple of 16 sectors\n"); 415 415 … … 417 417 uint32_t root_cluster = fatfs_get_record( BPB_FAT32_ROOTCLUS , buffer , 1 ); 418 418 419 assert( (root_cluster == 2) , __FUNCTION__ ,419 assert( (root_cluster == 2) , 420 420 "root cluster index must be 2\n"); 421 421 … … 431 431 mapper_t * fat_mapper = mapper_create( FS_TYPE_FATFS ); 432 432 433 assert( (fat_mapper != NULL) , __FUNCTION__ ,433 assert( (fat_mapper != NULL) , 434 434 "no memory for FAT mapper" ); 435 435 … … 632 632 mapper_t * mapper = parent_inode->mapper; 633 633 634 assert( (mapper != NULL) , __FUNCTION__ ,"parent mapper undefined\n");634 assert( (mapper != NULL) , "parent mapper undefined\n"); 635 635 636 636 char cname[CONFIG_VFS_MAX_NAME_LENGTH]; // name extracter from each directory entry … … 659 659 page = mapper_get_page( mapper , index ); 660 660 661 assert( (page != NULL) , __FUNCTION__ ,"bad parent mapper\n");661 assert( (page != NULL) , "bad parent mapper\n"); 662 662 663 663 // get page base -
trunk/kernel/fs/vfs.c
r484 r492 171 171 { 172 172 ctx = NULL; 173 assert( false , __FUNCTION__ ,"illegal file system type = %d\n" , fs_type );173 assert( false , "illegal file system type = %d\n" , fs_type ); 174 174 } 175 175 … … 250 250 error_t vfs_inode_destroy( vfs_inode_t * inode ) 251 251 { 252 assert( (inode->refcount == 0) , __FUNCTION__, "inode refcount non zero\n" );252 assert( (inode->refcount == 0) , "inode refcount non zero\n" ); 253 253 254 254 // release memory allocated for mapper … … 280 280 error_t error = 0; 281 281 282 assert( (parent != NULL) , __FUNCTION__ ,"parent pointer is NULL\n");283 284 assert( (child_xp != XPTR_NULL) , __FUNCTION__ ,"child pointer is NULL\n");282 assert( (parent != NULL) , "parent pointer is NULL\n"); 283 284 assert( (child_xp != XPTR_NULL) , "child pointer is NULL\n"); 285 285 286 286 // get parent inode FS type … … 294 294 else if( fs_type == FS_TYPE_RAMFS ) 295 295 { 296 assert( false , __FUNCTION__ ,"should not be called for RAMFS\n" );296 assert( false , "should not be called for RAMFS\n" ); 297 297 } 298 298 else if( fs_type == FS_TYPE_DEVFS ) 299 299 { 300 assert( false , __FUNCTION__ ,"should not be called for DEVFS\n" );300 assert( false , "should not be called for DEVFS\n" ); 301 301 } 302 302 else 303 303 { 304 assert( false , __FUNCTION__ ,"undefined file system type\n" );304 assert( false , "undefined file system type\n" ); 305 305 } 306 306 … … 581 581 if( file->refcount ) 582 582 { 583 assert( false , __FUNCTION__ ,"refcount non zero\n" );583 assert( false , "refcount non zero\n" ); 584 584 } 585 585 … … 713 713 uint32_t size ) 714 714 { 715 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ ,"file_xp == XPTR_NULL" );715 assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" ); 716 716 717 717 cxy_t file_cxy; // remote file descriptor cluster … … 729 729 inode_type = hal_remote_lw( XPTR( file_cxy , &file_ptr->type ) ); 730 730 731 assert( (inode_type == INODE_TYPE_FILE) , __FUNCTION__ ,731 assert( (inode_type == INODE_TYPE_FILE) , 732 732 "inode type is not INODE_TYPE_FILE" ); 733 733 … … 768 768 uint32_t size ) 769 769 { 770 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ ,"file_xp == XPTR_NULL" );770 assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" ); 771 771 772 772 cxy_t file_cxy; // remote file descriptor cluster … … 835 835 uint32_t new; 836 836 837 assert( (file_xp != XPTR_NULL) , __FUNCTION__ ,"file_xp == XPTR_NULL" );837 assert( (file_xp != XPTR_NULL) , "file_xp == XPTR_NULL" ); 838 838 839 839 // get cluster and local pointer on remote file descriptor … … 899 899 process_t * process_ptr; // process copy local pointer 900 900 901 assert( (file_xp != XPTR_NULL) , __FUNCTION__ ,"file_xp == XPTR_NULL" );902 903 assert( (file_id < CONFIG_PROCESS_FILE_MAX_NR) , __FUNCTION__ ,"illegal file_id" );901 assert( (file_xp != XPTR_NULL) , "file_xp == XPTR_NULL" ); 902 903 assert( (file_id < CONFIG_PROCESS_FILE_MAX_NR) , "illegal file_id" ); 904 904 905 905 thread_t * this = CURRENT_THREAD; … … 996 996 char * path ) 997 997 { 998 assert( false , __FUNCTION__ , "not implemented\n", cwd_xp, path ); 998 assert( false , "not implemented cwd_xp %x, path <%s> \n", 999 cwd_xp, path ); 999 1000 return 0; 1000 1001 } … … 1004 1005 struct stat * k_stat ) 1005 1006 { 1006 assert( false , __FUNCTION__ , "not implemented\n", file_xp, k_stat ); 1007 assert( false , "not implemented file_xp: %x, k_stat ptr %x\n", 1008 file_xp, k_stat ); 1007 1009 return 0; 1008 1010 } … … 1012 1014 struct dirent * k_dirent ) 1013 1015 { 1014 assert( false , __FUNCTION__ , "not implemented\n", file_xp, k_dirent ); 1016 assert( false , "not implemented file_xp: %x, k_dirent ptr %x\n", 1017 file_xp, k_dirent ); 1015 1018 return 0; 1016 1019 } … … 1021 1024 uint32_t mode ) 1022 1025 { 1023 assert( false , __FUNCTION__ , "not implemented\n", file_xp, path, mode ); 1026 assert( false , "not implemented file_xp: %x, path <%s>, mode: %x\n", 1027 file_xp, path, mode ); 1024 1028 return 0; 1025 1029 } … … 1029 1033 char * path ) 1030 1034 { 1031 assert( false , __FUNCTION__ , "not implemented\n", file_xp, path ); 1035 assert( false , "not implemented file_xp: %x, path <%s>\n", 1036 file_xp, path ); 1032 1037 return 0; 1033 1038 } … … 1065 1070 } 1066 1071 1067 assert( false , __FUNCTION__ ,"not implemented\n" );1072 assert( false , "not implemented\n" ); 1068 1073 return 0; 1069 1074 } … … 1097 1102 1098 1103 1099 assert( false , __FUNCTION__ ,"not implemented\n" );1104 assert( false , "not implemented\n" ); 1100 1105 return 0; 1101 1106 } … … 1106 1111 uint32_t rights ) 1107 1112 { 1108 assert( false , __FUNCTION__ , "not implemented\n", cwd_xp, path, rights ); 1113 assert( false , "not implemented cwd_xp: %x, path <%s>, rights %x\n", 1114 cwd_xp, path, rights ); 1109 1115 return 0; 1110 1116 } … … 1168 1174 " " }; // level 15 1169 1175 1170 assert( (inode_xp != XPTR_NULL) , __FUNCTION__ ,"inode_xp cannot be NULL\n" );1171 assert( (name_xp != XPTR_NULL) , __FUNCTION__ ,"name_xp cannot be NULL\n" );1172 assert( (indent < 16) , __FUNCTION__ ,"depth cannot be larger than 15\n" );1176 assert( (inode_xp != XPTR_NULL) , "inode_xp cannot be NULL\n" ); 1177 assert( (name_xp != XPTR_NULL) , "name_xp cannot be NULL\n" ); 1178 assert( (indent < 16) , "depth cannot be larger than 15\n" ); 1173 1179 1174 1180 // get inode cluster and local pointer … … 1944 1950 error_t error = 0; 1945 1951 1946 assert( (page != NULL) , __FUNCTION__ ,"page pointer is NULL\n" );1952 assert( (page != NULL) , "page pointer is NULL\n" ); 1947 1953 1948 1954 mapper_t * mapper = page->mapper; 1949 1955 1950 assert( (mapper != NULL) , __FUNCTION__ ,"no mapper for page\n" );1956 assert( (mapper != NULL) , "no mapper for page\n" ); 1951 1957 1952 1958 #if DEBUG_VFS_MAPPER_MOVE … … 1969 1975 else if( fs_type == FS_TYPE_RAMFS ) 1970 1976 { 1971 assert( false , __FUNCTION__ ,"should not be called for RAMFS\n" );1977 assert( false , "should not be called for RAMFS\n" ); 1972 1978 } 1973 1979 else if( fs_type == FS_TYPE_DEVFS ) 1974 1980 { 1975 assert( false , __FUNCTION__ ,"should not be called for DEVFS\n" );1981 assert( false , "should not be called for DEVFS\n" ); 1976 1982 } 1977 1983 else 1978 1984 { 1979 assert( false , __FUNCTION__ ,"undefined file system type\n" );1985 assert( false , "undefined file system type\n" ); 1980 1986 } 1981 1987 … … 1994 2000 error_t vfs_mapper_load_all( vfs_inode_t * inode ) 1995 2001 { 1996 assert( (inode != NULL) , __FUNCTION__ ,"inode pointer is NULL\n" );2002 assert( (inode != NULL) , "inode pointer is NULL\n" ); 1997 2003 1998 2004 uint32_t index; … … 2002 2008 uint32_t size = inode->size; 2003 2009 2004 assert( (mapper != NULL) , __FUNCTION__ ,"mapper pointer is NULL\n" );2010 assert( (mapper != NULL) , "mapper pointer is NULL\n" ); 2005 2011 2006 2012 #if DEBUG_VFS_MAPPER_LOAD -
trunk/kernel/kern/chdev.c
r485 r492 264 264 265 265 // deschedule 266 assert( thread_can_yield( this ) , __FUNCTION__ ,"illegal sched_yield\n" );266 assert( thread_can_yield( this ) , "illegal sched_yield\n" ); 267 267 sched_yield("blocked on I/O"); 268 268 … … 327 327 328 328 // deschedule 329 assert( thread_can_yield( server ) , __FUNCTION__ ,"illegal sched_yield\n" );329 assert( thread_can_yield( server ) , "illegal sched_yield\n" ); 330 330 sched_yield("I/O queue empty"); 331 331 } … … 408 408 chdev_t * chdev_ptr; 409 409 410 assert( (file_xp != XPTR_NULL) , __FUNCTION__,410 assert( (file_xp != XPTR_NULL) , 411 411 "file_xp == XPTR_NULL\n" ); 412 412 … … 420 420 inode_ptr = (vfs_inode_t *)hal_remote_lpt( XPTR( file_cxy , &file_ptr->inode ) ); 421 421 422 assert( (inode_type == INODE_TYPE_DEV) , __FUNCTION__ ,422 assert( (inode_type == INODE_TYPE_DEV) , 423 423 "inode type %d is not INODE_TYPE_DEV\n", inode_type ); 424 424 -
trunk/kernel/kern/cluster.c
r485 r492 450 450 451 451 // check lpid 452 assert( (lpid < CONFIG_MAX_PROCESS_PER_CLUSTER), __FUNCTION__ ,452 assert( (lpid < CONFIG_MAX_PROCESS_PER_CLUSTER), 453 453 "illegal LPID = %d" , lpid ); 454 454 455 455 // check owner cluster 456 assert( (owner_cxy == local_cxy) , __FUNCTION__ ,456 assert( (owner_cxy == local_cxy) , 457 457 "local_cluster %x != owner_cluster %x" , local_cxy , owner_cxy ); 458 458 … … 650 650 651 651 assert( (cluster_is_undefined( cxy ) == false), 652 __FUNCTION__,"illegal cluster index" );652 "illegal cluster index" ); 653 653 654 654 // get extended pointer on root and lock for local process list in cluster -
trunk/kernel/kern/do_syscall.c
r488 r492 36 36 static int sys_undefined() 37 37 { 38 assert( false , __FUNCTION__ ,"undefined system call" );38 assert( false , "undefined system call" ); 39 39 return 0; 40 40 } … … 176 176 int error = 0; 177 177 178 assert( (this == CURRENT_THREAD), __FUNCTION__,178 assert( (this == CURRENT_THREAD), 179 179 "wrong <this> argument\n" ); 180 180 … … 200 200 201 201 // check kernel stack overflow 202 assert( (CURRENT_THREAD->signature == THREAD_SIGNATURE), __FUNCTION__,202 assert( (CURRENT_THREAD->signature == THREAD_SIGNATURE), 203 203 "kernel stack overflow after for thread %x in cluster %x\n", CURRENT_THREAD, local_cxy ); 204 204 -
trunk/kernel/kern/dqdt.c
r485 r492 102 102 uint32_t y_width ) 103 103 { 104 assert( ((x_size <= 32) && (y_size <= 32)) , __FUNCTION__ ,"illegal mesh size\n");104 assert( ((x_size <= 32) && (y_size <= 32)) , "illegal mesh size\n"); 105 105 106 106 dqdt_node_t * node; -
trunk/kernel/kern/kernel_init.c
r490 r492 231 231 if (func == DEV_FUNC_TXT ) 232 232 { 233 assert( (channels > 0) , __FUNCTION__ ,"number of TXT channels cannot be 0\n");233 assert( (channels > 0) , "number of TXT channels cannot be 0\n"); 234 234 235 235 // initializes TXT_TX[0] chdev … … 298 298 if( func == DEV_FUNC_MMC ) 299 299 { 300 assert( (channels == 1) , __FUNCTION__ , 301 "MMC device must be single channel\n" ); 300 assert( (channels == 1) , "MMC device must be single channel\n" ); 302 301 303 302 // create chdev in local cluster … … 308 307 base ); 309 308 310 assert( (chdev_ptr != NULL) , __FUNCTION__ ,309 assert( (chdev_ptr != NULL) , 311 310 "cannot allocate memory for MMC chdev\n" ); 312 311 … … 344 343 base ); 345 344 346 assert( (chdev_ptr != NULL) , __FUNCTION__ , 347 "cannot allocate memory for DMA chdev" ); 345 assert( (chdev_ptr != NULL) , "cannot allocate memory for DMA chdev" ); 348 346 349 347 // make DMA specific initialisation … … 420 418 421 419 // check PIC device initialized 422 assert( (chdev_dir.pic != XPTR_NULL ) , __FUNCTION__ ,420 assert( (chdev_dir.pic != XPTR_NULL ) , 423 421 "PIC device must be initialized before other devices\n" ); 424 422 … … 428 426 (func == DEV_FUNC_TXT) || 429 427 (func == DEV_FUNC_NIC) || 430 (func == DEV_FUNC_FBF) ) , __FUNCTION__ ,428 (func == DEV_FUNC_FBF) ) , 431 429 "undefined external peripheral type\n" ); 432 430 … … 456 454 base ); 457 455 458 assert( (chdev != NULL), __FUNCTION__ ,456 assert( (chdev != NULL), 459 457 "cannot allocate external device" ); 460 458 … … 544 542 } 545 543 546 assert( found , __FUNCTION__ ,"PIC device not found\n" );544 assert( found , "PIC device not found\n" ); 547 545 548 546 // allocate and initialize the PIC chdev in cluster 0 … … 553 551 base ); 554 552 555 assert( (chdev != NULL), __FUNCTION__ ,"no memory for PIC chdev\n" );553 assert( (chdev != NULL), "no memory for PIC chdev\n" ); 556 554 557 555 // make PIC device type specific initialisation … … 607 605 else if((func == DEV_FUNC_TXT) && (is_rx == 0)) ptr = &iopic_input.txt_tx[channel]; 608 606 else if((func == DEV_FUNC_TXT) && (is_rx != 0)) ptr = &iopic_input.txt_rx[channel]; 609 else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel]; 610 else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 611 else if( func == DEV_FUNC_IOB ) ptr = &iopic_input.iob; 612 else assert( false , __FUNCTION__ ,"illegal source device for IOPIC input" );607 else if((func == DEV_FUNC_NIC) && (is_rx == 0)) ptr = &iopic_input.nic_tx[channel]; 608 else if((func == DEV_FUNC_NIC) && (is_rx != 0)) ptr = &iopic_input.nic_rx[channel]; 609 else if( func == DEV_FUNC_IOB ) ptr = &iopic_input.iob; 610 else assert( false , "illegal source device for IOPIC input" ); 613 611 614 612 // set one entry in all "iopic_input" structures … … 697 695 if ( func == DEV_FUNC_MMC ) lapic_input.mmc = id; 698 696 else if( func == DEV_FUNC_DMA ) lapic_input.dma[channel] = id; 699 else assert( false , __FUNCTION__ ,"illegal source device for LAPIC input" );697 else assert( false , "illegal source device for LAPIC input" ); 700 698 } 701 699 } … … 818 816 if( error ) 819 817 { 820 assert( false , __FUNCTION__ ,818 assert( false , 821 819 "illegal core identifiers gid = %x / cxy = %x / lid = %d", 822 820 core_lid , core_cxy , core_lid ); … … 830 828 if( error ) 831 829 { 832 assert( false , __FUNCTION__ ,830 assert( false , 833 831 "cannot initialise cluster %x", local_cxy ); 834 832 } … … 950 948 fatfs_ctx_t * fatfs_ctx = fatfs_ctx_alloc(); 951 949 952 assert( (fatfs_ctx != NULL) , __FUNCTION__ ,950 assert( (fatfs_ctx != NULL) , 953 951 "cannot create FATFS context in cluster 0\n" ); 954 952 … … 973 971 &vfs_root_inode_xp ); // return 974 972 975 assert( (error == 0) , __FUNCTION__ ,973 assert( (error == 0) , 976 974 "cannot create VFS root inode\n" ); 977 975 … … 987 985 vfs_ctx_t * vfs_ctx = &fs_context[FS_TYPE_FATFS]; 988 986 assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8), 989 __FUNCTION__ ,"illegal value for FATFS context in cluster %x\n", local_cxy );987 "illegal value for FATFS context in cluster %x\n", local_cxy ); 990 988 } 991 989 else 992 990 { 993 assert( false , __FUNCTION__ ,991 assert( false , 994 992 "root FS must be FATFS" ); 995 993 } … … 1028 1026 fatfs_ctx_t * local_fatfs_ctx = fatfs_ctx_alloc(); 1029 1027 1030 assert( (local_fatfs_ctx != NULL) , __FUNCTION__ ,1028 assert( (local_fatfs_ctx != NULL) , 1031 1029 "cannot create FATFS context in cluster %x\n", local_cxy ); 1032 1030 … … 1050 1048 // 7. check initialisation 1051 1049 assert( (((fatfs_ctx_t *)vfs_ctx->extend)->sectors_per_cluster == 8), 1052 __FUNCTION__ ,"illegal value for FATFS context in cluster %x\n", local_cxy );1050 "illegal value for FATFS context in cluster %x\n", local_cxy ); 1053 1051 } 1054 1052 … … 1089 1087 devfs_ctx_t * devfs_ctx = devfs_ctx_alloc(); 1090 1088 1091 assert( (devfs_ctx != NULL) , __FUNCTION__ ,1089 assert( (devfs_ctx != NULL) , 1092 1090 "cannot create DEVFS context in cluster IO\n"); 1093 1091 -
trunk/kernel/kern/process.c
r485 r492 132 132 // initialize vmm as empty 133 133 error = vmm_init( process ); 134 assert( (error == 0) , __FUNCTION__ ,"cannot initialize VMM\n" );134 assert( (error == 0) , "cannot initialize VMM\n" ); 135 135 136 136 #if (DEBUG_PROCESS_REFERENCE_INIT & 1) … … 175 175 &stdin_id ); 176 176 177 assert( (error == 0) , __FUNCTION__ ,"cannot open stdin pseudo file" );178 assert( (stdin_id == 0) , __FUNCTION__ ,"stdin index must be 0" );177 assert( (error == 0) , "cannot open stdin pseudo file" ); 178 assert( (stdin_id == 0) , "stdin index must be 0" ); 179 179 180 180 #if (DEBUG_PROCESS_REFERENCE_INIT & 1) … … 193 193 &stdout_id ); 194 194 195 assert( (error == 0) , __FUNCTION__ ,"cannot open stdout pseudo file" );196 assert( (stdout_id == 1) , __FUNCTION__ ,"stdout index must be 1" );195 assert( (error == 0) , "cannot open stdout pseudo file" ); 196 assert( (stdout_id == 1) , "stdout index must be 1" ); 197 197 198 198 #if (DEBUG_PROCESS_REFERENCE_INIT & 1) … … 211 211 &stderr_id ); 212 212 213 assert( (error == 0) , __FUNCTION__ ,"cannot open stderr pseudo file" );214 assert( (stderr_id == 2) , __FUNCTION__ ,"stderr index must be 2" );213 assert( (error == 0) , "cannot open stderr pseudo file" ); 214 assert( (stderr_id == 2) , "stderr index must be 2" ); 215 215 216 216 #if (DEBUG_PROCESS_REFERENCE_INIT & 1) … … 330 330 // reset local process vmm 331 331 error = vmm_init( local_process ); 332 assert( (error == 0) , __FUNCTION__ ,"cannot initialize VMM\n");332 assert( (error == 0) , "cannot initialize VMM\n"); 333 333 334 334 // reset process file descriptors array … … 393 393 pid_t pid = process->pid; 394 394 395 assert( (process->th_nr == 0) , __FUNCTION__ ,395 assert( (process->th_nr == 0) , 396 396 "process %x in cluster %x has still active threads", pid , local_cxy ); 397 397 … … 511 511 assert( ((type == DELETE_ALL_THREADS ) || 512 512 (type == BLOCK_ALL_THREADS ) || 513 (type == UNBLOCK_ALL_THREADS )), __FUNCTION__ ,"illegal action type" );513 (type == UNBLOCK_ALL_THREADS )), "illegal action type" ); 514 514 515 515 … … 843 843 xptr_t ref_xp = cluster_get_reference_process_from_pid( pid ); 844 844 845 assert( (ref_xp != XPTR_NULL) , __FUNCTION__ ,"illegal pid\n" );845 assert( (ref_xp != XPTR_NULL) , "illegal pid\n" ); 846 846 847 847 // allocate memory for local process descriptor … … 1046 1046 1047 1047 1048 assert( (process != NULL) , __FUNCTION__ ,"process argument is NULL" );1049 1050 assert( (thread != NULL) , __FUNCTION__ ,"thread argument is NULL" );1048 assert( (process != NULL) , "process argument is NULL" ); 1049 1050 assert( (thread != NULL) , "thread argument is NULL" ); 1051 1051 1052 1052 // take lock protecting th_tbl, depending on thread type: … … 1089 1089 uint32_t count; // number of threads in local process descriptor 1090 1090 1091 assert( (thread != NULL) , __FUNCTION__ ,"thread argument is NULL" );1091 assert( (thread != NULL) , "thread argument is NULL" ); 1092 1092 1093 1093 process_t * process = thread->process; … … 1101 1101 count = process->th_nr; 1102 1102 1103 assert( (count > 0) , __FUNCTION__ ,"process th_nr cannot be 0\n" );1103 assert( (count > 0) , "process th_nr cannot be 0\n" ); 1104 1104 1105 1105 // remove thread from th_tbl[] … … 1140 1140 ref_xp = hal_remote_lwd( XPTR( parent_process_cxy , &parent_process_ptr->ref_xp ) ); 1141 1141 1142 assert( (parent_process_xp == ref_xp ) , __FUNCTION__ ,1142 assert( (parent_process_xp == ref_xp ) , 1143 1143 "parent process must be the reference process\n" ); 1144 1144 … … 1243 1243 1244 1244 // check main thread LTID 1245 assert( (LTID_FROM_TRDID(thread->trdid) == 0) , __FUNCTION__ ,1245 assert( (LTID_FROM_TRDID(thread->trdid) == 0) , 1246 1246 "main thread must have LTID == 0\n" ); 1247 1247 … … 1421 1421 } 1422 1422 1423 assert( false, __FUNCTION__,"we should not execute this code");1423 assert( false, "we should not execute this code"); 1424 1424 1425 1425 return 0; … … 1491 1491 process = process_alloc(); 1492 1492 1493 assert( (process != NULL), __FUNCTION__,1493 assert( (process != NULL), 1494 1494 "no memory for process descriptor in cluster %x\n", local_cxy ); 1495 1495 … … 1497 1497 error = cluster_pid_alloc( process , &pid ); 1498 1498 1499 assert( (error == 0), __FUNCTION__,1499 assert( (error == 0), 1500 1500 "cannot allocate PID in cluster %x\n", local_cxy ); 1501 1501 1502 assert( (pid == 1) , __FUNCTION__,1502 assert( (pid == 1) , 1503 1503 "process INIT must be first process in cluster 0\n" ); 1504 1504 … … 1518 1518 &file_id ); 1519 1519 1520 assert( (error == 0), __FUNCTION__,1520 assert( (error == 0), 1521 1521 "failed to open file <%s>\n", CONFIG_PROCESS_INIT_PATH ); 1522 1522 … … 1525 1525 error = elf_load_process( file_xp , process ); 1526 1526 1527 assert( (error == 0), __FUNCTION__,1527 assert( (error == 0), 1528 1528 "cannot access .elf file <%s>\n", CONFIG_PROCESS_INIT_PATH ); 1529 1529 … … 1553 1553 &thread ); 1554 1554 1555 assert( (error == 0), __FUNCTION__,1555 assert( (error == 0), 1556 1556 "cannot create main thread for <%s>\n", CONFIG_PROCESS_INIT_PATH ); 1557 1557 1558 assert( (thread->trdid == 0), __FUNCTION__,1558 assert( (thread->trdid == 0), 1559 1559 "main thread must have index 0 for <%s>\n", CONFIG_PROCESS_INIT_PATH ); 1560 1560 … … 1631 1631 txt_file_xp = hal_remote_lwd( XPTR( owner_cxy , &owner_ptr->fd_array.array[0] ) ); 1632 1632 1633 assert( (txt_file_xp != XPTR_NULL) , __FUNCTION__ ,1633 assert( (txt_file_xp != XPTR_NULL) , 1634 1634 "process must be attached to one TXT terminal\n" ); 1635 1635 … … 1695 1695 } 1696 1696 1697 assert( false , __FUNCTION__ ,"no free TXT terminal found" );1697 assert( false , "no free TXT terminal found" ); 1698 1698 1699 1699 return -1; … … 1712 1712 1713 1713 // check process is in owner cluster 1714 assert( (CXY_FROM_PID( process->pid ) == local_cxy) , __FUNCTION__ ,1714 assert( (CXY_FROM_PID( process->pid ) == local_cxy) , 1715 1715 "process descriptor not in owner cluster" ); 1716 1716 1717 1717 // check terminal index 1718 1718 assert( (txt_id < LOCAL_CLUSTER->nb_txt_channels) , 1719 __FUNCTION__ ,"illegal TXT terminal index" );1719 "illegal TXT terminal index" ); 1720 1720 1721 1721 // get pointers on TXT_RX[txt_id] chdev … … 1761 1761 // check process descriptor in owner cluster 1762 1762 process_pid = hal_remote_lw( XPTR( process_cxy , &process_ptr->pid ) ); 1763 assert( (CXY_FROM_PID( process_pid ) == process_cxy ) , __FUNCTION__ ,1763 assert( (CXY_FROM_PID( process_pid ) == process_cxy ) , 1764 1764 "process descriptor not in owner cluster" ); 1765 1765 … … 1811 1811 1812 1812 // check owner cluster 1813 assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,1813 assert( (process_cxy == CXY_FROM_PID( process_pid )) , 1814 1814 "process descriptor not in owner cluster\n" ); 1815 1815 … … 1864 1864 1865 1865 // check owner cluster 1866 assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,1866 assert( (process_cxy == CXY_FROM_PID( process_pid )) , 1867 1867 "process descriptor not in owner cluster\n" ); 1868 1868 … … 1922 1922 1923 1923 // PANIC if KSH not found 1924 assert( false , __FUNCTION__ , "KSH process not found for TXT %d" );1924 assert( false , "KSH process not found for TXT %d" ); 1925 1925 1926 1926 return; … … 1995 1995 // check owner cluster 1996 1996 pid_t process_pid = hal_remote_lw( XPTR( process_cxy , &process_ptr->pid ) ); 1997 assert( (process_cxy == CXY_FROM_PID( process_pid )) , __FUNCTION__,1997 assert( (process_cxy == CXY_FROM_PID( process_pid )) , 1998 1998 "process descriptor not in owner cluster\n" ); 1999 1999 … … 2041 2041 2042 2042 assert( (txt_id < LOCAL_CLUSTER->nb_txt_channels) , 2043 __FUNCTION__ ,"illegal TXT terminal index" );2043 "illegal TXT terminal index" ); 2044 2044 2045 2045 // get pointers on TXT0 chdev -
trunk/kernel/kern/rpc.c
r485 r492 85 85 void __attribute__((noinline)) rpc_undefined() 86 86 { 87 assert( false , __FUNCTION__ ,"called in cluster %x", local_cxy );87 assert( false , "called in cluster %x", local_cxy ); 88 88 } 89 89 … … 204 204 205 205 // check response available 206 assert( (rpc->responses == 0) , __FUNCTION__,"illegal RPC response\n" );206 assert( (rpc->responses == 0) , "illegal RPC response\n" ); 207 207 } 208 208 else // non blocking RPC … … 280 280 core->lid ); 281 281 282 assert( (error == 0), __FUNCTION__ ,282 assert( (error == 0), 283 283 "no memory to allocate a new RPC thread in cluster %x", local_cxy ); 284 284 … … 459 459 460 460 // RPC thread deschedules 461 assert( thread_can_yield( server_ptr ) , __FUNCTION__,"illegal sched_yield\n" );461 assert( thread_can_yield( server_ptr ) , "illegal sched_yield\n" ); 462 462 sched_yield("RPC fifo empty"); 463 463 } … … 484 484 #endif 485 485 486 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");486 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 487 487 488 488 // initialise RPC descriptor header … … 555 555 #endif 556 556 557 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");557 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 558 558 559 559 // initialise RPC descriptor header … … 631 631 #endif 632 632 633 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");633 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 634 634 635 635 // initialise RPC descriptor header … … 723 723 error_t * error ) // out 724 724 { 725 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");725 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 726 726 727 727 // initialise RPC descriptor header … … 803 803 error_t * error ) // out 804 804 { 805 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");805 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 806 806 807 807 // initialise RPC descriptor header … … 879 879 880 880 // check some RPC arguments 881 assert( (rpc->blocking == false) , __FUNCTION__ ,"must be non-blocking\n");882 assert( (rpc->index == RPC_PROCESS_SIGACTION ) , __FUNCTION__ ,"bad RPC index\n" );881 assert( (rpc->blocking == false) , "must be non-blocking\n"); 882 assert( (rpc->index == RPC_PROCESS_SIGACTION ) , "bad RPC index\n" ); 883 883 884 884 // register RPC request in remote RPC fifo and return … … 987 987 #endif 988 988 989 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");989 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 990 990 991 991 // initialise RPC descriptor header … … 1094 1094 #endif 1095 1095 1096 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1096 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1097 1097 1098 1098 // initialise RPC descriptor header … … 1172 1172 #endif 1173 1173 1174 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1174 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1175 1175 1176 1176 // initialise RPC descriptor header … … 1263 1263 #endif 1264 1264 1265 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1265 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1266 1266 1267 1267 // initialise RPC descriptor header … … 1341 1341 #endif 1342 1342 1343 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1343 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1344 1344 1345 1345 // initialise RPC descriptor header … … 1423 1423 #endif 1424 1424 1425 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1425 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1426 1426 1427 1427 // initialise RPC descriptor header … … 1486 1486 error_t * error ) // out 1487 1487 { 1488 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1488 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1489 1489 1490 1490 // initialise RPC descriptor header … … 1547 1547 error_t * error ) // out 1548 1548 { 1549 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1549 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1550 1550 1551 1551 // initialise RPC descriptor header … … 1599 1599 error_t * error ) // out 1600 1600 { 1601 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1601 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1602 1602 1603 1603 // initialise RPC descriptor header … … 1666 1666 #endif 1667 1667 1668 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1668 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1669 1669 1670 1670 // initialise RPC descriptor header … … 1754 1754 #endif 1755 1755 1756 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1756 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1757 1757 1758 1758 // initialise RPC descriptor header … … 1834 1834 xptr_t * buf_xp ) // out 1835 1835 { 1836 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1836 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1837 1837 1838 1838 // initialise RPC descriptor header … … 1884 1884 uint32_t kmem_type ) // in 1885 1885 { 1886 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1886 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1887 1887 1888 1888 // initialise RPC descriptor header … … 1934 1934 error_t * error ) // out 1935 1935 { 1936 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");1936 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 1937 1937 1938 1938 // initialise RPC descriptor header … … 2018 2018 page_t ** page ) // out 2019 2019 { 2020 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");2020 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 2021 2021 2022 2022 // initialise RPC descriptor header … … 2073 2073 struct vseg_s ** vseg ) 2074 2074 { 2075 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");2075 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 2076 2076 2077 2077 // initialise RPC descriptor header … … 2143 2143 process_t * process ) 2144 2144 { 2145 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");2145 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 2146 2146 2147 2147 // initialise RPC descriptor header … … 2185 2185 bool_t detailed ) 2186 2186 { 2187 assert( (cxy != local_cxy) , __FUNCTION__ ,"target cluster is not remote\n");2187 assert( (cxy != local_cxy) , "target cluster is not remote\n"); 2188 2188 2189 2189 // initialise RPC descriptor header -
trunk/kernel/kern/scheduler.c
r470 r492 124 124 while( done == false ) 125 125 { 126 assert( (count < sched->k_threads_nr), __FUNCTION__,"bad kernel threads list" );126 assert( (count < sched->k_threads_nr), "bad kernel threads list" ); 127 127 128 128 // get next entry in kernel list … … 159 159 while( done == false ) 160 160 { 161 assert( (count < sched->u_threads_nr), __FUNCTION__,"bad user threads list" );161 assert( (count < sched->u_threads_nr), "bad user threads list" ); 162 162 163 163 // get next entry in user list … … 228 228 // check thread blocked 229 229 assert( (thread->blocked & THREAD_BLOCKED_GLOBAL) , 230 __FUNCTION__ ,"thread not blocked" );230 "thread not blocked" ); 231 231 232 232 // decrement response counter … … 249 249 uint32_t threads_nr = sched->u_threads_nr; 250 250 251 assert( (threads_nr != 0) , __FUNCTION__ ,"u_threads_nr cannot be 0\n" );251 assert( (threads_nr != 0) , "u_threads_nr cannot be 0\n" ); 252 252 253 253 sched->u_threads_nr = threads_nr - 1; … … 327 327 328 328 // check next thread kernel_stack overflow 329 assert( (next->signature == THREAD_SIGNATURE), __FUNCTION__ ,329 assert( (next->signature == THREAD_SIGNATURE), 330 330 "kernel stack overflow for thread %x on core[%x,%d] \n", next, local_cxy, core->lid ); 331 331 332 332 // check next thread attached to same core as the calling thread 333 assert( (next->core == current->core), __FUNCTION__ ,333 assert( (next->core == current->core), 334 334 "next core %x != current core %x\n", next->core, current->core ); 335 335 336 336 // check next thread not blocked when type != IDLE 337 assert( ((next->blocked == 0) || (next->type == THREAD_IDLE)) , __FUNCTION__ ,337 assert( ((next->blocked == 0) || (next->type == THREAD_IDLE)) , 338 338 "next thread %x (%s) is blocked on core[%x,%d]\n", 339 339 next->trdid , thread_type_str(next->type) , local_cxy , core->lid ); … … 396 396 uint32_t save_sr; 397 397 398 assert( (lid < LOCAL_CLUSTER->cores_nr), __FUNCTION__,"illegal core index %d\n", lid);398 assert( (lid < LOCAL_CLUSTER->cores_nr), "illegal core index %d\n", lid); 399 399 400 400 core_t * core = &LOCAL_CLUSTER->core_tbl[lid]; … … 456 456 // check cxy 457 457 bool_t undefined = cluster_is_undefined( cxy ); 458 assert( (undefined == false), __FUNCTION__,"illegal cluster %x\n", cxy );458 assert( (undefined == false), "illegal cluster %x\n", cxy ); 459 459 460 460 // check lid 461 461 uint32_t cores = hal_remote_lw( XPTR( cxy , &LOCAL_CLUSTER->cores_nr ) ); 462 assert( (lid < cores), __FUNCTION__,"illegal core index %d\n", lid);462 assert( (lid < cores), "illegal core index %d\n", lid); 463 463 464 464 // get local pointer on target scheduler -
trunk/kernel/kern/thread.c
r485 r492 238 238 vseg_t * vseg; // stack vseg 239 239 240 assert( (attr != NULL) , __FUNCTION__,"pthread attributes must be defined" );240 assert( (attr != NULL) , "pthread attributes must be defined" ); 241 241 242 242 #if DEBUG_THREAD_USER_CREATE … … 594 594 #endif 595 595 596 assert( (thread->type == THREAD_USER ) , __FUNCTION__,"bad type" );597 assert( (thread->signature == THREAD_SIGNATURE) , __FUNCTION__,"bad signature" );598 assert( (thread->local_locks == 0) , __FUNCTION__,"bad local locks" );599 assert( (thread->remote_locks == 0) , __FUNCTION__,"bad remote locks" );596 assert( (thread->type == THREAD_USER ) , "bad type" ); 597 assert( (thread->signature == THREAD_SIGNATURE) , "bad signature" ); 598 assert( (thread->local_locks == 0) , "bad local locks" ); 599 assert( (thread->remote_locks == 0) , "bad remote locks" ); 600 600 601 601 // re-initialize various thread descriptor fields … … 662 662 hal_cpu_context_exec( thread ); 663 663 664 assert( false, __FUNCTION__,"we should execute this code");664 assert( false, "we should execute this code"); 665 665 666 666 return 0; … … 679 679 680 680 assert( ( (type == THREAD_IDLE) || (type == THREAD_RPC) || (type == THREAD_DEV) ) , 681 __FUNCTION__ ,"illegal thread type" );681 "illegal thread type" ); 682 682 683 683 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , 684 __FUNCTION__ ,"illegal core_lid" );684 "illegal core_lid" ); 685 685 686 686 #if DEBUG_THREAD_KERNEL_CREATE … … 740 740 lid_t core_lid ) 741 741 { 742 assert( (type == THREAD_IDLE) , __FUNCTION__ ,"illegal thread type" );743 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , __FUNCTION__ ,"illegal core index" );742 assert( (type == THREAD_IDLE) , "illegal thread type" ); 743 assert( (core_lid < LOCAL_CLUSTER->cores_nr) , "illegal core index" ); 744 744 745 745 // initialize thread descriptor … … 752 752 0 , 0 ); // no user stack for a kernel thread 753 753 754 assert( (error == 0), __FUNCTION__,"cannot create thread idle" );754 assert( (error == 0), "cannot create thread idle" ); 755 755 756 756 // allocate & initialize CPU context if success 757 757 error = hal_cpu_context_alloc( thread ); 758 758 759 assert( (error == 0), __FUNCTION__,"cannot allocate CPU context" );759 assert( (error == 0), "cannot allocate CPU context" ); 760 760 761 761 hal_cpu_context_init( thread ); … … 782 782 #endif 783 783 784 assert( (thread->local_locks == 0) , __FUNCTION__ ,784 assert( (thread->local_locks == 0) , 785 785 "local lock not released for thread %x in process %x", thread->trdid, process->pid ); 786 786 787 assert( (thread->remote_locks == 0) , __FUNCTION__ ,787 assert( (thread->remote_locks == 0) , 788 788 "remote lock not released for thread %x in process %x", thread->trdid, process->pid ); 789 789 … … 867 867 868 868 // check signal pending in scheduler 869 assert( sched->req_ack_pending , __FUNCTION__ ,"no pending signal" );869 assert( sched->req_ack_pending , "no pending signal" ); 870 870 871 871 // enter critical section … … 1005 1005 // must be deleted by the parent process sys_wait() function 1006 1006 owner_cxy = CXY_FROM_PID( pid ); 1007 assert( ((owner_cxy != target_cxy) || (target_ltid != 0)), __FUNCTION__,1007 assert( ((owner_cxy != target_cxy) || (target_ltid != 0)), 1008 1008 "tharget thread cannot be the main thread\n" ); 1009 1009 -
trunk/kernel/libk/grdxt.c
r473 r492 165 165 if( (key >> (w1 + w2 + w3)) != 0 ) 166 166 { 167 assert( false , __FUNCTION__ ,167 assert( false , 168 168 "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 ); 169 169 } … … 237 237 if( (key >> (w1 + w2 + w3)) != 0 ) 238 238 { 239 assert( false , __FUNCTION__ ,239 assert( false , 240 240 "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 ); 241 241 } … … 279 279 if( (key >> (w1 + w2 + w3)) != 0 ) 280 280 { 281 assert( false , __FUNCTION__ ,281 assert( false , 282 282 "key value %x exceed (%d + %d + %d) bits", key , w1 , w2 , w3 ); 283 283 } … … 322 322 if( (start_key >> (w1 + w2 + w3)) != 0 ) 323 323 { 324 assert( false , __FUNCTION__ ,324 assert( false , 325 325 "start_key value %x exceed (%d + %d + %d) bits", start_key , w1 , w2 , w3 ); 326 326 } -
trunk/kernel/libk/htab.c
r457 r492 99 99 else 100 100 { 101 assert( false , __FUNCTION__ ,"undefined item type\n" );101 assert( false , "undefined item type\n" ); 102 102 } 103 103 -
trunk/kernel/libk/xhtab.c
r457 r492 139 139 else 140 140 { 141 assert( false , __FUNCTION__ ,"illegal item type\n" );141 assert( false , "illegal item type\n" ); 142 142 } 143 143 -
trunk/kernel/mm/kcm.c
r464 r492 56 56 #endif 57 57 58 assert( kcm_page->active , __FUNCTION__ ,"kcm_page should be active" );58 assert( kcm_page->active , "kcm_page should be active" ); 59 59 60 60 // get first block available 61 61 int32_t index = bitmap_ffs( kcm_page->bitmap , kcm->blocks_nr ); 62 62 63 assert( (index != -1) , __FUNCTION__ ,"kcm_page should not be full" );63 assert( (index != -1) , "kcm_page should not be full" ); 64 64 65 65 // allocate block … … 113 113 index = ((uint8_t *)ptr - (uint8_t *)kcm_page - CONFIG_KCM_SLOT_SIZE) / kcm->block_size; 114 114 115 assert( !bitmap_state( kcm_page->bitmap , index ) , __FUNCTION__ ,"page already freed" );116 assert( (kcm_page->count > 0) , __FUNCTION__ ,"count already zero" );115 assert( !bitmap_state( kcm_page->bitmap , index ) , "page already freed" ); 116 assert( (kcm_page->count > 0) , "count already zero" ); 117 117 118 118 bitmap_set( kcm_page->bitmap , index ); … … 216 216 // the kcm_page descriptor mut fit in the KCM slot 217 217 assert( (sizeof(kcm_page_t) <= CONFIG_KCM_SLOT_SIZE) , 218 __FUNCTION__ ,"KCM slot too small\n" );218 "KCM slot too small\n" ); 219 219 220 220 // initialize lock … … 329 329 kcm_t * kcm; 330 330 331 assert( (ptr != NULL) , __FUNCTION__ ,"pointer cannot be NULL" );331 assert( (ptr != NULL) , "pointer cannot be NULL" ); 332 332 333 333 kcm_page = (kcm_page_t *)((intptr_t)ptr & ~CONFIG_PPM_PAGE_MASK); -
trunk/kernel/mm/khm.c
r457 r492 40 40 { 41 41 // check config parameters 42 assert( ((CONFIG_PPM_PAGE_SHIFT + CONFIG_PPM_HEAP_ORDER) < 32 ) , __FUNCTION__ ,42 assert( ((CONFIG_PPM_PAGE_SHIFT + CONFIG_PPM_HEAP_ORDER) < 32 ) , 43 43 "CONFIG_PPM_HEAP_ORDER too large" ); 44 44 … … 142 142 spinlock_lock(&khm->lock); 143 143 144 assert( (current->busy == 1) , __FUNCTION__ ,"page already freed" );144 assert( (current->busy == 1) , "page already freed" ); 145 145 146 146 // release block -
trunk/kernel/mm/kmem.c
r486 r492 143 143 kcm_t * kcm; 144 144 145 assert( ((type > 1) && (type < KMEM_TYPES_NR) ) , __FUNCTION__ ,"illegal KCM type" );145 assert( ((type > 1) && (type < KMEM_TYPES_NR) ) , "illegal KCM type" ); 146 146 147 147 #if DEBUG_KMEM … … 198 198 flags = req->flags; 199 199 200 assert( (type < KMEM_TYPES_NR) , __FUNCTION__ ,"illegal KMEM request type" );200 assert( (type < KMEM_TYPES_NR) , "illegal KMEM request type" ); 201 201 202 202 #if DEBUG_KMEM … … 293 293 if( req->type >= KMEM_TYPES_NR ) 294 294 { 295 assert( false , __FUNCTION__ ,"illegal request type\n" );295 assert( false , "illegal request type\n" ); 296 296 } 297 297 -
trunk/kernel/mm/ppm.c
r486 r492 152 152 page_t * pages_tbl = ppm->pages_tbl; 153 153 154 assert( !page_is_flag( page , PG_FREE ) , __FUNCTION__ ,154 assert( !page_is_flag( page , PG_FREE ) , 155 155 "page already released : ppn = %x\n" , ppm_page2ppn(XPTR(local_cxy,page)) ); 156 156 157 assert( !page_is_flag( page , PG_RESERVED ) , __FUNCTION__ ,157 assert( !page_is_flag( page , PG_RESERVED ) , 158 158 "reserved page : ppn = %x\n" , ppm_page2ppn(XPTR(local_cxy,page)) ); 159 159 … … 215 215 ppm_t * ppm = &LOCAL_CLUSTER->ppm; 216 216 217 assert( (order < CONFIG_PPM_MAX_ORDER) , __FUNCTION__ ,217 assert( (order < CONFIG_PPM_MAX_ORDER) , 218 218 "illegal order argument = %x\n" , order ); 219 219 -
trunk/kernel/mm/vmm.c
r473 r492 79 79 80 80 assert( ((CONFIG_VMM_KENTRY_SIZE + CONFIG_VMM_ARGS_SIZE + CONFIG_VMM_ENVS_SIZE) 81 <= CONFIG_VMM_ELF_BASE) , __FUNCTION__ ,"UTILS zone too small\n" );82 83 assert( (CONFIG_THREAD_MAX_PER_CLUSTER <= 32) , __FUNCTION__ ,81 <= CONFIG_VMM_ELF_BASE) , "UTILS zone too small\n" ); 82 83 assert( (CONFIG_THREAD_MAX_PER_CLUSTER <= 32) , 84 84 "no more than 32 threads per cluster for a single process\n"); 85 85 86 86 assert( ((CONFIG_VMM_STACK_SIZE * CONFIG_THREAD_MAX_PER_CLUSTER) <= 87 (CONFIG_VMM_VSPACE_SIZE - CONFIG_VMM_STACK_BASE)) , __FUNCTION__ ,87 (CONFIG_VMM_VSPACE_SIZE - CONFIG_VMM_STACK_BASE)) , 88 88 "STACK zone too small\n"); 89 89 … … 274 274 275 275 // check cluster is reference 276 assert( (GET_CXY( process->ref_xp ) == local_cxy) , __FUNCTION__,276 assert( (GET_CXY( process->ref_xp ) == local_cxy) , 277 277 "not called in reference cluster\n"); 278 278 … … 346 346 347 347 // check cluster is reference 348 assert( (GET_CXY( process->ref_xp ) == local_cxy) , __FUNCTION__,348 assert( (GET_CXY( process->ref_xp ) == local_cxy) , 349 349 "local cluster is not process reference cluster\n"); 350 350 … … 386 386 vseg = GET_PTR( vseg_xp ); 387 387 388 assert( (GET_CXY( vseg_xp ) == local_cxy) , __FUNCTION__,388 assert( (GET_CXY( vseg_xp ) == local_cxy) , 389 389 "all vsegs in reference VSL must be local\n" ); 390 390 … … 1112 1112 1113 1113 // check small page 1114 assert( (attr & GPT_SMALL) , __FUNCTION__ ,1114 assert( (attr & GPT_SMALL) , 1115 1115 "an user vseg must use small pages" ); 1116 1116 … … 1380 1380 uint32_t flags = vseg->flags; 1381 1381 1382 assert( ( type != VSEG_TYPE_FILE ) , __FUNCTION__ ,"illegal vseg type\n" );1382 assert( ( type != VSEG_TYPE_FILE ) , "illegal vseg type\n" ); 1383 1383 1384 1384 if( flags & VSEG_DISTRIB ) // distributed => cxy depends on vpn LSB … … 1448 1448 xptr_t mapper_xp = vseg->mapper_xp; 1449 1449 1450 assert( (mapper_xp != XPTR_NULL), __FUNCTION__,1450 assert( (mapper_xp != XPTR_NULL), 1451 1451 "mapper not defined for a FILE vseg\n" ); 1452 1452 … … 1486 1486 xptr_t mapper_xp = vseg->mapper_xp; 1487 1487 1488 assert( (mapper_xp != XPTR_NULL), __FUNCTION__,1488 assert( (mapper_xp != XPTR_NULL), 1489 1489 "mapper not defined for a CODE or DATA vseg\n" ); 1490 1490 … … 1655 1655 1656 1656 // vseg has been checked by the vmm_handle_page_fault() function 1657 assert( (vseg != NULL) , __FUNCTION__, 1658 "vseg undefined / vpn %x / thread %x in process %x / core[%x,%d] / cycle %d\n", 1659 vpn, this->trdid, process->pid, local_cxy, this->core->lid, 1660 (uint32_t)hal_get_cycles() ); 1657 assert( (vseg != NULL) , "vseg undefined / vpn %x\n"); 1661 1658 1662 1659 if( cow ) //////////////// copy_on_write request ////////////////////// … … 1669 1666 hal_gpt_get_pte( &vmm->gpt , vpn , &old_attr , &old_ppn ); 1670 1667 1671 assert( (old_attr & GPT_MAPPED), __FUNCTION__, 1672 "PTE unmapped for a COW exception / vpn %x / thread %x in process %x / cycle %d\n", 1673 vpn, this, process->pid, (uint32_t)hal_get_cycles() ); 1668 assert( (old_attr & GPT_MAPPED), 1669 "PTE unmapped for a COW exception / vpn %x\n" ); 1674 1670 1675 1671 #if( DEBUG_VMM_GET_PTE & 1 ) -
trunk/kernel/mm/vseg.c
r473 r492 145 145 else 146 146 { 147 assert( false , __FUNCTION__ ,"illegal vseg type\n" );147 assert( false , "illegal vseg type\n" ); 148 148 } 149 149 … … 191 191 default: 192 192 { 193 assert( false, __FUNCTION__,"Illegal vseg type" );193 assert( false, "Illegal vseg type" ); 194 194 break; 195 195 } -
trunk/kernel/syscalls/sys_exec.c
r457 r492 174 174 pid_t pid = process->pid; 175 175 176 assert( (CXY_FROM_PID( pid ) == local_cxy) , __FUNCTION__ ,176 assert( (CXY_FROM_PID( pid ) == local_cxy) , 177 177 "must be called in the owner cluster\n"); 178 178 179 assert( (LTID_FROM_TRDID( this->trdid ) == 0) , __FUNCTION__ ,179 assert( (LTID_FROM_TRDID( this->trdid ) == 0) , 180 180 "must be called by the main thread\n"); 181 181 182 assert( (args == NULL) , __FUNCTION__ ,182 assert( (args == NULL) , 183 183 "args not supported yet\n" ); 184 184 185 assert( (envs == NULL) , __FUNCTION__ ,185 assert( (envs == NULL) , 186 186 "args not supported yet\n" ); 187 187 … … 252 252 } 253 253 254 assert( false , __FUNCTION__,"we should not execute this code" );254 assert( false , "we should not execute this code" ); 255 255 256 256 return 0; -
trunk/kernel/syscalls/sys_read.c
r469 r492 209 209 { 210 210 nbytes = 0; 211 assert( false , __FUNCTION__ ,"file type %d non supported yet\n", type );211 assert( false , "file type %d non supported yet\n", type ); 212 212 } 213 213 -
trunk/kernel/syscalls/sys_write.c
r469 r492 173 173 { 174 174 nbytes = 0; 175 assert( false , __FUNCTION__ ,"file type %d non supported\n", type );175 assert( false , "file type %d non supported\n", type ); 176 176 } 177 177
Note: See TracChangeset
for help on using the changeset viewer.