From 95279feb147f5370fe1e15d4f6674f0ca7b98a3b Mon Sep 17 00:00:00 2001 From: Michael Zucci Date: Wed, 3 Jan 2001 00:09:02 +0000 Subject: Some debug commented out, static list intialiser. svn path=/trunk/; revision=7221 --- e-util/e-msgport.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'e-util/e-msgport.c') diff --git a/e-util/e-msgport.c b/e-util/e-msgport.c index 107b889635..ab791f3262 100644 --- a/e-util/e-msgport.c +++ b/e-util/e-msgport.c @@ -13,6 +13,9 @@ #include +#define m(x) /* msgport debug */ +#define t(x) /* thread debug */ + void e_dlist_init(EDList *v) { v->head = (EDListNode *)&v->tail; @@ -109,8 +112,6 @@ struct _EMsgPort { GMutex *lock; }; -#define m(x) - EMsgPort *e_msgport_new(void) { EMsgPort *mp; @@ -290,7 +291,7 @@ void e_thread_destroy(EThread *e) pthread_join(id, 0); pthread_mutex_lock(&e->mutex); } else { - printf("thread still active, waiting for it to finish\n"); + (printf("thread still active, waiting for it to finish\n")); pthread_mutex_unlock(&e->mutex); sleep(1); pthread_mutex_lock(&e->mutex); @@ -301,7 +302,7 @@ void e_thread_destroy(EThread *e) break; case E_THREAD_NEW: while (g_list_length(e->id_list) && tries < 5) { - printf("thread(s) still active, waiting for them to finish\n"); + (printf("thread(s) still active, waiting for them to finish\n")); pthread_mutex_unlock(&e->mutex); sleep(1); pthread_mutex_lock(&e->mutex); @@ -419,7 +420,7 @@ thread_dispatch(void *din) EThread *e = din; EMsg *m; - printf("dispatch thread started: %ld\n", pthread_self()); + t(printf("dispatch thread started: %ld\n", pthread_self())); while (1) { pthread_mutex_lock(&e->mutex); @@ -445,7 +446,7 @@ thread_dispatch(void *din) } pthread_mutex_unlock(&e->mutex); - printf("got message in dispatch thread\n"); + t(printf("got message in dispatch thread\n")); /* process it */ thread_received_msg(e, m); -- cgit