Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jun 2013 11:36:52 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        current@freebsd.org
Subject:   Re: copyin()/copyout() constraints ?
Message-ID:  <51B8BFC4.303@mu.org>
In-Reply-To: <20130612180115.GA27892@onelab2.iet.unipi.it>
References:  <20130612180115.GA27892@onelab2.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/12/13 11:01 AM, Luigi Rizzo wrote:
> hi,
> is it possible to run copyin() or copyout() in one of these cases:
> 1. while holding a spinlock
> 2. while holding a regular mutex/lock
> 3. while holding a read lock (on an RWLOCK or RMLOCK)
> 4. while holding a write lock (on an RWLOCK or RMLOCK)
>
> I suspect #1 is forbidden, but am a bit unclear for the
> other cases.
No on all of the above unless the memory is wired.

You need a sx or semaphore.

-Alfred
>
> thanks
> luigi
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>


-- 
Alfred Perlstein
VP Software Engineering, iXsystems




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51B8BFC4.303>