diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-05 02:02:31 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-05 02:02:31 +0800 |
commit | 880a2e11a9af744c7bc9121c25f81550b5700fdd (patch) | |
tree | 16280828ee2ae5c562439ff64e8c426d5380c4fb /mbbsd/cache.c | |
parent | d8196271b07c10a040f258e43f3e4812725f736c (diff) | |
download | pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar.gz pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar.bz2 pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar.lz pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar.xz pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.tar.zst pttbbs-880a2e11a9af744c7bc9121c25f81550b5700fdd.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@79 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 <stdio.h> #include <stdlib.h> #include <string.h> @@ -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: 這樣就不用老是touch board了 */ 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: 這樣就不用老是touch board了 */ bcache[i].firstchild[0]=NULL; bcache[i].firstchild[1]=NULL; } - brdshm->busystate = 0; + brdshm->busystate_b[bid-1] = 0; } } |