Subject: Re: Getting the device tree
To: Simon Burge <simonb@wasabisystems.com>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 01/02/2001 00:37:59
Simon Burge wrote:

> Lennart Augustsson wrote:
>
> > [ sysctl to retrieve alldevs ]
>
> Would we need to lock the alldevs list while it is being retrieved by
> the sysctl (with similar locking in config_{attach,detach}?  Also, see
> my message to tech-kern last November with the subject "sysctl handler
> to return arrays" with some ideas for retrieving arrays and lists via
> sysctls.

Since the kernel is not preempted I don't think we need a lock.  Just copying
the list into a temporary buffer before copying to user space would be enough.
We are not talking about huge amounts of data here, just a 1 or 2 Kbyte.

--

        -- Lennart