[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Make Windows process event timer API available for dormant interface.



commit fab22509d70ff3289f7300788bd9243659268f69
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
Date:   Thu Dec 13 00:52:39 2018 +0100

    Make Windows process event timer API available for dormant interface.
    
    This patch changes the API of the Windows backend of the Process
    subsystem to allow the dormant interface to disable the Process event
    timer.
    
    See: https://bugs.torproject.org/28179
---
 src/lib/process/process_win32.c | 6 +++---
 src/lib/process/process_win32.h | 9 +++++----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/lib/process/process_win32.c b/src/lib/process/process_win32.c
index 911bad393..e9367dafc 100644
--- a/src/lib/process/process_win32.c
+++ b/src/lib/process/process_win32.c
@@ -429,7 +429,7 @@ process_win32_trigger_completion_callbacks(void)
 /** Start the periodic timer which is reponsible for checking whether processes
  * are still alive and to make sure that the Tor process is periodically being
  * moved into an alertable state. */
-STATIC void
+void
 process_win32_timer_start(void)
 {
   /* Make sure we never start our timer if it's already running. */
@@ -447,7 +447,7 @@ process_win32_timer_start(void)
 }
 
 /** Stops the periodic timer. */
-STATIC void
+void
 process_win32_timer_stop(void)
 {
   if (BUG(periodic_timer == NULL))
@@ -458,7 +458,7 @@ process_win32_timer_stop(void)
 }
 
 /** Returns true iff the periodic timer is running. */
-STATIC bool
+bool
 process_win32_timer_running(void)
 {
   return periodic_timer != NULL;
diff --git a/src/lib/process/process_win32.h b/src/lib/process/process_win32.h
index 00de8c949..8ab4880fb 100644
--- a/src/lib/process/process_win32.h
+++ b/src/lib/process/process_win32.h
@@ -43,11 +43,12 @@ int process_win32_read_stderr(struct process_t *process, buf_t *buffer);
 
 void process_win32_trigger_completion_callbacks(void);
 
-#ifdef PROCESS_WIN32_PRIVATE
 /* Timer handling. */
-STATIC void process_win32_timer_start(void);
-STATIC void process_win32_timer_stop(void);
-STATIC bool process_win32_timer_running(void);
+void process_win32_timer_start(void);
+void process_win32_timer_stop(void);
+bool process_win32_timer_running(void);
+
+#ifdef PROCESS_WIN32_PRIVATE
 STATIC void process_win32_timer_callback(periodic_timer_t *, void *);
 STATIC bool process_win32_timer_test_process(process_t *);
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits