summaryrefslogtreecommitdiffstats
path: root/unix/tclKqueueNotfy.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-03-21 13:07:15 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-03-21 13:07:15 (GMT)
commitc49b98fa6b7afdb6f63c4abca16d73c56990b715 (patch)
tree9574b65541cfeafbb15d115348443777af5de242 /unix/tclKqueueNotfy.c
parent4e90ccc6db032c546939cdcdfa33fcecd7122dce (diff)
downloadtcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.zip
tcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.tar.gz
tcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.tar.bz2
Start of doing a clean up of the notifier code.
This originated as trying to stop macOS builds from doing silly warnings during a static build, but I noticed that there were common patterns that belong in generic code instead of being repeated in each of the platform-specific pieces.
Diffstat (limited to 'unix/tclKqueueNotfy.c')
-rw-r--r--unix/tclKqueueNotfy.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index 2f1d8e6..fbd38dc 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -209,7 +209,7 @@ Tcl_FinalizeNotifier(
*----------------------------------------------------------------------
*/
-void
+static void
PlatformEventsControl(
FileHandler *filePtr,
ThreadSpecificData *tsdPtr,
@@ -222,7 +222,8 @@ PlatformEventsControl(
struct stat fdStat;
if (isNew) {
- newPedPtr = (struct PlatformEventData *)ckalloc(sizeof(struct PlatformEventData));
+ newPedPtr = (struct PlatformEventData *)
+ ckalloc(sizeof(struct PlatformEventData));
newPedPtr->filePtr = filePtr;
newPedPtr->tsdPtr = tsdPtr;
filePtr->pedPtr = newPedPtr;
@@ -324,9 +325,8 @@ PlatformEventsControl(
*----------------------------------------------------------------------
*/
-void
-PlatformEventsFinalize(
- void)
+static void
+PlatformEventsFinalize(void)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -380,7 +380,7 @@ PlatformEventsFinalize(
*----------------------------------------------------------------------
*/
-void
+static void
PlatformEventsInit(void)
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
@@ -438,7 +438,7 @@ PlatformEventsInit(void)
*----------------------------------------------------------------------
*/
-int
+static int
PlatformEventsTranslate(
struct kevent *eventPtr)
{
@@ -459,7 +459,7 @@ PlatformEventsTranslate(
}
return mask;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -483,7 +483,7 @@ PlatformEventsTranslate(
*----------------------------------------------------------------------
*/
-int
+static int
PlatformEventsWait(
struct kevent *events,
size_t numEvents,
@@ -842,6 +842,8 @@ Tcl_WaitForEvent(
}
#endif /* NOTIFIER_KQUEUE && TCL_THREADS */
+#else
+TCL_MAC_EMPTY_FILE(unix_tclKqueueNotfy_c)
#endif /* !HAVE_COREFOUNDATION */
/*