1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* 23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27#ifndef _LIBPROC_APPLE_H 28#define _LIBPROC_APPLE_H 29 30#ifdef __cplusplus 31extern "C" { 32#endif 33 34/* 35 * APPLE NOTE: 36 * 37 * This file exists to expose the innards of ps_prochandle. 38 * We cannot place this in libproc.h, because it refers to 39 * CoreSymbolication and mach specific classes and types. 40 * 41 * The Apple emulation of /proc control requires access to 42 * this structure. 43 */ 44 45struct ps_proc_activity_event { 46 rd_event_msg_t rd_event; 47 struct ps_proc_activity_event* next; 48 bool synchronous; 49 volatile bool destroyed; 50 pthread_mutex_t synchronous_mutex; 51 pthread_cond_t synchronous_cond; 52}; 53 54struct ps_prochandle { 55 pstatus_t status; 56 CSSymbolicatorRef symbolicator; 57 uint32_t current_symbol_owner_generation; 58 rd_event_msg_t rd_event; 59 struct ps_proc_activity_event* proc_activity_queue; 60 uint32_t proc_activity_queue_enabled; 61 pthread_mutex_t proc_activity_queue_mutex; 62 pthread_cond_t proc_activity_queue_cond; 63}; 64 65#ifdef __cplusplus 66} 67#endif 68 69#endif /* _LIBPROC_APPLE_H */ 70