diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/man/man9f/Makefile | 4 | ||||
-rw-r--r-- | usr/src/man/man9f/canputnext.9f | 81 | ||||
-rw-r--r-- | usr/src/pkg/manifests/system-kernel.man9f.inc | 2 |
3 files changed, 87 insertions, 0 deletions
diff --git a/usr/src/man/man9f/Makefile b/usr/src/man/man9f/Makefile index 00714a8145..1198accfda 100644 --- a/usr/src/man/man9f/Makefile +++ b/usr/src/man/man9f/Makefile @@ -59,6 +59,7 @@ MANFILES= ASSERT.9f \ bufcall.9f \ bzero.9f \ canput.9f \ + canputnext.9f \ clrbuf.9f \ cmn_err.9f \ condvar.9f \ @@ -627,6 +628,7 @@ MANLINKS= SIZEOF_PTR.9f \ atomic_swap_uint.9f \ atomic_swap_ulong.9f \ atomic_swap_ushort.9f \ + bcanputnext.9f \ crgetgid.9f \ crgetgroups.9f \ crgetngroups.9f \ @@ -1373,6 +1375,8 @@ ddi_cb_unregister.9f := LINKSRC = ddi_cb_register.9f ddi_check_dma_handle.9f := LINKSRC = ddi_check_acc_handle.9f +bcanputnext.9f := LINKSRC = canputnext.9f + crgetgid.9f := LINKSRC = ddi_cred.9f crgetgroups.9f := LINKSRC = ddi_cred.9f crgetngroups.9f := LINKSRC = ddi_cred.9f diff --git a/usr/src/man/man9f/canputnext.9f b/usr/src/man/man9f/canputnext.9f new file mode 100644 index 0000000000..cb53fe3a58 --- /dev/null +++ b/usr/src/man/man9f/canputnext.9f @@ -0,0 +1,81 @@ +.\" +.\" This file and its contents are supplied under the terms of the +.\" Common Development and Distribution License ("CDDL"), version 1.0. +.\" You may only use this file in accordance with the terms of version +.\" 1.0 of the CDDL. +.\" +.\" A full copy of the text of the CDDL should have accompanied this +.\" source. A copy of the CDDL is also available via the Internet at +.\" http://www.illumos.org/license/CDDL. +.\" +.\" +.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> +.\" +.Dd "Dec 15, 2014" +.Dt CANPUTNEXT 9F +.Os +.Sh NAME +.Nm canputnext , +.Nm bcanputnext +.Nd test for room in next message queue +.Sh SYNOPSIS +.In sys/stream.h +. +.Ft int +.Fo canputnext +.Fa "queue_t *q" +.Fc +. +.Ft int +.Fo bcanputnext +.Fa "queue_t *q" +.Fa "unsigned char pri" +.Fc +. +.Sh DESCRIPTION +The +.Fn canputnext +and +.Fn bcanputnext +functions atomically test for available space in the next +linked queue or priority band. +They are preferable to and safer than calling +.Xr canput 9F +and +.Xr bcanput 9F +directly on the the queue linked to by +.Fa q Ns No -> Ns Fa q_next . +.Lp +Drivers and modules should call these routines to ensure that room +on the next queue exists before calling +.Xr putnext 9F . +.Sh INTERFACE LEVEL +Architecture independent (DDI/DDK). +.Sh PARAMETERS +.Bl -tag -width Ds +.It Fa q +STREAMS queue. +.It Fa pri +Priority band to test. +.El +.Sh CONTEXT +These functions may be called in user, kernel, or interrupt +context. +.Sh RETURN VALUES +.Bl -tag -width Ds +.It 1 +If the next message queue is not full. +.It 0 +If the next message queue is full. +.El +.Sh SEE ALSO +.Rs +.%B "STREAMS Programming Guide" +.Re +.Rs +.%B "Writing Device Drivers" +.Re +.Pp +.Xr bcanput 9F , +.Xr canput 9F , +.Xr putnext 9F , diff --git a/usr/src/pkg/manifests/system-kernel.man9f.inc b/usr/src/pkg/manifests/system-kernel.man9f.inc index 934c066d22..af0d6d34ae 100644 --- a/usr/src/pkg/manifests/system-kernel.man9f.inc +++ b/usr/src/pkg/manifests/system-kernel.man9f.inc @@ -55,6 +55,7 @@ file path=usr/share/man/man9f/btopr.9f file path=usr/share/man/man9f/bufcall.9f file path=usr/share/man/man9f/bzero.9f file path=usr/share/man/man9f/canput.9f +file path=usr/share/man/man9f/canputnext.9f file path=usr/share/man/man9f/clrbuf.9f file path=usr/share/man/man9f/cmn_err.9f file path=usr/share/man/man9f/condvar.9f @@ -594,6 +595,7 @@ link path=usr/share/man/man9f/atomic_swap_uchar.9f target=atomic_swap.9f link path=usr/share/man/man9f/atomic_swap_uint.9f target=atomic_swap.9f link path=usr/share/man/man9f/atomic_swap_ulong.9f target=atomic_swap.9f link path=usr/share/man/man9f/atomic_swap_ushort.9f target=atomic_swap.9f +link path=usr/share/man/man9f/bcanputnext.9f target=canputnext.9f link path=usr/share/man/man9f/crgetgid.9f target=ddi_cred.9f link path=usr/share/man/man9f/crgetgroups.9f target=ddi_cred.9f link path=usr/share/man/man9f/crgetngroups.9f target=ddi_cred.9f |