xref: /minix3/lib/libc/sys/_lwp_unpark_all.2 (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc.\"	$NetBSD: _lwp_unpark_all.2,v 1.7 2014/04/08 13:02:14 pooka Exp $
22fe8fb19SBen Gras.\"
32fe8fb19SBen Gras.\" Copyright (c) 2003, 2007 The NetBSD Foundation, Inc.
42fe8fb19SBen Gras.\" All rights reserved.
52fe8fb19SBen Gras.\"
62fe8fb19SBen Gras.\" This code is derived from software contributed to The NetBSD Foundation
72fe8fb19SBen Gras.\" by Jason R. Thorpe of Wasabi Systems, Inc, and by Andrew Doran.
82fe8fb19SBen Gras.\"
92fe8fb19SBen Gras.\" Redistribution and use in source and binary forms, with or without
102fe8fb19SBen Gras.\" modification, are permitted provided that the following conditions
112fe8fb19SBen Gras.\" are met:
122fe8fb19SBen Gras.\" 1. Redistributions of source code must retain the above copyright
132fe8fb19SBen Gras.\"    notice, this list of conditions and the following disclaimer.
142fe8fb19SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
152fe8fb19SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
162fe8fb19SBen Gras.\"    documentation and/or other materials provided with the distribution.
172fe8fb19SBen Gras.\"
182fe8fb19SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
192fe8fb19SBen Gras.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
202fe8fb19SBen Gras.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
212fe8fb19SBen Gras.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
222fe8fb19SBen Gras.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
232fe8fb19SBen Gras.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
242fe8fb19SBen Gras.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
252fe8fb19SBen Gras.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
262fe8fb19SBen Gras.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
272fe8fb19SBen Gras.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
282fe8fb19SBen Gras.\" POSSIBILITY OF SUCH DAMAGE.
292fe8fb19SBen Gras.\"
302fe8fb19SBen Gras.Dd February 10, 2007
312fe8fb19SBen Gras.Dt _LWP_UNPARK_ALL 2
322fe8fb19SBen Gras.Os
332fe8fb19SBen Gras.Sh NAME
342fe8fb19SBen Gras.Nm _lwp_unpark_all
352fe8fb19SBen Gras.Nd resume execution of a waiting LWP
362fe8fb19SBen Gras.Sh LIBRARY
372fe8fb19SBen Gras.Lb libc
382fe8fb19SBen Gras.Sh SYNOPSIS
392fe8fb19SBen Gras.In lwp.h
402fe8fb19SBen Gras.Ft ssize_t
41*0a6a1f1dSLionel Sambuc.Fn _lwp_unpark_all "const lwpid_t *targets" "size_t ntargets" "const void *hint"
422fe8fb19SBen Gras.Sh DESCRIPTION
432fe8fb19SBen Gras.Fn _lwp_unpark_all
442fe8fb19SBen Grasresumes execution of one or more light-weight processes listed in
452fe8fb19SBen Grasthe array pointed to by
462fe8fb19SBen Gras.Fa targets .
472fe8fb19SBen Gras.Pp
482fe8fb19SBen GrasThe target LWPs are assumed to be waiting in the kernel as a result of
492fe8fb19SBen Grascalls to
502fe8fb19SBen Gras.Fn _lwp_park .
512fe8fb19SBen GrasIf any of the target LWPs are not currently waiting, those LWPs will return
522fe8fb19SBen Grasimmediately upon the next call to
532fe8fb19SBen Gras.Fn _lwp_park .
542fe8fb19SBen Gras.Pp
552fe8fb19SBen GrasThe value pointed to by
562fe8fb19SBen Gras.Fa ntargets
572fe8fb19SBen Grasspecifies the size of the array pointed to by
582fe8fb19SBen Gras.Fa targets .
592fe8fb19SBen GrasIf the
602fe8fb19SBen Gras.Fa targets
612fe8fb19SBen Grasargument is given as
622fe8fb19SBen Gras.Dv NULL ,
632fe8fb19SBen Grasthe maximum size of the array (expressed
642fe8fb19SBen Grasas the number of entries) is returned.
652fe8fb19SBen Gras.Pp
662fe8fb19SBen GrasSee
672fe8fb19SBen Gras.Xr _lwp_park 2
682fe8fb19SBen Grasfor a description of the
692fe8fb19SBen Gras.Fa hint
702fe8fb19SBen Grasargument.
712fe8fb19SBen Gras.Sh RETURN VALUES
722fe8fb19SBen GrasIf the maximum size of the
732fe8fb19SBen Gras.Fa targets
742fe8fb19SBen Grasarray is not being queried, a return of 0 indicates that the call succeeded.
752fe8fb19SBen GrasA \-1 return value indicates an error occurred and
762fe8fb19SBen Gras.Va errno
772fe8fb19SBen Grasis set to indicate the reason.
782fe8fb19SBen Gras.Sh ERRORS
792fe8fb19SBen Gras.Bl -tag -width [EINVAL]
802fe8fb19SBen Gras.It Bq Er EFAULT
812fe8fb19SBen GrasThe value specified for
822fe8fb19SBen Gras.Fa targets
832fe8fb19SBen Grasis invalid.
842fe8fb19SBen Gras.It Bq Er EINVAL
852fe8fb19SBen GrasThe value specified for
862fe8fb19SBen Gras.Fa ntargets
872fe8fb19SBen Grasis out of range.
882fe8fb19SBen Gras.It Bq Er ENOMEM
892fe8fb19SBen GrasInsufficient resources are available to complete the operation.
902fe8fb19SBen Gras.El
912fe8fb19SBen Gras.Sh SEE ALSO
922fe8fb19SBen Gras.Xr _lwp_park 2 ,
932fe8fb19SBen Gras.Xr _lwp_unpark 2 ,
942fe8fb19SBen Gras.Xr _lwp_wakeup 2
952fe8fb19SBen Gras.Sh HISTORY
962fe8fb19SBen GrasThe
972fe8fb19SBen Gras.Fn _lwp_unpark_all
982fe8fb19SBen Grassystem call first appeared in
992fe8fb19SBen Gras.Nx 5.0 .
100