/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBPCTX_H
#define _LIBPCTX_H
#include <fcntl.h>
#include <stdarg.h>
/*
* The process context library allows callers to use the facilities
* of /proc to control processes in a simplified way by managing
* the process via an event loop. The controlling process expresses
* interest in various events which are handled as callbacks by the
* library.
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* A vprintf-like error handling routine can be passed in for use
* by more sophisticated callers. If specified as NULL, errors
* are written to stderr.
*/
extern void pctx_terminate(pctx_t *);
typedef enum {
PCTX_NULL_EVENT = 0,
} pctx_event_t;
/*
* Implementation-private interfaces used by libcpc.
*/
struct __cpc;
void *, void *, void *, int);
extern void __pctx_cpc_register_callback(void (*)(struct __cpc *,
struct __pctx *));
#ifdef __cplusplus
}
#endif
#endif /* _LIBPCTX_H */