Re: FreeBSD install problem on Asus A6T laptop.

2007-04-26 Thread Olivier Houchard
On Thu, Apr 26, 2007 at 10:23:34AM +0800, Ariff Abdullah wrote: On Thu, 26 Apr 2007 01:22:38 +0200 Olivier Houchard [EMAIL PROTECTED] wrote: On Wed, Apr 25, 2007 at 11:31:21PM +0400, [EMAIL PROTECTED] wrote: I am attemping to install FreeBSD Current into this laptop.System boot well,

Usage of kern_* functions in kernel

2007-04-26 Thread Marc Lörner
Hello, I googled but found nothing about the usage of the kern_* functions (kern_open, kern_close, kern_pwritev, kern_preadv) that are located in vfs_syscalls.c When I use kern_open to open a file within the kernel, I get an error. When I use the normal vn_open function instead, all works

Re: Usage of kern_* functions in kernel

2007-04-26 Thread John Baldwin
On Thursday 26 April 2007 08:08:19 am Marc Lörner wrote: Hello, I googled but found nothing about the usage of the kern_* functions (kern_open, kern_close, kern_pwritev, kern_preadv) that are located in vfs_syscalls.c When I use kern_open to open a file within the kernel, I get an error.

msleep() on recursivly locked mutexes

2007-04-26 Thread Hans Petter Selasky
Hi, In the new USB stack I have defined the following: u_int32_t mtx_drop_recurse(struct mtx *mtx) { u_int32_t recurse_level = mtx-mtx_recurse; u_int32_t recurse_curr = recurse_level; mtx_assert(mtx, MA_OWNED); while(recurse_curr--) {

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Julian Elischer
Hans Petter Selasky wrote: Hi, In the new USB stack I have defined the following: u_int32_t mtx_drop_recurse(struct mtx *mtx) { u_int32_t recurse_level = mtx-mtx_recurse; u_int32_t recurse_curr = recurse_level; mtx_assert(mtx, MA_OWNED); while(recurse_curr--)

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Attilio Rao
2007/4/26, Hans Petter Selasky [EMAIL PROTECTED]: Hi, In the new USB stack I have defined the following: u_int32_t mtx_drop_recurse(struct mtx *mtx) { u_int32_t recurse_level = mtx-mtx_recurse; u_int32_t recurse_curr = recurse_level; mtx_assert(mtx, MA_OWNED);

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Hans Petter Selasky [EMAIL PROTECTED] writes: : Are there any comments on integrating this functionality into msleep(), and : adding mtx_drop_recurse() and mtx_pickup_recurse() to the FreeBSD kernel? This is generally a bad idea. We allow it for Giant

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Attilio Rao
2007/4/26, Julian Elischer [EMAIL PROTECTED]: The reason that mutexes ever recurse in the first place is usually because one piece of code calls itself (or a related piece of code) in a blind manner.. in other words, it doesn't know it is doing so. The whole concept of recursing mutexes is a

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Hans Petter Selasky
On Thursday 26 April 2007 23:18, Julian Elischer wrote: Hans Petter Selasky wrote: Hi, In the new USB stack I have defined the following: u_int32_t mtx_drop_recurse(struct mtx *mtx) { u_int32_t recurse_level = mtx-mtx_recurse; u_int32_t recurse_curr =