From d30c6bc638b8f9b99377c83b62d8ea13109eae64 Mon Sep 17 00:00:00 2001
From: Duncan Coutts <duncan@well-typed.com>
Date: Mon, 9 Jan 2023 01:10:34 +0000
Subject: [PATCH] Tidy up a couple things in Select.{h,c}

Use the standard #include {Begin,End}Private.h style rather than
RTS_PRIVATE on individual decls.

And conditionally build the code for the select I/O manager based on
the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS.
---
 rts/posix/Select.c | 4 ++--
 rts/posix/Select.h | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index fb6e0337b6af..26da034f0253 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -36,7 +36,7 @@
 
 #include "Clock.h"
 
-#if !defined(THREADED_RTS)
+#if defined(IOMGR_ENABLED_SELECT)
 
 // The target time for a threadDelay is stored in a one-word quantity
 // in the TSO (tso->block_info.target).  On a 32-bit machine we
@@ -463,4 +463,4 @@ awaitCompletedTimeoutsOrIOSelect(Capability *cap, bool wait)
                   && emptyRunQueue(cap));
 }
 
-#endif /* THREADED_RTS */
+#endif /* IOMGR_ENABLED_SELECT */
diff --git a/rts/posix/Select.h b/rts/posix/Select.h
index 498fddb4e09c..9c7cf539b014 100644
--- a/rts/posix/Select.h
+++ b/rts/posix/Select.h
@@ -8,10 +8,14 @@
 
 #pragma once
 
+#include "BeginPrivate.h"
+
 // An absolute time value in units of 10ms.
 typedef StgWord LowResTime;
 
-RTS_PRIVATE LowResTime getDelayTarget (HsInt us);
+LowResTime getDelayTarget (HsInt us);
 
 void awaitCompletedTimeoutsOrIOSelect(Capability *cap, bool wait);
 
+#include "EndPrivate.h"
+
-- 
GitLab