From 880a2e11a9af744c7bc9121c25f81550b5700fdd Mon Sep 17 00:00:00 2001 From: ptt Date: Thu, 4 Apr 2002 18:02:31 +0000 Subject: *** empty log message *** git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@79 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/cache.c b/mbbsd/cache.c index bd380f19..374385e3 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.5 2002/04/03 17:41:12 in2 Exp $ */ +/* $Id: cache.c,v 1.6 2002/04/04 18:02:31 ptt Exp $ */ #include #include #include @@ -565,12 +565,12 @@ void load_fileheader_cache(int bid, char *direct) { int num=getbtotal(bid); int n = num-DIRCACHESIZE+1; - if (brdshm->busystate!=1) + if (brdshm->busystate!=1 && brdshm->busystate_b[bid-1]!=1) { - brdshm->busystate = 1; + brdshm->busystate_b[bid-1] = 1; get_records(direct, brdshm->dircache[bid - 1] , sizeof(fileheader_t),n<1?1:n, DIRCACHESIZE); - brdshm->busystate = 0; + brdshm->busystate_b[bid-1] = 0; } else {safe_sleep(1);} @@ -679,10 +679,10 @@ void reset_board(int bid) { /* Ptt: if(--bid < 0) return; - if(brdshm->busystate) { + if(brdshm->busystate || brdshm->busystate_b[bid-1]) { safe_sleep(1); } else { - brdshm->busystate = 1; + brdshm->busystate_b[bid-1] = 1; bhdr = bcache; bhdr += bid; if((fd = open(fn_board, O_RDONLY)) > 0) { @@ -696,7 +696,7 @@ void reset_board(int bid) { /* Ptt: bcache[i].firstchild[0]=NULL; bcache[i].firstchild[1]=NULL; } - brdshm->busystate = 0; + brdshm->busystate_b[bid-1] = 0; } } -- cgit v1.2.3