diff --git a/lib/libpthread_dbg/pthread_dbg.c b/lib/libpthread_dbg/pthread_dbg.c index 039acb565bff..7204bbee7667 100644 --- a/lib/libpthread_dbg/pthread_dbg.c +++ b/lib/libpthread_dbg/pthread_dbg.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_dbg.c,v 1.48 2016/11/20 21:49:24 kamil Exp $ */ +/* $NetBSD: pthread_dbg.c,v 1.49 2016/11/21 03:02:34 kamil Exp $ */ /*- * Copyright (c) 2002 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__RCSID("$NetBSD: pthread_dbg.c,v 1.48 2016/11/20 21:49:24 kamil Exp $"); +__RCSID("$NetBSD: pthread_dbg.c,v 1.49 2016/11/21 03:02:34 kamil Exp $"); #define __EXPOSE_STACK 1 @@ -225,14 +225,12 @@ td_thr_info(td_thread_t *thread, td_thread_info_t *info) case PT_STATE_RUNNING: info->thread_state = TD_STATE_RUNNING; break; -#ifdef XXXLWP - case PT_STATE_SUSPENDED: - info->thread_state = TD_STATE_SUSPENDED; - break; -#endif case PT_STATE_ZOMBIE: info->thread_state = TD_STATE_ZOMBIE; break; + case PT_STATE_DEAD: + info->thread_state = TD_STATE_DEAD; + break; default: info->thread_state = TD_STATE_UNKNOWN; } @@ -306,6 +304,7 @@ td_thr_getregs(td_thread_t *thread, int regset, void *buf) return val; break; case PT_STATE_ZOMBIE: + case PT_STATE_DEAD: default: return TD_ERR_BADTHREAD; } @@ -333,6 +332,7 @@ td_thr_setregs(td_thread_t *thread, int regset, void *buf) return val; break; case PT_STATE_ZOMBIE: + case PT_STATE_DEAD: default: return TD_ERR_BADTHREAD; } diff --git a/lib/libpthread_dbg/pthread_dbg.h b/lib/libpthread_dbg/pthread_dbg.h index 30f1a690d0ec..b4c83d44a2f3 100644 --- a/lib/libpthread_dbg/pthread_dbg.h +++ b/lib/libpthread_dbg/pthread_dbg.h @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_dbg.h,v 1.7 2016/10/22 18:04:40 skrll Exp $ */ +/* $NetBSD: pthread_dbg.h,v 1.8 2016/11/21 03:02:34 kamil Exp $ */ /*- * Copyright (c) 2002 Wasabi Systems, Inc. @@ -77,11 +77,12 @@ typedef struct td_thread_info_st { #define TD_STATE_UNKNOWN 0 #define TD_STATE_RUNNING 1 /* On a processor */ -#define TD_STATE_RUNNABLE 2 /* On a run queue */ -#define TD_STATE_BLOCKED 3 /* Blocked in the kernel */ -#define TD_STATE_SLEEPING 4 /* Blocked on a sync object */ +#define TD_STATE_UNUSED2 2 /* former TD_STATE_RUNNABLE for SA */ +#define TD_STATE_UNUSED3 3 /* former TD_STATE_BLOCKED for SA */ +#define TD_STATE_UNUSED4 4 /* former TD_STATE_SLEEPING for SA */ #define TD_STATE_ZOMBIE 5 -#define TD_STATE_SUSPENDED 6 /* Removed from run queues */ +#define TD_STATE_UNUSED6 6 /* former TD_STATE_SUSPENDED for SA */ +#define TD_STATE_DEAD 7 #define TD_TYPE_UNKNOWN 0 #define TD_TYPE_USER 1