aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 80d745d..5b1b563 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -230,6 +230,18 @@ iterate_over_threads (int (*callback) (struct thread_info *, void *),
}
int
+thread_count (void)
+{
+ int result = 0;
+ struct thread_info *tp;
+
+ for (tp = thread_list; tp; tp = tp->next)
+ ++result;
+
+ return result;
+}
+
+int
valid_thread_id (int num)
{
struct thread_info *tp;