aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ndb/dn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/ndb/dn.c')
-rwxr-xr-xsrc/cmd/ndb/dn.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/src/cmd/ndb/dn.c b/src/cmd/ndb/dn.c
index a38d4305..b24a5ff4 100755
--- a/src/cmd/ndb/dn.c
+++ b/src/cmd/ndb/dn.c
@@ -4,6 +4,7 @@
#include <ctype.h>
#include <bio.h>
#include <ndb.h>
+#include <thread.h>
#include "dns.h"
/*
@@ -346,7 +347,6 @@ dnagedb(void)
DN *dp;
int i;
RR *rp;
- static ulong nextage;
lock(&dnlock);
@@ -370,7 +370,6 @@ dnauthdb(void)
int i;
Area *area;
RR *rp;
- static ulong nextage;
lock(&dnlock);
@@ -404,7 +403,7 @@ getactivity(Request *req)
{
int rv;
- if(traceactivity) syslog(0, "dns", "get %d by %d", dnvars.active, getpid());
+ if(traceactivity) syslog(0, "dns", "get %d by %d.%d", dnvars.active, getpid(), threadid());
lock(&dnvars.lk);
while(dnvars.mutex){
unlock(&dnvars.lk);
@@ -423,7 +422,7 @@ putactivity(void)
{
static ulong lastclean;
- if(traceactivity) syslog(0, "dns", "put %d by %d", dnvars.active, getpid());
+ if(traceactivity) syslog(0, "dns", "put %d by %d.%d", dnvars.active, getpid(), threadid());
lock(&dnvars.lk);
dnvars.active--;
assert(dnvars.active >= 0); /* "dnvars.active %d", dnvars.active */;
@@ -1179,36 +1178,6 @@ warning(char *fmt, ...)
}
/*
- * create a slave process to handle a request to avoid one request blocking
- * another
- */
-void
-slave(Request *req)
-{
- static int slaveid;
-
- if(req->isslave)
- return; /* we're already a slave process */
-
- /* limit parallelism */
- if(getactivity(req) > Maxactive){
- putactivity();
- return;
- }
-
- switch(rfork(RFPROC|RFNOTEG|RFMEM|RFNOWAIT)){
- case -1:
- putactivity();
- break;
- case 0:
- req->isslave = 1;
- break;
- default:
- longjmp(req->mret, 1);
- }
-}
-
-/*
* chasing down double free's
*/
void