Date: Thu, 14 Aug 1997 17:07:57 +0200 From: Poul-Henning Kamp <phk@dk.tfs.com> To: smp@freebsd.org Subject: bug ? Message-ID: <3398.871571277@critter.dk.tfs.com>
next in thread | raw e-mail | index | archive | help
this is from sys/kern/kern_lock.c, isn't line 76 & 77 bogus ? 64 | */ 65 | int lock_wait_time = 100; 66 | #define PAUSE(lkp, wanted) \ 67 | if (lock_wait_time > 0) { \ 68 | int i; \ 69 | \ 70 | simple_unlock(&lkp->lk_interlock); \ 71 | for (i = lock_wait_time; i > 0; i--) \ 72 | if (!(wanted)) \ 73 | break; \ 74 | simple_lock(&lkp->lk_interlock); \ 75 | } \ 76 | if (!(wanted)) \ 77 | break; 78 | 79 | #else /* NCPUS == 1 */ 80 | 81 | /* 82 | * It is an error to spin on a uniprocessor as nothing will ever cause 83 | * the simple lock to clear while we are executing. 84 | */ 85 | #define PAUSE(lkp, wanted) 86 | 87 | #endif /* NCPUS == 1 */ 88 | 89 | /* 90 | * Acquire a resource. 91 | */ 92 | #define ACQUIRE(lkp, error, extflags, wanted) \ 93 | PAUSE(lkp, wanted); \ 94 | for (error = 0; wanted; ) { \ 95 | (lkp)->lk_waitcount++; \ -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3398.871571277>