diff options
author | Luca Dariz <luca@orpolo.org> | 2024-09-04 22:18:05 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-09-08 01:07:26 +0200 |
commit | c1d8407710ad736974fce4373f9f992775a33516 (patch) | |
tree | be21495baf2aa903a420a95c0a2667fcb5ac33d2 /tests/testlib.c | |
parent | f1e3d1e78f8e72bfb2e518ac0ad5ea273dc54b76 (diff) | |
download | gnumach-c1d8407710ad736974fce4373f9f992775a33516.tar.gz gnumach-c1d8407710ad736974fce4373f9f992775a33516.tar.bz2 gnumach-c1d8407710ad736974fce4373f9f992775a33516.zip |
add tests for FLOAT/XFLOAT state
Message-ID: <20240904201806.510082-2-luca@orpolo.org>
Diffstat (limited to 'tests/testlib.c')
-rw-r--r-- | tests/testlib.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testlib.c b/tests/testlib.c index d1ce6d86..77b34372 100644 --- a/tests/testlib.c +++ b/tests/testlib.c @@ -224,6 +224,22 @@ void wait_thread_terminated(thread_t th) } while (1); } +void wait_thread_suspended(thread_t th) +{ + int err; + struct thread_basic_info info; + mach_msg_type_number_t count; + do { + count = THREAD_BASIC_INFO_COUNT; + err = thread_info(th, THREAD_BASIC_INFO, (thread_info_t)&info, &count); + ASSERT_RET(err, "error in thread_info"); + if (info.suspend_count <= 0) + msleep(100); // don't poll continuously + else + break; + } while (1); +} + /* * Minimal _start() for test modules, we just take the arguments from the * kernel, call main() and reboot. As in glibc, we expect the argument pointer |