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.
This commit is contained in:
kamil 2019-02-09 23:10:42 +00:00
parent a253ff12d9
commit fb7fe14f74
1 changed files with 11 additions and 1 deletions

View File

@ -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 @@ check_happy(unsigned n)
}
}
static void *
infinite_thread(void *arg __unused)
{
while (true)
continue;
__unreachable();
}
#if defined(HAVE_DBREGS)
static bool __used
can_we_set_dbregs(void)