aboutsummaryrefslogtreecommitdiff
path: root/libmachdev/trivfs_server.c
diff options
context:
space:
mode:
authorDamien Zammit via Bug reports for the GNU Hurd <bug-hurd@gnu.org>2024-11-10 08:42:02 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-11-10 11:03:32 +0100
commite936af86df5ab09b1dead81a31d5ceb7c01576dd (patch)
tree90dd8680858cd7f81ce69ebec2278e646e609803 /libmachdev/trivfs_server.c
parent9e943599f1b16cc7c60628c504f082f7de6c6449 (diff)
downloadhurd-e936af86df5ab09b1dead81a31d5ceb7c01576dd.tar.gz
hurd-e936af86df5ab09b1dead81a31d5ceb7c01576dd.tar.bz2
hurd-e936af86df5ab09b1dead81a31d5ceb7c01576dd.zip
acpi, libmachdev: Add _forever variant of trivfs server loop
The acpi server needs to survive after the shutdown notification, so it can serve S_acpi_sleep() RPC to actually shut down the machine. Therefore we need to keep the server alive and not respond to the trivfs goaway request. Message-ID: <20241110084135.3859485-2-damien@zamaudio.com>
Diffstat (limited to 'libmachdev/trivfs_server.c')
-rw-r--r--libmachdev/trivfs_server.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c
index 54a682e7..d2031974 100644
--- a/libmachdev/trivfs_server.c
+++ b/libmachdev/trivfs_server.c
@@ -562,3 +562,16 @@ machdev_trivfs_server_loop(void *arg)
return NULL;
}
+
+void *
+machdev_trivfs_server_loop_forever(void *arg)
+{
+ /* Launch. */
+ do
+ {
+ ports_manage_port_operations_one_thread (port_bucket, demuxer, 0);
+ } while (1);
+
+ /* Not reached, or machine powers off */
+ return NULL;
+}