Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys Add infinite_thread() for ptrace(2) ATF t...



details:   https://anonhg.NetBSD.org/src/rev/be2c1f8aa76f
branches:  trunk
changeset: 996843:be2c1f8aa76f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sat Feb 09 23:10:42 2019 +0000

description:
Add infinite_thread() for ptrace(2) ATF tests

infinite_thread() is designed to be spawned as a pthread(3) function.

It will be used soon in new tests.

diffstat:

 tests/lib/libc/sys/t_ptrace_wait.h |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r a0f29fa7385c -r be2c1f8aa76f tests/lib/libc/sys/t_ptrace_wait.h
--- a/tests/lib/libc/sys/t_ptrace_wait.h        Sat Feb 09 23:03:01 2019 +0000
+++ b/tests/lib/libc/sys/t_ptrace_wait.h        Sat Feb 09 23:10:42 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_ptrace_wait.h,v 1.12 2018/08/13 21:49:37 kamil Exp $ */
+/*     $NetBSD: t_ptrace_wait.h,v 1.13 2019/02/09 23:10:42 kamil Exp $ */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -503,6 +503,16 @@
        }
 }
 
+static void *
+infinite_thread(void *arg __unused)
+{
+
+        while (true)
+                continue;
+
+        __unreachable();
+}
+
 #if defined(HAVE_DBREGS)
 static bool __used
 can_we_set_dbregs(void)



Home | Main Index | Thread Index | Old Index