diff options
author | Miles Bader <miles@gnu.org> | 1996-01-19 00:37:19 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-01-19 00:37:19 +0000 |
commit | 4403b5790aa970f7c6c0c1cab3acb43b390a081b (patch) | |
tree | 720c27bdf4b3263dc095ed501b22fa651d625d2c | |
parent | 52e3e9b45d780b4f92363e502e6413da5d4f7c4a (diff) |
Remove debugging noise.
-rw-r--r-- | pflocal/connq.c | 40 | ||||
-rw-r--r-- | pflocal/sock.h | 5 |
2 files changed, 4 insertions, 41 deletions
diff --git a/pflocal/connq.c b/pflocal/connq.c index 9c530704..5efeb5d2 100644 --- a/pflocal/connq.c +++ b/pflocal/connq.c @@ -22,8 +22,6 @@ #include "connq.h" -#include "debug.h" - /* A queue for queueing incoming connections. */ struct connq { @@ -123,29 +121,20 @@ error_t connq_listen (struct connq *cq, int noblock, struct connq_request **req, struct sock **sock) { -debug (cq, "in"); -debug (cq, "lock"); mutex_lock (&cq->lock); if (noblock && cq->head == cq->tail) -{debug (cq, "ewouldblock"); return EWOULDBLOCK; -} cq->num_listeners++; while (cq->head == cq->tail) -{debug (cq, "wait listeners"); if (hurd_condition_wait (&cq->listeners, &cq->lock)) { -debug (cq, "eintr"); cq->num_listeners--; -debug (cq, "unlock"); mutex_unlock (&cq->lock); -debug (cq, "out"); return EINTR; } -} if (req != NULL) /* Dequeue the next request, if desired. */ @@ -158,10 +147,8 @@ debug (cq, "out"); cq->num_listeners--; -debug (cq, "unlock"); mutex_unlock (&cq->lock); -debug (cq, "out"); return 0; } @@ -170,13 +157,10 @@ debug (cq, "out"); void connq_request_complete (struct connq_request *req, error_t err) { -debug (req, "lock"); mutex_lock (&req->lock); req->err = err; req->completed = 1; -debug (req, "signal, err: %d", err); condition_signal (&req->signal); -debug (req, "unlock"); mutex_unlock (&req->lock); } @@ -189,17 +173,14 @@ connq_connect (struct connq *cq, int noblock, struct sock *sock) error_t err = 0; unsigned next; -debug (cq, "in"); -debug (cq, "lock"); mutex_lock (&cq->lock); /* Check for listeners after we've locked CQ for good. */ if ((noblock || cq->noqueue) && cq->num_listeners == 0) -{debug (cq, "unlock"); - mutex_unlock (&cq->lock); -debug (cq, "ewouldblock"); - return EWOULDBLOCK; -} + { + mutex_unlock (&cq->lock); + return EWOULDBLOCK; + } next = qnext (cq, cq->tail); if (next == cq->tail) @@ -216,22 +197,14 @@ debug (cq, "ewouldblock"); /* Hold REQ.LOCK before we signal the condition so that we're sure to be woken up. */ -debug (&req, "(req) lock"); mutex_lock (&req.lock); - -debug (cq, "signal listeners"); condition_signal (&cq->listeners); -debug (cq, "unlock"); mutex_unlock (&cq->lock); while (!req.completed) -{debug (&req, "(req) wait"); condition_wait (&req.signal, &req.lock); -} - err = req.err; -debug (&req, "(req) unlock"); mutex_unlock (&req.lock); } @@ -245,7 +218,6 @@ connq_compress (struct connq *cq) unsigned pos; unsigned comp_tail = cq->head; -debug (cq, "compress queue"); /* Now compress the queue to remove any null entries we put in. */ for (pos = cq->head; pos != cq->tail; pos = qnext (cq, pos)) if (cq->queue[pos] != NULL) @@ -265,8 +237,6 @@ debug (cq, "compress queue"); error_t connq_set_length (struct connq *cq, int length) { -debug (cq, "in: %d", length); -debug (cq, "lock"); mutex_lock (&cq->lock); if (length > cq->length) @@ -296,9 +266,7 @@ debug (cq, "lock"); cq->noqueue = 0; /* Turn on queueing. */ -debug (cq, "unlock"); mutex_unlock (&cq->lock); -debug (cq, "out"); return 0; } diff --git a/pflocal/sock.h b/pflocal/sock.h index 23528480..2b1608d6 100644 --- a/pflocal/sock.h +++ b/pflocal/sock.h @@ -26,8 +26,6 @@ #include <hurd/ports.h> -#include "debug.h" - struct pipe; struct pipe_class; @@ -112,15 +110,12 @@ void _sock_norefs (struct sock *sock); extern inline void sock_deref (struct sock *sock) { - debug (sock, "lock, refs--"); mutex_lock (&sock->lock); if (--sock->refs == 0) _sock_norefs (sock); else -{debug (sock, "unlock"); mutex_unlock (&sock->lock); } -} /* Return a new socket just like TEMPLATE in SOCK. */ error_t sock_clone (struct sock *template, struct sock **sock); |