You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2021/04/11 11:38:32 UTC

svn commit: r1888617 - /subversion/trunk/subversion/libsvn_subr/task.c

Author: stefan2
Date: Sun Apr 11 11:38:32 2021
New Revision: 1888617

URL: http://svn.apache.org/viewvc?rev=1888617&view=rev
Log:
Make task runner build & work without APR threading support.

* subversion/libsvn_subr/task.c
  (next_task, 
   worker_cancelled,
   send_terminate,
   worker,
   worker_thread,
   wait_for_outputting_state): Don't compile without APR threading.
  (execute_concurrently): Return a malfunction error when called
                          without APR threading.

Modified:
    subversion/trunk/subversion/libsvn_subr/task.c

Modified: subversion/trunk/subversion/libsvn_subr/task.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/task.c?rev=1888617&r1=1888616&r2=1888617&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/task.c (original)
+++ subversion/trunk/subversion/libsvn_subr/task.c Sun Apr 11 11:38:32 2021
@@ -856,6 +856,8 @@ static svn_error_t *output_processed(
 
 /* Execution models */
 
+#if APR_HAS_THREADS
+
 /* From ROOT, find the first unprocessed task - in pre-order - mark it as
  * "in process" and return it in *TASK.  If no such task exists, wait for
  * the ROOT->WORKER_WAKEUP condition and retry.
@@ -1055,6 +1057,8 @@ static svn_error_t *wait_for_outputting_
   return SVN_NO_ERROR;
 }
 
+#endif /* APR_HAS_THREADS */
+
 /* Run the (root) TASK to completion, including dynamically added sub-tasks.
  * Use up to THREAD_COUNT worker threads for that.
  *
@@ -1070,6 +1074,8 @@ static svn_error_t *execute_concurrently
   apr_pool_t *result_pool,
   apr_pool_t *scratch_pool)
 {
+#if APR_HAS_THREADS
+
   int i;
   svn_task__t *current = task;
   root_t *root = task->root;
@@ -1138,6 +1144,14 @@ static svn_error_t *execute_concurrently
 
   /* Get rid of all remaining tasks. */
   return svn_error_trace(svn_error_compose_create(sync_err, task_err));
+
+#else
+
+  /* How the hell did we end up here? */
+  SVN_ERR_MALFUNCTION();
+  return SVN_NO_ERROR;
+
+#endif
 }
 
 /* Run the (root) TASK to completion, including dynamically added sub-tasks.