trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1054438 - in /trafficserver/traffic/trunk: example/blacklist-1/ example/thread-pool/ iocore/eventsystem/ proxy/ proxy/api/ts/ proxy/http2/remap/ test/plugin/INKAction/ test/plugin/INKContinuations/ test/plugin/assembly/ test/plugin/blackli...
Date Sun, 02 Jan 2011 17:50:48 GMT
Author: zwoop
Date: Sun Jan  2 17:50:48 2011
New Revision: 1054438

URL: http://svn.apache.org/viewvc?rev=1054438&view=rev
Log:
TS-589 modify TSContSchedule to take a thread type, and add TSContScheduleEvery

Modified:
    trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c
    trafficserver/traffic/trunk/example/thread-pool/psi.c
    trafficserver/traffic/trunk/iocore/eventsystem/I_Event.h
    trafficserver/traffic/trunk/proxy/InkAPI.cc
    trafficserver/traffic/trunk/proxy/InkAPITest.cc
    trafficserver/traffic/trunk/proxy/api/ts/ts.h.in
    trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.cc
    trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.h
    trafficserver/traffic/trunk/test/plugin/INKAction/INKAction.cc
    trafficserver/traffic/trunk/test/plugin/INKContinuations/INKContSchedule.c
    trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc
    trafficserver/traffic/trunk/test/plugin/assembly/assembly.c
    trafficserver/traffic/trunk/test/plugin/blacklist-1-neg/blacklist-1-neg.c
    trafficserver/traffic/trunk/test/plugin/cluster-RPC/clusterRPC.c
    trafficserver/traffic/trunk/test/plugin/plugin_as_origin/net_bridge.c

Modified: trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c (original)
+++ trafficserver/traffic/trunk/example/blacklist-1/blacklist-1.c Sun Jan  2 17:50:48 2011
@@ -112,7 +112,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
     TSDebug("blacklist-1", "Unable to get lock. Will retry after some time");
     TSHandleMLocRelease(bufp, hdr_loc, url_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
-    TSContSchedule(contp, RETRY_TIME);
+    TSContSchedule(contp, RETRY_TIME, TS_THREAD_POOL_DEFAULT);
     return;
   }
 
@@ -208,7 +208,7 @@ read_blacklist(TSCont contp)
 
   /* If the Mutext lock is not successful try again in RETRY_TIME */
   if (!lock) {
-    TSContSchedule(contp, RETRY_TIME);
+    TSContSchedule(contp, RETRY_TIME, TS_THREAD_POOL_DEFAULT);
     return;
   }
 

Modified: trafficserver/traffic/trunk/example/thread-pool/psi.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/psi.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/psi.c (original)
+++ trafficserver/traffic/trunk/example/thread-pool/psi.c Sun Jan  2 17:50:48 2011
@@ -597,7 +597,7 @@ psi_include(TSCont contp, void *edata)
      use TSHttpTxnReenable to wake up the transaction instead of sending an event. */
 
 error:
-  TSContSchedule(contp, 0);
+  TSContSchedule(contp, 0, TS_THREAD_POOL_DEFAULT);
   data->psi_success = 0;
   data->state = STATE_READ_DATA;
   TSMutexUnlock(TSContMutexGet(contp));
@@ -913,7 +913,7 @@ transform_handler(TSCont contp, TSEvent 
     d->contp = contp;
     d->event = event;
     TSContDataSet(c, d);
-    TSContSchedule(c, 10);
+    TSContSchedule(c, 10, TS_THREAD_POOL_DEFAULT);
     return 1;
   }
 
