Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/sysctl.9
Show All 12 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd June 11, 2019 | .Dd January 16, 2020 | ||||
.Dt SYSCTL 9 | .Dt SYSCTL 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm SYSCTL_DECL , | .Nm SYSCTL_DECL , | ||||
.Nm SYSCTL_ADD_BOOL , | .Nm SYSCTL_ADD_BOOL , | ||||
.Nm SYSCTL_ADD_COUNTER_U64 , | .Nm SYSCTL_ADD_COUNTER_U64 , | ||||
.Nm SYSCTL_ADD_COUNTER_U64_ARRAY , | .Nm SYSCTL_ADD_COUNTER_U64_ARRAY , | ||||
.Nm SYSCTL_ADD_INT , | .Nm SYSCTL_ADD_INT , | ||||
Show All 24 Lines | |||||
.It Dv CTLFLAG_MPSAFE | .It Dv CTLFLAG_MPSAFE | ||||
This | This | ||||
.Xr sysctl 9 | .Xr sysctl 9 | ||||
handler is MP safe. | handler is MP safe. | ||||
Do not grab Giant around calls to this handler. | Do not grab Giant around calls to this handler. | ||||
This should only be used for | This should only be used for | ||||
.Fn SYSCTL_PROC | .Fn SYSCTL_PROC | ||||
entries. | entries. | ||||
.It Dv CTLFLAG_NEEDGIANT | |||||
This | |||||
.Xr sysctl 9 | |||||
handler is not MP safe and require locking Giant to operate safely. | |||||
bjk: We should be more clear about whether this is a statement about the (unpreferred nature of the)… | |||||
kaktusAuthorUnsubmitted Done Inline ActionsHow about handler is not MP safe and locks Giant internally. ? kaktus: How about
```
handler is not MP safe and locks Giant internally.
```
? | |||||
Creating new nodes of this type is strongly discouraged. | |||||
This should only be used for | |||||
.Fn SYSCTL_PROC | |||||
entries. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
Additionally, any of the following optional flags may also be specified: | Additionally, any of the following optional flags may also be specified: | ||||
.Bl -tag -width ".Dv CTLFLAG_ANYBODY" | .Bl -tag -width ".Dv CTLFLAG_ANYBODY" | ||||
.It Dv CTLFLAG_ANYBODY | .It Dv CTLFLAG_ANYBODY | ||||
Any user or process can write to this sysctl. | Any user or process can write to this sysctl. | ||||
.It Dv CTLFLAG_CAPRD | .It Dv CTLFLAG_CAPRD | ||||
A process in capability mode can read from this sysctl. | A process in capability mode can read from this sysctl. | ||||
Show All 12 Lines |
We should be more clear about whether this is a statement about the (unpreferred nature of the) internal implementation, or a requirement on callers that are querying this node.