Date: Mon, 11 Sep 2000 12:15:35 -0600 From: Chuck Paterson <cp@bsdi.com> To: Alfred Perlstein <bright@wintelcom.net> Cc: arch@freebsd.org Subject: Re: Interruptable mutex aquires. Message-ID: <200009111815.MAA21525@berserker.bsdi.com>
next in thread | raw e-mail | index | archive | help
In the followng the lock which is acquired is often held for long periods, including while an IO is in progress, where as mutexs don't want to be held across an io. Chuck Alfred Perlstein wrote on: Sun, 10 Sep 2000 19:36:02 PDT } }There's a lot of code in the kernel that does this: } }while(lock != mine) { } error = tsleep(&lock, PRIBIO, "foo", PCATCH); } if (error) } return(error); }} }lock = mine; } }Ok, well the equivelant way to do this with mutexes would be }to add a new function 'mtx_enter_interruptable()' [*] }that attempts to aquire a mutex but if interrupted returns }an error suitable for aborting the operation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009111815.MAA21525>