Add stop signals to client threads

This commit is contained in:
Alex Young
2012-06-07 11:44:19 +01:00
parent cfa9f9c71f
commit a90f84972b
13 changed files with 417 additions and 100 deletions

View File

@@ -70,13 +70,16 @@ void set_debug(int value) {
# include <stdarg.h>
void debug(const char *msg, ...) {
va_list argp;
va_list argp;
va_start( argp, msg );
if ( global_debug ) {
fprintf(stderr, "%08x %4d: ", (int) pthread_self(), (int) clock() );
fprintf(stderr, msg, argp);
fprintf(stderr, "\n");
fprintf(stderr, "%08x %4d: ", (int) pthread_self(), (int) clock() );
vfprintf(stderr, msg, argp);
fprintf(stderr, "\n");
}
va_end( argp );
}
#endif