From d29cb3f3deda2ae55fbccfdaae3b2481410a0894 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 9 Jan 2025 23:29:30 -0700 Subject: Add basic smoke tests for the 9p server --- libhw/host_net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libhw') diff --git a/libhw/host_net.c b/libhw/host_net.c index 917e764..d5a5ad5 100644 --- a/libhw/host_net.c +++ b/libhw/host_net.c @@ -1,6 +1,6 @@ /* libhw/host_net.c - implementation for hosted glibc * - * Copyright (C) 2024 Luke T. Shumaker + * Copyright (C) 2024-2025 Luke T. Shumaker * SPDX-License-Identifier: AGPL-3.0-or-later */ @@ -66,9 +66,11 @@ static void hostnet_init(void) { static inline bool RUN_PTHREAD(void *(*fn)(void *), void *args) { pthread_t thread; + bool saved = cr_save_and_disable_interrupts(); if (pthread_create(&thread, NULL, fn, args)) return true; cr_pause_and_yield(); + cr_restore_interrupts(saved); if (pthread_join(thread, NULL)) return true; return false; -- cgit v1.2.3-2-g168b