diff options
author | Michael Zucci <zucchi@src.gnome.org> | 2001-01-03 08:09:02 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-01-03 08:09:02 +0800 |
commit | 95279feb147f5370fe1e15d4f6674f0ca7b98a3b (patch) | |
tree | 8df0d42c0c6bffbae7c592a95148f019a3e71e02 | |
parent | 33d8b1d31cd6d8a54cbb85bb0a96916b4fbdb6a0 (diff) | |
download | gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar.gz gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar.bz2 gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar.lz gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar.xz gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.tar.zst gsoc2013-evolution-95279feb147f5370fe1e15d4f6674f0ca7b98a3b.zip |
Some debug commented out, static list intialiser.
svn path=/trunk/; revision=7221
-rw-r--r-- | e-util/e-msgport.c | 13 | ||||
-rw-r--r-- | e-util/e-msgport.h | 2 |
2 files changed, 9 insertions, 6 deletions
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 <pthread.h> +#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); diff --git a/e-util/e-msgport.h b/e-util/e-msgport.h index c8cede5361..6e25235bbd 100644 --- a/e-util/e-msgport.h +++ b/e-util/e-msgport.h @@ -14,6 +14,8 @@ typedef struct _EDList { struct _EDListNode *tailpred; } EDList; +#define E_DLIST_INITIALISER(l) { (EDListNode *)&l.tail, 0, (EDListNode *)&l.head } + void e_dlist_init(EDList *v); EDListNode *e_dlist_addhead(EDList *l, EDListNode *n); EDListNode *e_dlist_addtail(EDList *l, EDListNode *n); |