trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [trafficserver] 02/02: TS-4883: Remove default arguments from ink_thread_create
Date Mon, 26 Sep 2016 18:19:34 GMT
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 353671c0013e07cf1849a2556963464388439af0
Author: Phil Sorber <sorber@apache.org>
AuthorDate: Mon Sep 26 10:45:24 2016 -0600

    TS-4883: Remove default arguments from ink_thread_create
---
 cmd/traffic_manager/MgmtHandlers.cc    | 2 +-
 cmd/traffic_manager/traffic_manager.cc | 6 +++---
 lib/records/RecLocal.cc                | 4 ++--
 lib/ts/ink_thread.h                    | 2 +-
 lib/ts/signals.cc                      | 2 +-
 lib/ts/test_freelist.cc                | 2 +-
 mgmt/ProcessManager.h                  | 2 +-
 mgmt/api/CoreAPIRemote.cc              | 4 ++--
 mgmt/api/NetworkUtilsRemote.cc         | 4 ++--
 mgmt/cluster/ClusterCom.cc             | 4 ++--
 proxy/InkIOCoreAPI.cc                  | 2 +-
 11 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/cmd/traffic_manager/MgmtHandlers.cc b/cmd/traffic_manager/MgmtHandlers.cc
index e656468..ccc2b4c 100644
--- a/cmd/traffic_manager/MgmtHandlers.cc
+++ b/cmd/traffic_manager/MgmtHandlers.cc
@@ -266,7 +266,7 @@ mgmt_synthetic_main(void *)
       mgmt_log("[SyntheticHealthServer] Connect by disallowed client %s, closing\n", inet_ntoa(clientInfo.sin_addr));
       close_socket(clientFD);
     } else {
-      ink_thread thrId = ink_thread_create(synthetic_thread, (void *)&clientFD, 1);
+      ink_thread thrId = ink_thread_create(synthetic_thread, (void *)&clientFD, 1, 0,
NULL);
 
       if (thrId <= 0) {
         mgmt_log("[SyntheticHealthServer] Failed to create worker thread");
diff --git a/cmd/traffic_manager/traffic_manager.cc b/cmd/traffic_manager/traffic_manager.cc
index 8f064de..53b8050 100644
--- a/cmd/traffic_manager/traffic_manager.cc
+++ b/cmd/traffic_manager/traffic_manager.cc
@@ -688,7 +688,7 @@ main(int argc, const char **argv)
   // can keep a consistent euid when create mgmtapi/eventapi unix
   // sockets in mgmt_synthetic_main thread.
   //
-  synthThrId = ink_thread_create(mgmt_synthetic_main, NULL); /* Spin web agent thread */
+  synthThrId = ink_thread_create(mgmt_synthetic_main, NULL, 0, 0, NULL); /* Spin web agent
thread */
   Debug("lm", "Created Web Agent thread (%" PRId64 ")", (int64_t)synthThrId);
 
   // Setup the API and event sockets
@@ -717,8 +717,8 @@ main(int argc, const char **argv)
   }
 
   umask(oldmask);
-  ink_thread_create(ts_ctrl_main, &mgmtapiFD);
-  ink_thread_create(event_callback_main, &eventapiFD);
+  ink_thread_create(ts_ctrl_main, &mgmtapiFD, 0, 0, NULL);
+  ink_thread_create(event_callback_main, &eventapiFD, 0, 0, NULL);
 
   ticker = time(NULL);
   mgmt_log("[TrafficManager] Setup complete\n");
diff --git a/lib/records/RecLocal.cc b/lib/records/RecLocal.cc
index 461f3a0..b6cd5aa 100644
--- a/lib/records/RecLocal.cc
+++ b/lib/records/RecLocal.cc
@@ -216,8 +216,8 @@ RecLocalInitMessage()
 int
 RecLocalStart(FileManager *configFiles)
 {
-  ink_thread_create(sync_thr, configFiles);
-  ink_thread_create(config_update_thr, NULL);
+  ink_thread_create(sync_thr, configFiles, 0, 0, NULL);
+  ink_thread_create(config_update_thr, NULL, 0, 0, NULL);
   return REC_ERR_OKAY;
 }
 
diff --git a/lib/ts/ink_thread.h b/lib/ts/ink_thread.h
index af4e22f..1fbc4e2 100644
--- a/lib/ts/ink_thread.h
+++ b/lib/ts/ink_thread.h
@@ -128,7 +128,7 @@ ink_thread_key_delete(ink_thread_key key)
 }
 
 static inline ink_thread
