Re: copyin()/copyout() constraints ?

From: Alfred Perlstein <bright_at_mu.org>
Date: Wed, 12 Jun 2013 11:36:52 -0700
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_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>


-- 
Alfred Perlstein
VP Software Engineering, iXsystems
Received on Wed Jun 12 2013 - 16:37:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:38 UTC