You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/06/26 20:36:22 UTC
git commit: TS-1977 Build issues on OSX / clang
Updated Branches:
refs/heads/master fb357cf08 -> f41fe1eeb
TS-1977 Build issues on OSX / clang
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f41fe1ee
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f41fe1ee
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f41fe1ee
Branch: refs/heads/master
Commit: f41fe1eeb840565b7ad05a20212a93b5b64a3390
Parents: fb357cf
Author: Leif Hedstrom <zw...@apache.org>
Authored: Wed Jun 26 12:35:53 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Jun 26 12:35:57 2013 -0600
----------------------------------------------------------------------
CHANGES | 2 ++
iocore/aio/test_AIO.cc | 4 ++--
iocore/cache/Cache.cc | 10 ++++------
iocore/cache/I_Cache.h | 2 +-
iocore/dns/I_DNSProcessor.h | 2 +-
iocore/eventsystem/I_EventProcessor.h | 2 +-
iocore/eventsystem/I_Processor.h | 2 +-
iocore/eventsystem/I_Tasks.h | 2 +-
iocore/eventsystem/I_Thread.h | 4 +++-
iocore/eventsystem/test_Buffer.cc | 2 +-
iocore/hostdb/HostDB.cc | 6 +++---
iocore/hostdb/I_HostDBProcessor.h | 2 +-
lib/records/I_RecProcess.h | 2 +-
13 files changed, 22 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d2e9ee3..a3aceb0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
Changes with Apache Traffic Server 3.3.5
+ *) [TS-1977] Build issues on OSX / clang related to stacksize changes.
+
*) [TS-1972] TSNetAcceptNamedProtocol does not receive connections.
*) [TS-1970] Using ssl_ca_name= in ssl_multicert.config fails.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/aio/test_AIO.cc
----------------------------------------------------------------------
diff --git a/iocore/aio/test_AIO.cc b/iocore/aio/test_AIO.cc
index 633fce5..817d8a2 100644
--- a/iocore/aio/test_AIO.cc
+++ b/iocore/aio/test_AIO.cc
@@ -477,8 +477,8 @@ main(int /* argc ATS_UNUSED */, char *argv[])
init_diags("", NULL);
RecProcessInit(RECM_STAND_ALONE);
ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
- eventProcessor.start(ink_number_of_processors(), 1048576); // Hardcoded stack size to 1MB
- RecProcessStart(1048576); // Hadcoded stack size to 1MB
+ eventProcessor.start(ink_number_of_processors());
+ RecProcessStart();
ink_aio_init(AIO_MODULE_VERSION);
srand48(time(NULL));
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index f6faacb..b18674a 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -585,7 +585,7 @@ Vol::close_read(CacheVC *cont)
// Cache Processor
int
-CacheProcessor::start(int)
+CacheProcessor::start(int, size_t)
{
return start_internal(0);
}
@@ -660,13 +660,11 @@ CacheProcessor::start_internal(int flags)
if (sector_size < cache_config_force_sector_size)
sector_size = cache_config_force_sector_size;
if (sd->hw_sector_size <= 0 || sector_size > STORE_BLOCK_SIZE) {
- Warning("bad hardware sector size %d, resetting to %d", sector_size,
- STORE_BLOCK_SIZE);
+ Warning("bad hardware sector size %d, resetting to %d", sector_size, STORE_BLOCK_SIZE);
sector_size = STORE_BLOCK_SIZE;
}
- off_t
- skip =
- ROUND_TO_STORE_BLOCK((sd->offset * STORE_BLOCK_SIZE < START_POS ? START_POS + sd->alignment : sd->offset * STORE_BLOCK_SIZE));
+ off_t skip = ROUND_TO_STORE_BLOCK((sd->offset * STORE_BLOCK_SIZE < START_POS ? START_POS + sd->alignment :
+ sd->offset * STORE_BLOCK_SIZE));
blocks = blocks - (skip >> STORE_BLOCK_SHIFT);
disk->path = ats_strdup(path);
disk->hw_sector_size = sector_size;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/cache/I_Cache.h
----------------------------------------------------------------------
diff --git a/iocore/cache/I_Cache.h b/iocore/cache/I_Cache.h
index 7b3fd72..a925a14 100644
--- a/iocore/cache/I_Cache.h
+++ b/iocore/cache/I_Cache.h
@@ -65,7 +65,7 @@ typedef HTTPInfo CacheHTTPInfo;
struct CacheProcessor:public Processor
{
- virtual int start(int n_cache_threads = 0 /* cache uses event threads */ );
+ virtual int start(int n_cache_threads = 0, size_t stacksize = DEFAULT_STACKSIZE);
virtual int start_internal(int flags = 0);
void stop();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/dns/I_DNSProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/dns/I_DNSProcessor.h b/iocore/dns/I_DNSProcessor.h
index ede3da3..b66f172 100644
--- a/iocore/dns/I_DNSProcessor.h
+++ b/iocore/dns/I_DNSProcessor.h
@@ -118,7 +118,7 @@ struct DNSProcessor: public Processor
//
/* currently dns system uses event threads
* dont pass any value to the call */
- int start(int no_of_extra_dns_threads, size_t stacksize);
+ int start(int no_of_extra_dns_threads=0, size_t stacksize=DEFAULT_STACKSIZE);
// Open/close a link to a 'named' (done in start())
//
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/eventsystem/I_EventProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_EventProcessor.h b/iocore/eventsystem/I_EventProcessor.h
index ee784d3..cf2f796 100644
--- a/iocore/eventsystem/I_EventProcessor.h
+++ b/iocore/eventsystem/I_EventProcessor.h
@@ -246,7 +246,7 @@ public:
@return 0 if successful, and a negative value otherwise.
*/
- int start(int n_net_threads, size_t stacksize);
+ int start(int n_net_threads, size_t stacksize=DEFAULT_STACKSIZE);
/**
Stop the EventProcessor. Attempts to stop the EventProcessor and
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/eventsystem/I_Processor.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Processor.h b/iocore/eventsystem/I_Processor.h
index e80255e..66fa700 100644
--- a/iocore/eventsystem/I_Processor.h
+++ b/iocore/eventsystem/I_Processor.h
@@ -98,7 +98,7 @@ public:
@param stacksize The thread stack size to use for this processor.
*/
- virtual int start(int number_of_threads, size_t stacksize)
+ virtual int start(int number_of_threads, size_t stacksize=DEFAULT_STACKSIZE)
{
(void) number_of_threads;
(void) stacksize;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/eventsystem/I_Tasks.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Tasks.h b/iocore/eventsystem/I_Tasks.h
index e4b0dc2..4f7a120 100644
--- a/iocore/eventsystem/I_Tasks.h
+++ b/iocore/eventsystem/I_Tasks.h
@@ -32,7 +32,7 @@ extern EventType ET_TASK;
class TasksProcessor: public Processor
{
public:
- int start(int task_threads, size_t stacksize);
+ int start(int task_threads, size_t stacksize=DEFAULT_STACKSIZE);
};
extern TasksProcessor tasksProcessor;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/eventsystem/I_Thread.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Thread.h b/iocore/eventsystem/I_Thread.h
index ce6b2d8..3a40c52 100644
--- a/iocore/eventsystem/I_Thread.h
+++ b/iocore/eventsystem/I_Thread.h
@@ -74,6 +74,8 @@ typedef THREADAPI_RETURN_TYPE(THREADAPI * ThreadFunction) (void *arg);
extern ProxyMutex *global_mutex;
static const int MAX_THREAD_NAME_LENGTH = 16;
+static const int DEFAULT_STACKSIZE = 1048576; // 1MB
+
/**
Base class for the threads in the Event System. Thread is the base
@@ -129,7 +131,7 @@ private:
Thread & operator =(const Thread &);
public:
- ink_thread start(const char* name, size_t stacksize, ThreadFunction f = NULL, void *a = NULL);
+ ink_thread start(const char* name, size_t stacksize=DEFAULT_STACKSIZE, ThreadFunction f=NULL, void *a=NULL);
virtual void execute()
{ }
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/eventsystem/test_Buffer.cc
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/test_Buffer.cc b/iocore/eventsystem/test_Buffer.cc
index ba74ab4..04eacbc 100644
--- a/iocore/eventsystem/test_Buffer.cc
+++ b/iocore/eventsystem/test_Buffer.cc
@@ -127,7 +127,7 @@ main(int /* argc ATS_UNUSED */, const char */* argv ATS_UNUSED */[])
RecProcessInit(mode_type);
ink_event_system_init(EVENT_SYSTEM_MODULE_VERSION);
- eventProcessor.start(TEST_THREADS, 1048576); // Hardcoded stacksize at 1MB
+ eventProcessor.start(TEST_THREADS);
for (unsigned i = 0; i < 100; ++i) {
MIOBuffer *b1 = new_MIOBuffer(default_large_iobuffer_size);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/hostdb/HostDB.cc
----------------------------------------------------------------------
diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc
index cc2cee7..afeb961 100644
--- a/iocore/hostdb/HostDB.cc
+++ b/iocore/hostdb/HostDB.cc
@@ -440,12 +440,12 @@ HostDBCache::start(int flags)
// Start up the Host Database processor.
// Load configuration, register configuration and statistics and
-// open the cache.
+// open the cache. This doesn't create any threads, so those
+// parameters are ignored.
//
int
-HostDBProcessor::start(int)
+HostDBProcessor::start(int, size_t)
{
- //bool found = false;
hostDB.alloc_mutexes();
if (hostDB.start(0) < 0)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/iocore/hostdb/I_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h
index a1fd949..be48457 100644
--- a/iocore/hostdb/I_HostDBProcessor.h
+++ b/iocore/hostdb/I_HostDBProcessor.h
@@ -459,7 +459,7 @@ struct HostDBProcessor: public Processor
/* hostdb does not use any dedicated event threads
* currently. Dont pass any value to start
*/
- int start(int no_of_additional_event_threads = 0);
+ int start(int no_of_additional_event_threads = 0, size_t stacksize = DEFAULT_STACKSIZE);
// Private
HostDBCache *cache();
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f41fe1ee/lib/records/I_RecProcess.h
----------------------------------------------------------------------
diff --git a/lib/records/I_RecProcess.h b/lib/records/I_RecProcess.h
index 9340efd..bc780ac 100644
--- a/lib/records/I_RecProcess.h
+++ b/lib/records/I_RecProcess.h
@@ -33,7 +33,7 @@
//-------------------------------------------------------------------------
int RecProcessInit(RecModeT mode_type, Diags * diags = NULL);
int RecProcessInitMessage(RecModeT mode_type);
-int RecProcessStart(size_t stacksize);
+int RecProcessStart(size_t stacksize=DEFAULT_STACKSIZE);
//-------------------------------------------------------------------------
// Setters for manipulating internal sleep intervals