1*11a6dbe7Smartin.\" $NetBSD: _lwp_exit.2,v 1.5 2008/04/30 13:10:51 martin Exp $ 23fdac2b8Sthorpej.\" 33fdac2b8Sthorpej.\" Copyright (c) 2003 The NetBSD Foundation, Inc. 43fdac2b8Sthorpej.\" All rights reserved. 53fdac2b8Sthorpej.\" 63fdac2b8Sthorpej.\" This code is derived from software contributed to The NetBSD Foundation 73fdac2b8Sthorpej.\" by Jason R. Thorpe of Wasabi Systems, Inc. 83fdac2b8Sthorpej.\" 93fdac2b8Sthorpej.\" Redistribution and use in source and binary forms, with or without 103fdac2b8Sthorpej.\" modification, are permitted provided that the following conditions 113fdac2b8Sthorpej.\" are met: 123fdac2b8Sthorpej.\" 1. Redistributions of source code must retain the above copyright 133fdac2b8Sthorpej.\" notice, this list of conditions and the following disclaimer. 143fdac2b8Sthorpej.\" 2. Redistributions in binary form must reproduce the above copyright 153fdac2b8Sthorpej.\" notice, this list of conditions and the following disclaimer in the 163fdac2b8Sthorpej.\" documentation and/or other materials provided with the distribution. 173fdac2b8Sthorpej.\" 183fdac2b8Sthorpej.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 193fdac2b8Sthorpej.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 203fdac2b8Sthorpej.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 213fdac2b8Sthorpej.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 223fdac2b8Sthorpej.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 233fdac2b8Sthorpej.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 243fdac2b8Sthorpej.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 253fdac2b8Sthorpej.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 263fdac2b8Sthorpej.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 273fdac2b8Sthorpej.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 283fdac2b8Sthorpej.\" POSSIBILITY OF SUCH DAMAGE. 293fdac2b8Sthorpej.\" 303fdac2b8Sthorpej.Dd January 13, 2003 313fdac2b8Sthorpej.Dt _LWP_EXIT 2 323fdac2b8Sthorpej.Os 333fdac2b8Sthorpej.Sh NAME 343fdac2b8Sthorpej.Nm _lwp_exit 353fdac2b8Sthorpej.Nd terminate the calling light-weight process 363fdac2b8Sthorpej.Sh LIBRARY 373fdac2b8Sthorpej.Lb libc 383fdac2b8Sthorpej.Sh SYNOPSIS 39472351e1Swiz.In lwp.h 403fdac2b8Sthorpej.Ft void 413fdac2b8Sthorpej.Fn _lwp_exit void 423fdac2b8Sthorpej.Sh DESCRIPTION 433fdac2b8Sthorpej.Fn _lwp_exit 443fdac2b8Sthorpejterminates the calling LWP. 453fdac2b8SthorpejIf it is the last LWP in the process, the process exits with a status of 0. 463fdac2b8SthorpejIf the LWP was not created in a detached state, then the system will not 473fdac2b8Sthorpejreclaim its LWP ID until its status is reported to another LWP in the process 483fdac2b8Sthorpejvia 493fdac2b8Sthorpej.Xr _lwp_wait 2 . 503fdac2b8Sthorpej.Sh RETURN VALUES 513fdac2b8Sthorpej.Fn _lwp_exit 523fdac2b8Sthorpejcan never return. 533fdac2b8Sthorpej.Sh SEE ALSO 543fdac2b8Sthorpej.Xr _exit 2 , 553fdac2b8Sthorpej.Xr _lwp_create 2 , 5665d34efcSwiz.Xr _lwp_wait 2 573fdac2b8Sthorpej.Sh HISTORY 583fdac2b8SthorpejThe 593fdac2b8Sthorpej.Fn _lwp_exit 603fdac2b8Sthorpejsystem call first appeared in 613fdac2b8Sthorpej.Nx 2.0 . 62