pkgsrc/devel/libpthread_dbg/files/td_open.3
kamil 171861610b Import libpthread_dbg-20161124 as devel/libpthread_dbg.
The pthread_dbg library provides an implementation of the standard POSIX
threads library debugging facilities.

The NetBSD implementation is based on 1:1 thread model, therefore each
pthread(3) has a kernel thread, called a light-weight process (LWP).

Note that the system private thread interfaces upon which the pthread(3)
library is built are subject to change without notice.  In order to
remain compatible with future NetBSD releases, programs must be linked
against the dynamic version of the thread library.  Statically linked
programs using the POSIX threads framework may not work when run on a
future version of the system.

The pthread_dbg library is designed to be used in debuggers and to
control and introspect the NetBSD implementation of the POSIX threads.
Software may use native LWP threads without pthread(3) layer, in that
case pthread_dbg cannot be used.

Sponsored by <The NetBSD Foundation>
2017-02-08 01:02:19 +00:00

79 lines
2.5 KiB
Groff

.\" $NetBSD: td_open.3,v 1.1 2017/02/08 01:02:19 kamil Exp $
.\"
.\" Copyright (c) 2016 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd November 21, 2016
.Dt TD_OPEN 3
.Os
.Sh NAME
.Nm td_open ,
.Nm td_close
.Nd make or close a connection to a threaded process
.Sh LIBRARY
.Lb libpthread_dbg
.Sh SYNOPSIS
.In pthread_dbg.h
.Ft int
.Fn td_open "struct td_proc_callbacks_t *cb" "void *arg" "td_proc_t **procp"
.Ft int
.Fn td_close "td_proc_t *proc"
.Sh DESCRIPTION
The
.Fn td_open
function makes a connection to a threaded process.
That program must be a consumer of the
.Tn POSIX
threads implementation using the
.Xr pthread 3
library.
.Pp
The
.Fn td_close
function closes a connection to a threaded process.
.Sh RETURN VALUES
If successful, the
.Fn td_open
and
.Fn td_close
functions will return
.Dv TD_ERR_OK .
Otherwise an error number will be returned to indicate failure as described in
.Xr pthread_dbg 3 .
.Sh SEE ALSO
.Xr pthread 3 ,
.Xr pthread_dbg 3
.Sh HISTORY
The
.Fn td_open
and
.Fn td_close
functions first appeared in
.Nx 2.0 .
.Sh AUTHORS
.An -nosplit
.An Nathan J. Williams Aq Mt nathanw@NetBSD.org
.Pp
This manual page was written by
.An Kamil Rytarowski Aq Mt kamil@NetBSD.org .