Mercurial > hg > freeDiameter
comparison include/freeDiameter/libfreeDiameter.h @ 10:c5c99c73c2bf
Added some extensions and functions in the daemon
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Fri, 25 Sep 2009 16:12:08 +0900 |
parents | 3e143f047f78 |
children | ef9ef3bf4752 |
comparison
equal
deleted
inserted
replaced
9:fc7c18867cf7 | 10:c5c99c73c2bf |
---|---|
168 /* The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) */ | 168 /* The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) */ |
169 #define TRACE_DEBUG(level,format,args... ) { \ | 169 #define TRACE_DEBUG(level,format,args... ) { \ |
170 if ( TRACE_BOOL(level) ) { \ | 170 if ( TRACE_BOOL(level) ) { \ |
171 char __buf[25]; \ | 171 char __buf[25]; \ |
172 char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); \ | 172 char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); \ |
173 fd_log_debug("\t | th:%-30s\t%s\tin %s@%s:%d\n" \ | 173 fd_log_debug("\t | tid:%-20s\t%s\tin %s@%s:%d\n" \ |
174 "\t%s|%*s" format "\n", \ | 174 "\t%s|%*s" format "\n", \ |
175 __thn, fd_log_time(__buf, sizeof(__buf)), __PRETTY_FUNCTION__, __FILE__, __LINE__, \ | 175 __thn, fd_log_time(__buf, sizeof(__buf)), __PRETTY_FUNCTION__, __FILE__, __LINE__, \ |
176 (level < FULL)?"@":" ",level, "", ## args); \ | 176 (level < FULL)?"@":" ",level, "", ## args); \ |
177 } \ | 177 } \ |
178 } | 178 } |
2453 */ | 2453 */ |
2454 int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime ); | 2454 int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime ); |
2455 #define fd_fifo_timedget(queue, item, abstime) \ | 2455 #define fd_fifo_timedget(queue, item, abstime) \ |
2456 fd_fifo_timedget_int((queue), (void *)(item), (abstime)) | 2456 fd_fifo_timedget_int((queue), (void *)(item), (abstime)) |
2457 | 2457 |
2458 /* Dump a fifo list and optionally its inner elements -- beware of deadlocks! */ | |
2459 void fd_fifo_dump(int level, char * name, struct fifo * queue, void (*dump_item)(int level, void * item)); | |
2460 | |
2458 #endif /* _LIBFREEDIAMETER_H */ | 2461 #endif /* _LIBFREEDIAMETER_H */ |