-ink_thread_create(void *(*f)(void *), void *a, int detached = 0, size_t stacksize = 0, void
*stack = NULL)
+ink_thread_create(void *(*f)(void *), void *a, int detached, size_t stacksize, void *stack)
 {
   ink_thread t;
   int ret;
diff --git a/lib/ts/signals.cc b/lib/ts/signals.cc
index 4722281..d9fc10b 100644
--- a/lib/ts/signals.cc
+++ b/lib/ts/signals.cc
@@ -116,7 +116,7 @@ check_signal_thread(void *ptr)
 void
 signal_start_check_thread(signal_handler_t handler)
 {
-  ink_thread_create(check_signal_thread, (void *)handler);
+  ink_thread_create(check_signal_thread, (void *)handler, 0, 0, NULL);
 }
 
 bool
diff --git a/lib/ts/test_freelist.cc b/lib/ts/test_freelist.cc
index d013cb2..c3a326c 100644
--- a/lib/ts/test_freelist.cc
+++ b/lib/ts/test_freelist.cc
@@ -74,7 +74,7 @@ main(int /* argc ATS_UNUSED */, char * /*argv ATS_UNUSED */ [])
 
   for (i = 0; i < NTHREADS; i++) {
     fprintf(stderr, "Create thread %d\n", i);
-    ink_thread_create(test, (void *)((intptr_t)i));
+    ink_thread_create(test, (void *)((intptr_t)i), 0, 0, NULL);
   }
 
   test((void *)NTHREADS);
diff --git a/mgmt/ProcessManager.h b/mgmt/ProcessManager.h
index 97a67a4..e987906 100644
--- a/mgmt/ProcessManager.h
+++ b/mgmt/ProcessManager.h
@@ -62,7 +62,7 @@ public:
   void
   start()
   {
-    ink_thread_create(startProcessManager, 0);
+    ink_thread_create(startProcessManager, NULL, 0, 0, NULL);
   }
 
   void
diff --git a/mgmt/api/CoreAPIRemote.cc b/mgmt/api/CoreAPIRemote.cc
index 571ba81..5292c53 100644
--- a/mgmt/api/CoreAPIRemote.cc
+++ b/mgmt/api/CoreAPIRemote.cc
@@ -226,7 +226,7 @@ Init(const char *socket_path, TSInitOptionT options)
 
   // if connected, create event thread that listens for events from TM
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_EVENTS)) {
-    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd);
+    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0,
0, NULL);
   } else {
     ts_event_thread = static_cast<ink_thread>(NULL);
   }
@@ -236,7 +236,7 @@ END:
   // create thread that periodically checks the socket connection
   // with TM alive - reconnects if not alive
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_SOCK_TESTS)) {
-    ts_test_thread = ink_thread_create(socket_test_thread, NULL);
+    ts_test_thread = ink_thread_create(socket_test_thread, NULL, 0, 0, NULL);
   } else {
     ts_test_thread = static_cast<ink_thread>(NULL);
   }
diff --git a/mgmt/api/NetworkUtilsRemote.cc b/mgmt/api/NetworkUtilsRemote.cc
index 85a56d2..5af947c 100644
--- a/mgmt/api/NetworkUtilsRemote.cc
+++ b/mgmt/api/NetworkUtilsRemote.cc
@@ -231,7 +231,7 @@ reconnect()
 
   // relaunch a new event thread since socket_fd changed
   if (0 == (ts_init_options & TS_MGMT_OPT_NO_EVENTS)) {
-    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd);
+    ts_event_thread = ink_thread_create(event_poll_thread_main, &event_socket_fd, 0,
0, NULL);
     // reregister the callbacks on the TM side for this new client connection
     if (remote_event_callbacks) {
       err = send_register_all_callbacks(event_socket_fd, remote_event_callbacks);
@@ -645,7 +645,7 @@ event_poll_thread_main(void *arg)
     event->description = desc;
 
     // got event notice; spawn new thread to handle the event's callback functions
-    ink_thread_create(event_callback_thread, (void *)event);
+    ink_thread_create(event_callback_thread, (void *)event, 0, 0, NULL);
   }
 
   ink_thread_exit(NULL);
diff --git a/mgmt/cluster/ClusterCom.cc b/mgmt/cluster/ClusterCom.cc
index aa7502c..77dac62 100644
--- a/mgmt/cluster/ClusterCom.cc
+++ b/mgmt/cluster/ClusterCom.cc
@@ -444,8 +444,8 @@ ClusterCom::ClusterCom(unsigned long oip, char *host, int mcport, char
*group, i
   mismatchLog = ink_hash_table_create(InkHashTableKeyType_String);
 
   if (cluster_type != NO_CLUSTER) {
-    ink_thread_create(drainIncomingChannel_broadcast, this); /* Spin drainer thread */
-    ink_thread_create(drainIncomingChannel, this);           /* Spin drainer thread */
+    ink_thread_create(drainIncomingChannel_broadcast, this, 0, 0, NULL); /* Spin drainer
thread */
+    ink_thread_create(drainIncomingChannel, this, 0, 0, NULL);           /* Spin drainer
thread */
   }
   return;
 } /* End ClusterCom::ClusterCom */
diff --git a/proxy/InkIOCoreAPI.cc b/proxy/InkIOCoreAPI.cc
index 5ecfa24..da824d2 100644
--- a/proxy/InkIOCoreAPI.cc
+++ b/proxy/InkIOCoreAPI.cc
@@ -129,7 +129,7 @@ TSThreadCreate(TSThreadFunc func, void *data)
   thread->func = func;
   thread->data = data;
 
-  if (!(ink_thread_create(ink_thread_trampoline, (void *)thread, 1))) {
+  if (!(ink_thread_create(ink_thread_trampoline, (void *)thread, 1, 0, NULL))) {
     return (TSThread)NULL;
   }
 

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.

Mime
View raw message