xref: /dflybsd-src/lib/libthread_xu/thread/thr_symbols.c (revision 3cd47da3b3e7c94bb2f239acf94f3e950482b7db)
171b3fa15SDavid Xu /*
271b3fa15SDavid Xu  * Copyright (c) 2004 David Xu <davidxu@freebsd.org>
371b3fa15SDavid Xu  * All rights reserved.
471b3fa15SDavid Xu  *
571b3fa15SDavid Xu  * Redistribution and use in source and binary forms, with or without
671b3fa15SDavid Xu  * modification, are permitted provided that the following conditions
771b3fa15SDavid Xu  * are met:
871b3fa15SDavid Xu  * 1. Redistributions of source code must retain the above copyright
971b3fa15SDavid Xu  *    notice, this list of conditions and the following disclaimer.
1071b3fa15SDavid Xu  * 2. Redistributions in binary form must reproduce the above copyright
1171b3fa15SDavid Xu  *    notice, this list of conditions and the following disclaimer in the
1271b3fa15SDavid Xu  *    documentation and/or other materials provided with the distribution.
1371b3fa15SDavid Xu  * 3. All advertising materials mentioning features or use of this software
1471b3fa15SDavid Xu  *    must display the following acknowledgement:
1571b3fa15SDavid Xu  *	This product includes software developed by John Birrell.
1671b3fa15SDavid Xu  * 4. Neither the name of the author nor the names of any co-contributors
1771b3fa15SDavid Xu  *    may be used to endorse or promote products derived from this software
1871b3fa15SDavid Xu  *    without specific prior written permission.
1971b3fa15SDavid Xu  *
2071b3fa15SDavid Xu  * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
2171b3fa15SDavid Xu  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2271b3fa15SDavid Xu  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2371b3fa15SDavid Xu  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2471b3fa15SDavid Xu  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2571b3fa15SDavid Xu  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2671b3fa15SDavid Xu  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2771b3fa15SDavid Xu  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2871b3fa15SDavid Xu  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2971b3fa15SDavid Xu  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3071b3fa15SDavid Xu  * SUCH DAMAGE.
3171b3fa15SDavid Xu  *
3271b3fa15SDavid Xu  * $FreeBSD: src/lib/libpthread/thread/thr_symbols.c,v 1.1 2004/08/16 03:25:07 davidxu Exp $
33*3cd47da3SDavid Xu  * $DragonFly: src/lib/libthread_xu/thread/thr_symbols.c,v 1.3 2005/05/07 09:29:46 davidxu Exp $
3471b3fa15SDavid Xu  */
3571b3fa15SDavid Xu 
3671b3fa15SDavid Xu #include <stddef.h>
3771b3fa15SDavid Xu #include <pthread.h>
3871b3fa15SDavid Xu #ifndef __DragonFly__
3971b3fa15SDavid Xu #include <rtld.h>
4071b3fa15SDavid Xu #endif
4171b3fa15SDavid Xu 
4271b3fa15SDavid Xu #include "thr_private.h"
4371b3fa15SDavid Xu 
4471b3fa15SDavid Xu /* A collection of symbols needed by debugger */
4571b3fa15SDavid Xu 
46*3cd47da3SDavid Xu int _thread_max_keys = PTHREAD_KEYS_MAX;
4771b3fa15SDavid Xu int _thread_off_attr_flags = offsetof(struct pthread, attr.flags);
48*3cd47da3SDavid Xu int _thread_off_event_buf = offsetof(struct pthread, event_buf);
49*3cd47da3SDavid Xu int _thread_off_event_mask = offsetof(struct pthread, event_mask);
5071b3fa15SDavid Xu int _thread_off_key_allocated = offsetof(struct pthread_key, allocated);
5171b3fa15SDavid Xu int _thread_off_key_destructor = offsetof(struct pthread_key, destructor);
52*3cd47da3SDavid Xu int _thread_off_next = offsetof(struct pthread, tle.tqe_next);
53*3cd47da3SDavid Xu int _thread_off_report_events = offsetof(struct pthread, report_events);
5471b3fa15SDavid Xu int _thread_off_state = offsetof(struct pthread, state);
55*3cd47da3SDavid Xu int _thread_off_tcb = offsetof(struct pthread, tcb);
56*3cd47da3SDavid Xu int _thread_off_tid = offsetof(struct pthread, tid);
57*3cd47da3SDavid Xu int _thread_size_key = sizeof(struct pthread_key);
5871b3fa15SDavid Xu int _thread_state_running = PS_RUNNING;
5971b3fa15SDavid Xu int _thread_state_zoombie = PS_DEAD;
60