10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57854SPhilippe.Jung@Sun.COM * Common Development and Distribution License (the "License"). 67854SPhilippe.Jung@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*8721SJonathan.Adams@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _THREAD_H 270Sstevel@tonic-gate #define _THREAD_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate 300Sstevel@tonic-gate #include <mdb/mdb_modapi.h> 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 360Sstevel@tonic-gate int thread_walk_init(mdb_walk_state_t *); 370Sstevel@tonic-gate int thread_walk_step(mdb_walk_state_t *); 380Sstevel@tonic-gate void thread_walk_fini(mdb_walk_state_t *); 390Sstevel@tonic-gate 400Sstevel@tonic-gate int deathrow_walk_init(mdb_walk_state_t *); 410Sstevel@tonic-gate int deathrow_walk_step(mdb_walk_state_t *); 420Sstevel@tonic-gate int thread_deathrow_walk_init(mdb_walk_state_t *); 430Sstevel@tonic-gate int lwp_deathrow_walk_init(mdb_walk_state_t *); 440Sstevel@tonic-gate 450Sstevel@tonic-gate int cpu_dispq_walk_init(mdb_walk_state_t *); 460Sstevel@tonic-gate int cpupart_dispq_walk_init(mdb_walk_state_t *); 470Sstevel@tonic-gate int dispq_walk_step(mdb_walk_state_t *); 480Sstevel@tonic-gate void dispq_walk_fini(mdb_walk_state_t *); 490Sstevel@tonic-gate 500Sstevel@tonic-gate int thread(uintptr_t, uint_t, int, const mdb_arg_t *); 510Sstevel@tonic-gate void thread_help(void); 520Sstevel@tonic-gate int threadlist(uintptr_t, uint_t, int, const mdb_arg_t *); 530Sstevel@tonic-gate void threadlist_help(void); 547854SPhilippe.Jung@Sun.COM int stackinfo(uintptr_t, uint_t, int, const mdb_arg_t *); 557854SPhilippe.Jung@Sun.COM void stackinfo_help(void); 560Sstevel@tonic-gate 57*8721SJonathan.Adams@Sun.COM void thread_state_to_text(uint_t, char *, size_t); 58*8721SJonathan.Adams@Sun.COM int thread_text_to_state(const char *, uint_t *); 59*8721SJonathan.Adams@Sun.COM void thread_walk_states(void (*)(uint_t, const char *, void *), void *); 60*8721SJonathan.Adams@Sun.COM 610Sstevel@tonic-gate #ifdef __cplusplus 620Sstevel@tonic-gate } 630Sstevel@tonic-gate #endif 640Sstevel@tonic-gate 650Sstevel@tonic-gate #endif /* _THREAD_H */ 66