@@ -932,7 +932,7 @@ transform_handler(TSCont contp, TSEvent 
        the continuation right away as the thread will call us back
        on this continuation. */
     if (state == STATE_READ_PSI) {
-      TSContSchedule(contp, 10);
+      TSContSchedule(contp, 10, TS_THREAD_POOL_DEFAULT);
     } else {
       TSMutexUnlock(TSContMutexGet(contp));
       cont_data_destroy(TSContDataGet(contp));

Modified: trafficserver/traffic/trunk/iocore/eventsystem/I_Event.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/I_Event.h?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/I_Event.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/I_Event.h Sun Jan  2 17:50:48 2011
@@ -93,13 +93,6 @@
 #define ONE_WAY_TUNNEL_EVENT_PEER_CLOSE (SIMPLE_EVENT_EVENTS_START+1)
 #define PREFETCH_EVENT_SEND_URL         (SIMPLE_EVENT_EVENTS_START+2)
 
-/*
-enum EventType { ET_SPAWN = 0, ET_CALL, ET_NET, ET_CLUSTER, ET_AUTH,
-		 ET_DNS,ET_CACHE , ET_GC, ET_LOG, ET_ICP,
-                 ET_UDP, ET_SSL, ET_NET_9x, ET_REMAP, ET_LAST};
-const int N_EVENT_TYPES = ET_LAST;
-*/
-
 typedef int EventType;
 const int ET_CALL = 0;
 const int MAX_EVENT_TYPES = 8; // TODO: How is this sized? Where does 8 come from? Or 17
?

Modified: trafficserver/traffic/trunk/proxy/InkAPI.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPI.cc?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPI.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPI.cc Sun Jan  2 17:50:48 2011
@@ -65,6 +65,7 @@
 #endif
 #include "HttpDebugNames.h"
 #include "I_AIO.h"
+#include "I_Tasks.h"
 
 
 /****************************************************************
@@ -1001,7 +1002,8 @@ INKContInternal::destroy()
     m_free_magic = INKCONT_INTERN_MAGIC_DEAD;
     INKContAllocator.free(this);
   } else {
-    TSContSchedule(this, 0);
+    // TODO: Should this schedule on some other "thread" ?
+    TSContSchedule(this, 0, TS_THREAD_POOL_DEFAULT);
   }
 }
 
@@ -4234,7 +4236,7 @@ TSContDataGet(TSCont contp)
 }
 
 TSAction
-TSContSchedule(TSCont contp, ink_hrtime timeout)
+TSContSchedule(TSCont contp, ink_hrtime timeout, TSThreadPool tp)
 {
   if (sdk_sanity_check_iocore_structure(contp) != TS_SUCCESS)
     return (TSAction) TS_ERROR_PTR;
@@ -4250,10 +4252,25 @@ TSContSchedule(TSCont contp, ink_hrtime 
     return (TSAction) TS_ERROR_PTR;
   }
 
+  EventType etype;
+
+  switch (tp) {
+  case TS_THREAD_POOL_NET:
+  case TS_THREAD_POOL_DEFAULT:
+    etype = ET_NET;
+    break;
+  case TS_THREAD_POOL_TASK:
+      etype = ET_TASK;
+      break;
+  default:
+    etype = ET_TASK;
+    break;
+  }
+
   if (timeout == 0) {
-    action = eventProcessor.schedule_imm(i, ET_NET);
+    action = eventProcessor.schedule_imm(i, etype);
   } else {
-    action = eventProcessor.schedule_in(i, HRTIME_MSECONDS(timeout), ET_NET);
+    action = eventProcessor.schedule_in(i, HRTIME_MSECONDS(timeout), etype);
   }
 
 /* This is a hack. SHould be handled in ink_types */
@@ -4262,7 +4279,46 @@ TSContSchedule(TSCont contp, ink_hrtime 
 }
 
 TSAction
-TSHttpSchedule(TSCont contp ,TSHttpTxn txnp, ink_hrtime timeout)
+TSContScheduleEvery(TSCont contp, ink_hrtime every, TSThreadPool tp)
+{
+  if (sdk_sanity_check_iocore_structure(contp) != TS_SUCCESS)
+    return (TSAction) TS_ERROR_PTR;
+
+  FORCE_PLUGIN_MUTEX(contp);
+
+  INKContInternal *i = (INKContInternal *) contp;
+  TSAction action;
+
+  if (ink_atomic_increment((int *) &i->m_event_count, 1) < 0) {
+    // simply return error_ptr
+    //ink_assert (!"not reached");
+    return (TSAction) TS_ERROR_PTR;
+  }
+
+  EventType etype;
+
+  switch (tp) {
+  case TS_THREAD_POOL_NET:
+  case TS_THREAD_POOL_DEFAULT:
+    etype = ET_NET;
+    break;
+  case TS_THREAD_POOL_TASK:
+    etype = ET_TASK;
+    break;
+  default:
+    etype = ET_TASK;
+    break;
+  }
+
+  action = eventProcessor.schedule_every(i, HRTIME_MSECONDS(every), etype);
+
+  /* This is a hack. SHould be handled in ink_types */
+  action = (TSAction) ((uintptr_t) action | 0x1);
+  return action;
+}
+
+TSAction
+TSHttpSchedule(TSCont contp, TSHttpTxn txnp, ink_hrtime timeout)
 {
   if (sdk_sanity_check_iocore_structure (contp) != TS_SUCCESS)
     return (TSAction) TS_ERROR_PTR;
@@ -4276,9 +4332,9 @@ TSHttpSchedule(TSCont contp ,TSHttpTxn t
   sm->set_http_schedule(cont);
 
   if (timeout == 0) {
-    action = eventProcessor.schedule_imm (sm, ET_NET);
+    action = eventProcessor.schedule_imm(sm, ET_NET);
   } else {
-    action = eventProcessor.schedule_in (sm, HRTIME_MSECONDS (timeout), ET_NET);
+    action = eventProcessor.schedule_in(sm, HRTIME_MSECONDS (timeout), ET_NET);
   }
 
   action = (TSAction) ((uintptr_t) action | 0x1);

Modified: trafficserver/traffic/trunk/proxy/InkAPITest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/InkAPITest.cc?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/InkAPITest.cc (original)
+++ trafficserver/traffic/trunk/proxy/InkAPITest.cc Sun Jan  2 17:50:48 2011
@@ -665,7 +665,7 @@ cache_handler(TSCont contp, TSEvent even
 
       // now waiting for 100ms to make sure the key is
       // written in directory remove the content
-      TSContSchedule(contp, 100);
+      TSContSchedule(contp, 100, TS_THREAD_POOL_DEFAULT);
     }
 
     return 1;
@@ -1252,7 +1252,7 @@ REGRESSION_TEST(SDK_API_TSActionCancel) 
 
   TSMutex cont_mutex = TSMutexCreate();
   TSCont contp = TSContCreate(action_cancel_handler, cont_mutex);
-  TSAction actionp = TSContSchedule(contp, 10000);
+  TSAction actionp = TSContSchedule(contp, 10000, TS_THREAD_POOL_DEFAULT);
 
   TSMutexLock(cont_mutex);
   if (TSActionDone(actionp)) {
@@ -1264,7 +1264,7 @@ REGRESSION_TEST(SDK_API_TSActionCancel) 
   }
   TSMutexUnlock(cont_mutex);
 
-  TSContSchedule(contp, 0);
+  TSContSchedule(contp, 0, TS_THREAD_POOL_DEFAULT);
 }
 
 //////////////////////////////////////////////
@@ -1398,7 +1398,7 @@ REGRESSION_TEST(SDK_API_TSContDataGet) (
 
   TSContDataSet(contp, (void *) my_data);
 
-  TSContSchedule(contp, 0);
+  TSContSchedule(contp, 0, TS_THREAD_POOL_DEFAULT);
 }
 
 
@@ -2156,10 +2156,10 @@ REGRESSION_TEST(SDK_API_TSContSchedule) 
   TSCont contp2 = TSContCreate(cont_schedule_handler, TSMutexCreate());
 
   // Test Case 1: schedule immediate
-  TSContSchedule(contp, 0);
+  TSContSchedule(contp, 0, TS_THREAD_POOL_DEFAULT);
 
   // Test Case 2: schedule in 10ms
-  TSContSchedule(contp2, 10);
+  TSContSchedule(contp2, 10, TS_THREAD_POOL_DEFAULT);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -2608,7 +2608,7 @@ mytest_handler(TSCont contp, TSEvent eve
   case TS_EVENT_TIMEOUT:
     /* Browser still waiting the response ? */
     if (test->browser->status == REQUEST_INPROGRESS) {
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
     }
     /* Browser got the response. test is over. clean up */
     else {
@@ -2709,7 +2709,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpHo
 
   /* Wait until transaction is done */
   if (socktest->browser->status == REQUEST_INPROGRESS) {
-    TSContSchedule(cont, 25);
+    TSContSchedule(cont, 25, TS_THREAD_POOL_DEFAULT);
   }
 
   return;
@@ -6149,7 +6149,7 @@ REGRESSION_TEST(SDK_API_TSTextLog) (Regr
   data->magic = MAGIC_ALIVE;
   TSContDataSet(log_test_cont, data);
 
-  TSContSchedule(log_test_cont, 5000);
+  TSContSchedule(log_test_cont, 5000, TS_THREAD_POOL_DEFAULT);
   return;
 }
 
@@ -6817,7 +6817,7 @@ ssn_handler(TSCont contp, TSEvent event,
   case TS_EVENT_TIMEOUT:
     /* Browser still waiting the response ? */
     if (data->browser->status == REQUEST_INPROGRESS) {
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
     }
     /* Browser got the response. test is over. clean up */
     else {
@@ -6908,7 +6908,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpSs
 
   /* Wait until transaction is done */
   if (socktest->browser->status == REQUEST_INPROGRESS) {
-    TSContSchedule(cont, 25);
+    TSContSchedule(cont, 25, TS_THREAD_POOL_DEFAULT);
   }
 
   return;
@@ -7057,12 +7057,12 @@ cache_hook_handler(TSCont contp, TSEvent
     /* Browser still waiting the response ? */
     if (data->first_time == true) {
       if (data->browser1->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
     } else {
       if (data->browser2->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
     }
@@ -7078,7 +7078,7 @@ cache_hook_handler(TSCont contp, TSEvent
         /* Send another similar client request */
         synclient_txn_send_request(data->browser2, data->request);
         TSfree(data->request);
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
 
@@ -7149,7 +7149,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpTx
   synclient_txn_send_request(socktest->browser1, socktest->request);
 
   /* Wait until transaction is done */
-  TSContSchedule(cont, 25);
+  TSContSchedule(cont, 25, TS_THREAD_POOL_DEFAULT);
 
   return;
 }
@@ -7590,37 +7590,37 @@ transform_hook_handler(TSCont contp, TSE
     switch (data->req_no) {
     case 1:
       if (data->browser1->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
       data->req_no++;
       Debug(UTDBG_TAG "_transform", "Running Browser 2");
       synclient_txn_send_request(data->browser2, data->request2);
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
       return 0;
     case 2:
       if (data->browser2->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
       data->req_no++;
       Debug(UTDBG_TAG "_transform", "Running Browser 3");
       synclient_txn_send_request(data->browser3, data->request1);
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
       return 0;
     case 3:
       if (data->browser3->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
       data->req_no++;
       Debug(UTDBG_TAG "_transform", "Running Browser 4");
       synclient_txn_send_request(data->browser4, data->request2);
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
       return 0;
     case 4:
       if (data->browser4->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
       synserver_delete(data->os);
@@ -7764,7 +7764,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpTx
   // synclient_txn_send_request(socktest->browser2, socktest->request2);
 
   /* Wait until transaction is done */
-  TSContSchedule(cont, 25);
+  TSContSchedule(cont, 25, TS_THREAD_POOL_DEFAULT);
 
   return;
 }
@@ -7898,12 +7898,12 @@ altinfo_hook_handler(TSCont contp, TSEve
     /* Browser still waiting the response ? */
     if (data->first_time == true) {
       if ((data->browser1->status == REQUEST_INPROGRESS) || (data->browser2->status
== REQUEST_INPROGRESS)) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
     } else {
       if (data->browser3->status == REQUEST_INPROGRESS) {
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
     }
@@ -7925,7 +7925,7 @@ altinfo_hook_handler(TSCont contp, TSEve
           SDK_RPRINT(data->test, "TSHttpAltInfo", "", TC_FAIL, "TSHttpHookAdd doesn't
return TS_SUCCESS");
         }
 
-        TSContSchedule(contp, 25);
+        TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
         return 0;
       }
 
@@ -8010,7 +8010,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_HttpAl
   synclient_txn_send_request(socktest->browser2, socktest->request2);
 
   /* Wait until transaction is done */
-  TSContSchedule(cont, 25);
+  TSContSchedule(cont, 25, TS_THREAD_POOL_DEFAULT);
 
   return;
 }
@@ -8101,7 +8101,7 @@ cont_test_handler(TSCont contp, TSEvent 
     /* Browser still waiting the response ? */
     if (data->browser->status == REQUEST_INPROGRESS) {
       TSDebug(UTDBG_TAG, "Browser still waiting response...");
-      TSContSchedule(contp, 25);
+      TSContSchedule(contp, 25, TS_THREAD_POOL_DEFAULT);
     }
     /* Browser got the response */
     else {
@@ -8193,7 +8193,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttp
   synclient_txn_send_request_to_vc(data->browser, data->request, data->vc);
 
   /* Wait until transaction is done */
-  TSContSchedule(cont_test, 25);
+  TSContSchedule(cont_test, 25, TS_THREAD_POOL_DEFAULT);
 
   return;
 }
@@ -8232,7 +8232,7 @@ EXCLUSIVE_REGRESSION_TEST(SDK_API_TSHttp
   synclient_txn_send_request_to_vc(data->browser, data->request, data->vc);
 
   /* Wait until transaction is done */
-  TSContSchedule(cont_test, 25);
+  TSContSchedule(cont_test, 25, TS_THREAD_POOL_DEFAULT);
 
   return;
 }

Modified: trafficserver/traffic/trunk/proxy/api/ts/ts.h.in
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/api/ts/ts.h.in?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/api/ts/ts.h.in (original)
+++ trafficserver/traffic/trunk/proxy/api/ts/ts.h.in Sun Jan  2 17:50:48 2011
@@ -544,6 +544,21 @@ extern "C"
     TS_CONFIG_LAST_ENTRY
   } TSOverridableConfigKey;
 
+  /* The TASK pool of threads is the primary method of off-loading continuations from the
+     net-threads. Configure this with proxy.config.task_threads in records.config. */
+  typedef enum
+    {
+      TS_THREAD_POOL_DEFAULT = -1,
+      TS_THREAD_POOL_NET,
+      TS_THREAD_POOL_TASK,
+      /* unlikely you should use these */    
+      TS_THREAD_POOL_SSL,
+      TS_THREAD_POOL_DNS,
+      TS_THREAD_POOL_REMAP,
+      TS_THREAD_POOL_CLUSTER,
+      TS_THREAD_POOL_UDP
+    } TSThreadPool;
+
   extern tsapi const void *TS_ERROR_PTR;
 
   typedef int64_t TSHRTime;
@@ -2024,7 +2039,8 @@ extern "C"
   tsapi TSReturnCode TSContDestroy(TSCont contp);
   tsapi TSReturnCode TSContDataSet(TSCont contp, void *data);
   tsapi void *TSContDataGet(TSCont contp);
-  tsapi TSAction TSContSchedule(TSCont contp, TSHRTime timeout);
+  tsapi TSAction TSContSchedule(TSCont contp, TSHRTime timeout, TSThreadPool tp);
+  tsapi TSAction TSContScheduleEvery(TSCont contp, TSHRTime every, TSThreadPool tp);
   tsapi TSAction TSHttpSchedule(TSCont contp, TSHttpTxn txnp, TSHRTime timeout);
   tsapi int TSContCall(TSCont contp, TSEvent event, void *edata);
   tsapi TSMutex TSContMutexGet(TSCont contp);

Modified: trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.cc?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.cc (original)
+++ trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.cc Sun Jan  2 17:50:48 2011
@@ -29,7 +29,7 @@ extern ClassAllocator<RemapPlugins> plug
 int
 RemapProcessor::start(int num_threads)
 {
-  _ET_REMAP = eventProcessor.spawn_event_threads(num_threads);  //_ET_REMAP is a class member
+  ET_REMAP = eventProcessor.spawn_event_threads(num_threads);  // ET_REMAP is a class member
   return 0;
 }
 
@@ -301,7 +301,7 @@ RemapProcessor::perform_remap(Continuati
   plugins->setState(s);
   plugins->setHostHeaderInfo(hh_info);
 
-  if (!_use_separate_remap_thread) {    // lets not schedule anything on our thread group
(_ET_REMAP), instead, just execute inline
+  if (!_use_separate_remap_thread) {    // lets not schedule anything on our thread group
(ET_REMAP), instead, just execute inline
     int ret = 0;
     do {
       ret = plugins->run_single_remap();
@@ -314,7 +314,7 @@ RemapProcessor::perform_remap(Continuati
     plugins->mutex = cont->mutex;
     plugins->action = cont;
     SET_CONTINUATION_HANDLER(plugins, &RemapPlugins::run_remap);
-    eventProcessor.schedule_imm(plugins, _ET_REMAP);
+    eventProcessor.schedule_imm(plugins, ET_REMAP);
     return &plugins->action;
   }
 }

Modified: trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.h?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.h (original)
+++ trafficserver/traffic/trunk/proxy/http2/remap/RemapProcessor.h Sun Jan  2 17:50:48 2011
@@ -44,7 +44,7 @@ class RemapProcessor: public Processor
 public:
 
  RemapProcessor()
-   :_ET_REMAP(0), _use_separate_remap_thread(false)
+   : ET_REMAP(0), _use_separate_remap_thread(false)
     { }
 
   ~RemapProcessor() { }
@@ -59,7 +59,7 @@ public:
   bool using_separate_thread() { return _use_separate_remap_thread == true; }
 
 private:
-  EventType _ET_REMAP;
+  EventType ET_REMAP;
   bool _use_separate_remap_thread;
 };
 

Modified: trafficserver/traffic/trunk/test/plugin/INKAction/INKAction.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKAction/INKAction.cc?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKAction/INKAction.cc (original)
+++ trafficserver/traffic/trunk/test/plugin/INKAction/INKAction.cc Sun Jan  2 17:50:48 2011
@@ -115,7 +115,7 @@ handle_TSAction(TSCont contp, TSEvent ev
     /* We should get NET_CONNECT or NET_CONNECT_FAILED before
      * this schedule timeout event
      */
-    TSContSchedule(contp, TIMEOUT_VAL);
+    TSContSchedule(contp, TIMEOUT_VAL, TS_THREAD_POOL_DEFAULT);
 
     inkAction = TSNetConnect(contp, htonl(clientAddr), ntohl(clientInfop->port));
     if (!TSActionDone(inkAction)) {

Modified: trafficserver/traffic/trunk/test/plugin/INKContinuations/INKContSchedule.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKContinuations/INKContSchedule.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKContinuations/INKContSchedule.c (original)
+++ trafficserver/traffic/trunk/test/plugin/INKContinuations/INKContSchedule.c Sun Jan  2
17:50:48 2011
@@ -82,7 +82,7 @@ EventHandler(TSCont contp, TSEvent event
 
   iVal += 100;                  /* seed + timeout val */
   TSContDataSet(contp, (void *) iVal);
-  TSContSchedule(contp, iVal);
+  TSContSchedule(contp, iVal, TS_THREAD_POOL_DEFAULT);
 
   /* TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); */
 }

Modified: trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc (original)
+++ trafficserver/traffic/trunk/test/plugin/INKContinuations/ServerSM.cc Sun Jan  2 17:50:48
2011
@@ -636,7 +636,7 @@ state_call_back_sub_sm(TSCont contp, int
   TSMutexLockTry(SubSM->q_mutex, &lock3);
   if (!lock3) {
     set_handler(Server->q_server_current_handler, &state_main_event);
-    Server->q_pending_action = TSContSchedule(contp, RAFT_SERVER_LOCK_RETRY_TIME);
+    Server->q_pending_action = TSContSchedule(contp, RAFT_SERVER_LOCK_RETRY_TIME, TS_THREAD_POOL_DEFAULT);
     return TS_EVENT_NONE;
   }
 
@@ -673,7 +673,7 @@ state_call_back_sub_sm(TSCont contp, int
   Server->server_stats->q_count_server_pipeline_depth--;
 
 //    TSContCall (Server->q_reading_sub_contp, TS_EVENT_CONTINUE, NULL);
-  TSContSchedule(Server->q_reading_sub_contp, 0);
+  TSContSchedule(Server->q_reading_sub_contp, 0, TS_THREAD_POOL_DEFAULT);
 
   TSDebug("serversm", "[state_call_back_sub_sm] release sub_sm's mutex");
   Server->q_reading_sub_contp = NULL;
@@ -783,7 +783,7 @@ state_prepare_to_die(TSCont contp, int e
   int lock;
   TSMutexLockTry(global_table->entry[Server->q_global_table_index].entry_mutex, &lock);
   if (!lock) {
-    Server->q_pending_action = TSContSchedule(contp, RAFT_GLOBAL_TABLE_LOCK_RETRY_TIME);
+    Server->q_pending_action = TSContSchedule(contp, RAFT_GLOBAL_TABLE_LOCK_RETRY_TIME,
TS_THREAD_POOL_DEFAULT);
     return TS_EVENT_NONE;
   }
 
@@ -802,7 +802,7 @@ state_prepare_to_die(TSCont contp, int e
     return server_state_done(contp, 0, NULL);
 
   // not yet safe to go away. retry later.
-  Server->q_pending_action = TSContSchedule(contp, RAFT_SERVER_ATTEMPT_SHUT_DOWN_RETRY_TIME);
+  Server->q_pending_action = TSContSchedule(contp, RAFT_SERVER_ATTEMPT_SHUT_DOWN_RETRY_TIME,
TS_THREAD_POOL_DEFAULT);
   return TS_EVENT_IMMEDIATE;
 }
 

Modified: trafficserver/traffic/trunk/test/plugin/assembly/assembly.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/assembly/assembly.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/assembly/assembly.c (original)
+++ trafficserver/traffic/trunk/test/plugin/assembly/assembly.c Sun Jan  2 17:50:48 2011
@@ -1012,7 +1012,7 @@ asm_cache_retry_read(TSCont contp, AsmDa
 
   data->state = STATE_CACHE_RETRY_READ;
 
-  action = TSContSchedule(contp, CACHE_READ_RETRY_DELAY);
+  action = TSContSchedule(contp, CACHE_READ_RETRY_DELAY, TS_THREAD_POOL_DEFAULT);
   if (!TSActionDone(action)) {
     TSDebug(LOW, "ContSchedule action not completed...");
     data->pending_action = action;

Modified: trafficserver/traffic/trunk/test/plugin/blacklist-1-neg/blacklist-1-neg.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/blacklist-1-neg/blacklist-1-neg.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/blacklist-1-neg/blacklist-1-neg.c (original)
+++ trafficserver/traffic/trunk/test/plugin/blacklist-1-neg/blacklist-1-neg.c Sun Jan  2 17:50:48
2011
@@ -222,7 +222,7 @@ read_blacklist(TSCont contp)
 
   /* If the Mutext lock is not successful try again in RETRY_TIME */
   if (!lock) {
-    TSContSchedule(contp, RETRY_TIME);
+    TSContSchedule(contp, RETRY_TIME, TS_THREAD_POOL_DEFAULT);
     return;
   }
 
@@ -257,7 +257,7 @@ read_blacklist(TSCont contp)
 
   /* negative test for TSContSchedule */
 #ifdef DEBUG
-  if (TSContSchedule(NULL, 10) != TS_ERROR_PTR) {
+  if (TSContSchedule(NULL, 10, TS_THREAD_POOL_DEFAULT) != TS_ERROR_PTR) {
     LOG_ERROR_NEG("TSContSchedule");
   }
 #endif

Modified: trafficserver/traffic/trunk/test/plugin/cluster-RPC/clusterRPC.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/cluster-RPC/clusterRPC.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/cluster-RPC/clusterRPC.c (original)
+++ trafficserver/traffic/trunk/test/plugin/cluster-RPC/clusterRPC.c Sun Jan  2 17:50:48 2011
@@ -390,7 +390,7 @@ periodic_event(TSCont contp, TSEvent eve
       }
     }
   }
-  periodic_event_action = TSContSchedule(periodic_event_cont, (1 * 1000) /* 1 sec */ );
+  periodic_event_action = TSContSchedule(periodic_event_cont, (1 * 1000) /* 1 sec */, TS_THREAD_POOL_DEFAULT);
   return 0;
 }
 
@@ -447,7 +447,7 @@ clusterRPC_init()
     TSDebug(PLUGIN_DEBUG_ERR_TAG, "TSContCreate for periodic_event failed\n");
     return;
   }
-  periodic_event_action = TSContSchedule(periodic_event_cont, (1 * 1000) /* 1 sec */ );
+  periodic_event_action = TSContSchedule(periodic_event_cont, (1 * 1000) /* 1 sec */, TS_THREAD_POOL_DEFAULT);
   TSMutexUnlock(node_status_mutex);
 }
 

Modified: trafficserver/traffic/trunk/test/plugin/plugin_as_origin/net_bridge.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/test/plugin/plugin_as_origin/net_bridge.c?rev=1054438&r1=1054437&r2=1054438&view=diff
==============================================================================
--- trafficserver/traffic/trunk/test/plugin/plugin_as_origin/net_bridge.c (original)
+++ trafficserver/traffic/trunk/test/plugin/plugin_as_origin/net_bridge.c Sun Jan  2 17:50:48
2011
@@ -311,7 +311,7 @@ pvc_process_connect(TSCont contp, int ev
        do not always get VC_EVENT_ERROR on write side of the connection.
        Timeout if we do not reach the host after 30 seconds to prevent leaks.
     */
-    my_state->connect_timeout_event = TSContSchedule(contp, 30 * 1000);
+    my_state->connect_timeout_event = TSContSchedule(contp, 30 * 1000, TS_THREAD_POOL_DEFAULT);
 
     my_state->p_read_vio = TSVConnRead(my_state->p_vc, contp, my_state->req_buffer,
INT_MAX);
     if (my_state->p_read_vio == TS_ERROR_PTR) {



Mime
View raw message