1*2fe8fb19SBen Gras.\" $NetBSD: _lwp_getname.2,v 1.2 2009/05/18 14:49:35 wiz Exp $ 2*2fe8fb19SBen Gras.\" 3*2fe8fb19SBen Gras.\" Copyright (c)2007 YAMAMOTO Takashi, 4*2fe8fb19SBen Gras.\" All rights reserved. 5*2fe8fb19SBen Gras.\" 6*2fe8fb19SBen Gras.\" Redistribution and use in source and binary forms, with or without 7*2fe8fb19SBen Gras.\" modification, are permitted provided that the following conditions 8*2fe8fb19SBen Gras.\" are met: 9*2fe8fb19SBen Gras.\" 1. Redistributions of source code must retain the above copyright 10*2fe8fb19SBen Gras.\" notice, this list of conditions and the following disclaimer. 11*2fe8fb19SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 12*2fe8fb19SBen Gras.\" notice, this list of conditions and the following disclaimer in the 13*2fe8fb19SBen Gras.\" documentation and/or other materials provided with the distribution. 14*2fe8fb19SBen Gras.\" 15*2fe8fb19SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16*2fe8fb19SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*2fe8fb19SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18*2fe8fb19SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19*2fe8fb19SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20*2fe8fb19SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21*2fe8fb19SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22*2fe8fb19SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23*2fe8fb19SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24*2fe8fb19SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25*2fe8fb19SBen Gras.\" SUCH DAMAGE. 26*2fe8fb19SBen Gras.\" 27*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 28*2fe8fb19SBen Gras.Dd December 15, 2007 29*2fe8fb19SBen Gras.Dt _LWP_GETNAME 2 30*2fe8fb19SBen Gras.Os 31*2fe8fb19SBen Gras.Sh NAME 32*2fe8fb19SBen Gras.Nm _lwp_getname 33*2fe8fb19SBen Gras.Nd get descriptive name of an LWP 34*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 35*2fe8fb19SBen Gras.Sh LIBRARY 36*2fe8fb19SBen Gras.Lb libc 37*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 38*2fe8fb19SBen Gras.Sh SYNOPSIS 39*2fe8fb19SBen Gras.In lwp.h 40*2fe8fb19SBen Gras.Ft int 41*2fe8fb19SBen Gras.Fn _lwp_getname "lwpid_t target" "char *name" "size_t len" 42*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 43*2fe8fb19SBen Gras.Sh DESCRIPTION 44*2fe8fb19SBen Gras.Fn _lwp_getname 45*2fe8fb19SBen Grasgets the descriptive name of the LWP. 46*2fe8fb19SBen GrasIt takes the following arguments. 47*2fe8fb19SBen Gras.Bl -tag -width target 48*2fe8fb19SBen Gras.It Fa target 49*2fe8fb19SBen GrasThe LWP whose descriptive name will be obtained. 50*2fe8fb19SBen Gras.It Fa name 51*2fe8fb19SBen GrasThe buffer to be filled with the descriptive name of the LWP. 52*2fe8fb19SBen Gras.It Fa len 53*2fe8fb19SBen GrasThe size of the buffer 54*2fe8fb19SBen Gras.Fa name 55*2fe8fb19SBen Grasin bytes. 56*2fe8fb19SBen Gras.El 57*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 58*2fe8fb19SBen Gras.Sh RETURN VALUES 59*2fe8fb19SBen Gras.Fn _lwp_getname 60*2fe8fb19SBen Grasreturns 0 on success. 61*2fe8fb19SBen GrasOtherwise, \-1 is returned and 62*2fe8fb19SBen Gras.Va errno 63*2fe8fb19SBen Grasis set to indicate the error. 64*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 65*2fe8fb19SBen Gras.\".Sh ERRORS 66*2fe8fb19SBen Gras.\" ------------------------------------------------------------ 67*2fe8fb19SBen Gras.Sh SEE ALSO 68*2fe8fb19SBen Gras.Xr ps 1 , 69*2fe8fb19SBen Gras.Xr top 1 , 70*2fe8fb19SBen Gras.Xr _lwp_setname 2 , 71*2fe8fb19SBen Gras.Xr errno 2 72