Changeset 603 for trunk/kernel/libk/xhtab.c
- Timestamp:
- Dec 3, 2018, 12:17:35 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/libk/xhtab.c
r563 r603 203 203 204 204 #if DEBUG_XHTAB 205 printk("\n[ DBG] %s : enter /%s\n", __FUNCTION__, key );205 printk("\n[%s] enter / key %s\n", __FUNCTION__, key ); 206 206 #endif 207 207 … … 241 241 242 242 #if DEBUG_XHTAB 243 printk("\n[ DBG] %s :success / %s\n", __FUNCTION__, key );243 printk("\n[%s] success / %s\n", __FUNCTION__, key ); 244 244 #endif 245 245 … … 248 248 } // end xhtab_insert() 249 249 250 ///////////////////////////////////// 251 error_t xhtab_remove( xptr_t xhtab_xp,252 253 250 /////////////////////////////////////// 251 bool_t xhtab_remove( xptr_t xhtab_xp, 252 void * key, 253 xptr_t xlist_entry_xp ) 254 254 { 255 255 xptr_t item_xp; … … 275 275 item_xp = xhtab_scan( xhtab_xp , index , key ); 276 276 277 if( item_xp == XPTR_NULL ) // error if not found277 if( item_xp == XPTR_NULL ) // return error if not found 278 278 { 279 279 // release the lock protecting hash table 280 280 remote_busylock_release( XPTR( xhtab_cxy , &xhtab_ptr->lock ) ); 281 281 282 return EINVAL;282 return false; 283 283 } 284 284 else // remove item if found … … 293 293 remote_busylock_release( XPTR( xhtab_cxy , &xhtab_ptr->lock ) ); 294 294 295 return 0;295 return true; 296 296 } 297 297 } // end xhtab_remove() … … 318 318 319 319 #if DEBUG_XHTAB 320 printk("\n[ DBG] %s :enter / %s\n", __FUNCTION__, key );320 printk("\n[%s] enter / %s\n", __FUNCTION__, key ); 321 321 #endif 322 322 … … 325 325 326 326 #if DEBUG_XHTAB 327 printk("\n[ DBG] %s :after lock acquire / %s\n", __FUNCTION__, key );327 printk("\n[%s] after lock acquire / %s\n", __FUNCTION__, key ); 328 328 #endif 329 329 … … 332 332 333 333 #if DEBUG_XHTAB 334 printk("\n[ DBG] %s :after xhtab scan / %s\n", __FUNCTION__, key );334 printk("\n[%s] after xhtab scan / %s\n", __FUNCTION__, key ); 335 335 #endif 336 336 … … 339 339 340 340 #if DEBUG_XHTAB 341 printk("\n[ DBG] %s :after lock release / %s\n", __FUNCTION__, key );341 printk("\n[%s] after lock release / %s\n", __FUNCTION__, key ); 342 342 #endif 343 343
Note: See TracChangeset
for help on using the changeset viewer.