Changeset 25:67ca08d5bc48 in freeDiameter for include/freeDiameter/libfreeDiameter.h
- Timestamp:
- Oct 26, 2009, 4:00:49 PM (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/freeDiameter/libfreeDiameter.h
r24 r25 427 427 428 428 429 /* Trace a binary buffer content */ 430 #define TRACE_DEBUG_BUFFER(level, prefix, buf, bufsz, suffix ) { \ 431 if ( TRACE_BOOL(level) ) { \ 432 int __i; \ 433 size_t __sz = (size_t)(bufsz); \ 434 uint8_t * __buf = (uint8_t *)(buf); \ 435 char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); \ 436 fd_log_debug("\t | tid:%-20s\t%s\tin %s@%s:%d\n" \ 437 "\t%s|%*s" prefix , \ 438 __thn, fd_log_time(NULL, __buf, sizeof(__buf)), __PRETTY_FUNCTION__, __FILE__, __LINE__,\ 439 (level < FULL)?"@":" ",level, ""); \ 440 for (__i = 0; __i < __sz; __i++) { \ 441 fd_log_debug("%02.2hhx", __buf[__i]); \ 442 } \ 443 fd_log_debug(suffix "\n"); \ 444 } \ 445 } 446 447 448 429 449 /*============================================================*/ 430 450 /* THREADS */ … … 508 528 void fd_list_insert_after ( struct fd_list * ref, struct fd_list * item ); 509 529 void fd_list_insert_before ( struct fd_list * ref, struct fd_list * item ); 530 531 /* Move a list at the end of another */ 532 void fd_list_move_end(struct fd_list * ref, struct fd_list * senti); 510 533 511 534 /* Insert an item in an ordered list -- ordering function provided. If duplicate object found, EEXIST and it is returned in ref_duplicate */ … … 2385 2408 2386 2409 /* 2410 * FUNCTION: fd_fifo_move 2411 * 2412 * PARAMETERS: 2413 * old : Location of a FIFO that is to be emptied and deleted. 2414 * new : A FIFO that will receive the old data. 2415 * loc_update : if non NULL, a place to store the pointer to new FIFO atomically with the move. 2416 * 2417 * DESCRIPTION: 2418 * Delete a queue and move its content to another one atomically. 2419 * 2420 * RETURN VALUE: 2421 * 0 : The queue has been destroyed successfully. 2422 * EINVAL : A parameter is invalid. 2423 */ 2424 int fd_fifo_move ( struct fifo ** old, struct fifo * new, struct fifo ** loc_update ); 2425 2426 /* 2387 2427 * FUNCTION: fd_fifo_length 2388 2428 *
Note: See TracChangeset
for help on using the changeset viewer.