1ebf4a993SGarrett D'Amore.\" 2ebf4a993SGarrett D'Amore.\" This file and its contents are supplied under the terms of the 3ebf4a993SGarrett D'Amore.\" Common Development and Distribution License ("CDDL"), version 1.0. 4ebf4a993SGarrett D'Amore.\" You may only use this file in accordance with the terms of version 5ebf4a993SGarrett D'Amore.\" 1.0 of the CDDL. 6ebf4a993SGarrett D'Amore.\" 7ebf4a993SGarrett D'Amore.\" A full copy of the text of the CDDL should have accompanied this 8ebf4a993SGarrett D'Amore.\" source. A copy of the CDDL is also available via the Internet at 9ebf4a993SGarrett D'Amore.\" http://www.illumos.org/license/CDDL. 10ebf4a993SGarrett D'Amore.\" 11ebf4a993SGarrett D'Amore.\" 12ebf4a993SGarrett D'Amore.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 13ebf4a993SGarrett D'Amore.\" 14ebf4a993SGarrett D'Amore.Dd "Dec 15, 2014" 15ebf4a993SGarrett D'Amore.Dt CANPUTNEXT 9F 16ebf4a993SGarrett D'Amore.Os 17ebf4a993SGarrett D'Amore.Sh NAME 18ebf4a993SGarrett D'Amore.Nm canputnext , 19ebf4a993SGarrett D'Amore.Nm bcanputnext 20ebf4a993SGarrett D'Amore.Nd test for room in next message queue 21ebf4a993SGarrett D'Amore.Sh SYNOPSIS 22ebf4a993SGarrett D'Amore.In sys/stream.h 23ebf4a993SGarrett D'Amore. 24ebf4a993SGarrett D'Amore.Ft int 25ebf4a993SGarrett D'Amore.Fo canputnext 26ebf4a993SGarrett D'Amore.Fa "queue_t *q" 27ebf4a993SGarrett D'Amore.Fc 28ebf4a993SGarrett D'Amore. 29ebf4a993SGarrett D'Amore.Ft int 30ebf4a993SGarrett D'Amore.Fo bcanputnext 31ebf4a993SGarrett D'Amore.Fa "queue_t *q" 32ebf4a993SGarrett D'Amore.Fa "unsigned char pri" 33ebf4a993SGarrett D'Amore.Fc 34ebf4a993SGarrett D'Amore. 35ebf4a993SGarrett D'Amore.Sh DESCRIPTION 36ebf4a993SGarrett D'AmoreThe 37ebf4a993SGarrett D'Amore.Fn canputnext 38ebf4a993SGarrett D'Amoreand 39ebf4a993SGarrett D'Amore.Fn bcanputnext 40ebf4a993SGarrett D'Amorefunctions atomically test for available space in the next 41ebf4a993SGarrett D'Amorelinked queue or priority band. 42ebf4a993SGarrett D'AmoreThey are preferable to and safer than calling 43ebf4a993SGarrett D'Amore.Xr canput 9F 44ebf4a993SGarrett D'Amoreand 45ebf4a993SGarrett D'Amore.Xr bcanput 9F 46ebf4a993SGarrett D'Amoredirectly on the the queue linked to by 47ebf4a993SGarrett D'Amore.Fa q Ns No -> Ns Fa q_next . 48ebf4a993SGarrett D'Amore.Lp 49ebf4a993SGarrett D'AmoreDrivers and modules should call these routines to ensure that room 50ebf4a993SGarrett D'Amoreon the next queue exists before calling 51ebf4a993SGarrett D'Amore.Xr putnext 9F . 52ebf4a993SGarrett D'Amore.Sh INTERFACE LEVEL 53ebf4a993SGarrett D'AmoreArchitecture independent (DDI/DDK). 54ebf4a993SGarrett D'Amore.Sh PARAMETERS 55ebf4a993SGarrett D'Amore.Bl -tag -width Ds 56ebf4a993SGarrett D'Amore.It Fa q 57ebf4a993SGarrett D'AmoreSTREAMS queue. 58ebf4a993SGarrett D'Amore.It Fa pri 59ebf4a993SGarrett D'AmorePriority band to test. 60ebf4a993SGarrett D'Amore.El 61ebf4a993SGarrett D'Amore.Sh CONTEXT 62ebf4a993SGarrett D'AmoreThese functions may be called in user, kernel, or interrupt 63ebf4a993SGarrett D'Amorecontext. 64ebf4a993SGarrett D'Amore.Sh RETURN VALUES 65ebf4a993SGarrett D'Amore.Bl -tag -width Ds 66ebf4a993SGarrett D'Amore.It 1 67ebf4a993SGarrett D'AmoreIf the next message queue is not full. 68ebf4a993SGarrett D'Amore.It 0 69ebf4a993SGarrett D'AmoreIf the next message queue is full. 70ebf4a993SGarrett D'Amore.El 71ebf4a993SGarrett D'Amore.Sh SEE ALSO 72ebf4a993SGarrett D'Amore.Rs 73ebf4a993SGarrett D'Amore.%B "STREAMS Programming Guide" 74ebf4a993SGarrett D'Amore.Re 75ebf4a993SGarrett D'Amore.Rs 76ebf4a993SGarrett D'Amore.%B "Writing Device Drivers" 77ebf4a993SGarrett D'Amore.Re 78ebf4a993SGarrett D'Amore.Pp 79ebf4a993SGarrett D'Amore.Xr bcanput 9F , 80ebf4a993SGarrett D'Amore.Xr canput 9F , 81ebf4a993SGarrett D'Amore.Xr putnext 9F , 82