trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geor...@apache.org
Subject svn commit: r940506 - in /trafficserver/traffic/trunk: Makefile.am iocore/eventsystem/I_IOBuffer.h iocore/net/I_UDPConnection.h iocore/net/I_UDPPacket.h iocore/net/P_UnixNet.h proxy/EventName.cc proxy/Initialize.cc proxy/Makefile.am
Date Mon, 03 May 2010 16:38:46 GMT
Author: georgep
Date: Mon May  3 16:38:46 2010
New Revision: 940506

URL: http://svn.apache.org/viewvc?rev=940506&view=rev
Log:
TS292: Fix building of libTrafficServerStandalone.a when configured with '--enable-standalone-iocore'.

Tested: ubuntu904,OSX(10.5),FreeBSD(7.2),OpenSolaris(osol0906)

Modified:
    trafficserver/traffic/trunk/Makefile.am
    trafficserver/traffic/trunk/iocore/eventsystem/I_IOBuffer.h
    trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h
    trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h
    trafficserver/traffic/trunk/iocore/net/P_UnixNet.h
    trafficserver/traffic/trunk/proxy/EventName.cc
    trafficserver/traffic/trunk/proxy/Initialize.cc
    trafficserver/traffic/trunk/proxy/Makefile.am

Modified: trafficserver/traffic/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/Makefile.am?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/Makefile.am (original)
+++ trafficserver/traffic/trunk/Makefile.am Mon May  3 16:38:46 2010
@@ -22,7 +22,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
 if STANDALONE_IOCORE
-SUBDIRS =  libinktomi++ librecords iocore @hdr_dirs@
+SUBDIRS =  libinktomi++ librecords iocore @hdr_dirs@ proxy
 else
 SUBDIRS =  libinktomi++ librecords iocore proxy doc rc
 endif

Modified: trafficserver/traffic/trunk/iocore/eventsystem/I_IOBuffer.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/eventsystem/I_IOBuffer.h?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/eventsystem/I_IOBuffer.h (original)
+++ trafficserver/traffic/trunk/iocore/eventsystem/I_IOBuffer.h Mon May  3 16:38:46 2010
@@ -1299,13 +1299,13 @@ TS_INLINE IOBufferData *new_IOBufferData
                                                     ink64 size_index = default_large_iobuffer_size,
                                                     AllocType type = DEFAULT_ALLOC);
 
-inline IOBufferData *new_xmalloc_IOBufferData_internal(
+TS_INLINE IOBufferData *new_xmalloc_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
                                                             const char *location,
 #endif
                                                             void *b, ink64 size);
 
-inline IOBufferData *new_constant_IOBufferData_internal(
+TS_INLINE IOBufferData *new_constant_IOBufferData_internal(
 #ifdef TRACK_BUFFER_USER
                                                              const char *loc,
 #endif
@@ -1342,8 +1342,8 @@ new_constant_IOBufferData_internal(RES_P
 #define  new_constant_IOBufferData new_constant_IOBufferData_internal
 #endif
 
-inline ink64 iobuffer_size_to_index(ink64 size, ink64 max = max_iobuffer_size);
-inline ink64 index_to_buffer_size(ink64 idx);
+TS_INLINE ink64 iobuffer_size_to_index(ink64 size, ink64 max = max_iobuffer_size);
+TS_INLINE ink64 index_to_buffer_size(ink64 idx);
 /**
   Clone a IOBufferBlock chain. Used to snarf a IOBufferBlock chain
   w/o copy.
@@ -1354,7 +1354,7 @@ inline ink64 index_to_buffer_size(ink64 
   @return ptr to head of new IOBufferBlock chain.
 
 */
-inline IOBufferBlock *iobufferblock_clone(IOBufferBlock * b, ink64 offset, ink64 len);
+TS_INLINE IOBufferBlock *iobufferblock_clone(IOBufferBlock * b, ink64 offset, ink64 len);
 /**
   Skip over specified bytes in chain. Used for dropping references.
 
@@ -1366,5 +1366,5 @@ inline IOBufferBlock *iobufferblock_clon
   @return ptr to head of new IOBufferBlock chain.
 
 */
-inline IOBufferBlock *iobufferblock_skip(IOBufferBlock * b, ink64 *poffset, ink64 *plen,
ink64 write);
+TS_INLINE IOBufferBlock *iobufferblock_skip(IOBufferBlock * b, ink64 *poffset, ink64 *plen,
ink64 write);
 #endif

Modified: trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/net/I_UDPConnection.h Mon May  3 16:38:46 2010
@@ -112,5 +112,5 @@ public:
   virtual void UDPConnection_is_abstract() = 0;
 };
 
-inline UDPConnection *new_UDPConnection(int fd);
+TS_INLINE UDPConnection *new_UDPConnection(int fd);
 #endif //__I_UDPCONNECTION_H_

Modified: trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h (original)
+++ trafficserver/traffic/trunk/iocore/net/I_UDPPacket.h Mon May  3 16:38:46 2010
@@ -85,7 +85,7 @@ public:
    @param buf if !NULL, then len bytes copied from buf and made into packet.
    @param len # of bytes to copy from buf
  */
-inline UDPPacket *new_UDPPacket(struct sockaddr_in *to, ink_hrtime when = 0, char *buf =
NULL, int len = 0);
+TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr_in *to, ink_hrtime when = 0, char *buf
= NULL, int len = 0);
 /**
    Create a new packet to be sent over UDPConnection. This clones and
    makes a reference to an existing IOBufferBlock chain.
@@ -97,19 +97,19 @@ inline UDPPacket *new_UDPPacket(struct s
    for packet
    @param len # of bytes to reference from block
  */
-inline UDPPacket *new_UDPPacket(struct sockaddr_in *to,
+TS_INLINE UDPPacket *new_UDPPacket(struct sockaddr_in *to,
                                     ink_hrtime when = 0, IOBufferBlock * block = NULL, int
len = 0);
 /**
    Create a new packet to be sent over UDPConnection.  Packet has no
    destination or data.
 */
-inline UDPPacket *new_UDPPacket();
+TS_INLINE UDPPacket *new_UDPPacket();
 
 /**
    Create a new packet to be delivered to application.
    Internal function only
 */
-inline UDPPacket *new_incoming_UDPPacket(struct sockaddr_in *from, char *buf, int len);
+TS_INLINE UDPPacket *new_incoming_UDPPacket(struct sockaddr_in *from, char *buf, int len);
 
 //@}
 #endif //__I_UDPPACKET_H_

Modified: trafficserver/traffic/trunk/iocore/net/P_UnixNet.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/net/P_UnixNet.h?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/net/P_UnixNet.h (original)
+++ trafficserver/traffic/trunk/iocore/net/P_UnixNet.h Mon May  3 16:38:46 2010
@@ -281,6 +281,7 @@ get_PollDescriptor(EThread * t)
 
 enum ThrottleType
 { ACCEPT, CONNECT };
+
 TS_INLINE int
 net_connections_to_throttle(ThrottleType t)
 {

Modified: trafficserver/traffic/trunk/proxy/EventName.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/EventName.cc?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/EventName.cc (original)
+++ trafficserver/traffic/trunk/proxy/EventName.cc Mon May  3 16:38:46 2010
@@ -30,7 +30,7 @@
 // #include "I_Disk.h" unused
 #include "I_Cache.h"
 #include "I_Net.h"
-#include "P_Cluster.h"
+//#include "P_Cluster.h"
 #include "I_HostDB.h"
 #include "BaseManager.h"
 #include "P_MultiCache.h"
@@ -71,12 +71,13 @@ event_int_to_string(int event, char buff
     case DISK_EVENT_SEEK_COMPLETE: return "DISK_EVENT_SEEK_COMPLETE";
 #endif
 
+#ifdef CLUSTER_CACHE
     case CLUSTER_EVENT_CHANGE: return "CLUSTER_EVENT_CHANGE";
     case CLUSTER_EVENT_CONFIGURATION: return "CLUSTER_EVENT_CONFIGURATION";
     case CLUSTER_EVENT_OPEN: return "CLUSTER_EVENT_OPEN";
     case CLUSTER_EVENT_OPEN_FAILED: return "CLUSTER_EVENT_OPEN_FAILED";
     case CLUSTER_EVENT_STEAL_THREAD: return "CLUSTER_EVENT_STEAL_THREAD";
-
+#endif
     case EVENT_HOST_DB_LOOKUP: return "EVENT_HOST_DB_LOOKUP";
     case EVENT_HOST_DB_GET_RESPONSE: return "EVENT_HOST_DB_GET_RESPONSE";
 

Modified: trafficserver/traffic/trunk/proxy/Initialize.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Initialize.cc?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Initialize.cc (original)
+++ trafficserver/traffic/trunk/proxy/Initialize.cc Mon May  3 16:38:46 2010
@@ -31,17 +31,15 @@
    
 
  ****************************************************************************/
-#include "ink_port.h"
+#include "inktomi++.h"
 #include "Diags.h"
 #include "DiagsConfig.h"
 #include "Main.h"
-#include "EThread.h"
-#include "EventProcessor.h"
-#include "Net.h"
+#include "I_EventSystem.h"
+#include "I_Net.h"
 #include "ProxyConfig.h"
 #include "ProcessManager.h"
 #include "I_Version.h"
-#include "ink_syslog.h"
 #include "MgmtUtils.h"
 
 #if (HOST_OS == freebsd)
@@ -107,7 +105,9 @@ init_system()
 
   max_out_limit(RLIMIT_DATA, true);
   max_out_limit(RLIMIT_FSIZE, true);
+#ifdef RLIMIT_RSS
   max_out_limit(RLIMIT_RSS, true);
+#endif
 }
 
 
@@ -121,84 +121,82 @@ initialize_standalone()
   // Local process manager
   initialize_process_manager();
 
-  diagsConfig = NEW(new DiagsConfig(error_tags, action_tags); diags = diagsConfig->diags;
diags_init = 1; eventProcessor.start(1,       //n_spawn_threads
-                                                                                        
                                      1,       // n_call_threads
-                                                                                        
                                      num_of_net_threads,      //n_net_threads
-                                                                                        
                                      1,       // n_disk_threads
-                                                                                        
                                      0,       //n_cluster_threads (unused)
-                                                                                        
                                      0,       // No FTP threads
-                                                                                        
                                      num_of_cache_threads     // n_cache_threads
-                    );
-                    // Set up IO Buffers
-                    int config_max_iobuffer_size = DEFAULT_MAX_BUFFER_SIZE;
-                    ReadConfigInteger(config_max_iobuffer_size,
-                                      "proxy.config.io.max_buffer_size");
-                    max_iobuffer_size = buffer_size_to_index(config_max_iobuffer_size,
-                                                             DEFAULT_BUFFER_SIZES - 1);
-                    if (default_small_iobuffer_size > max_iobuffer_size)
-                    default_small_iobuffer_size = max_iobuffer_size;
-                    if (default_large_iobuffer_size > max_iobuffer_size)
-                    default_large_iobuffer_size = max_iobuffer_size;
-                    init_buffer_allocators(); netProcessor.start(); return;}
+  diagsConfig = NEW(new DiagsConfig(error_tags, action_tags)); 
+  diags = diagsConfig->diags; diags_init = 1; 
+  eventProcessor.start(ink_number_of_processors());
+
+  // Set up IO Buffers
+  int config_max_iobuffer_size = DEFAULT_MAX_BUFFER_SIZE;
+  ReadConfigInteger(config_max_iobuffer_size,
+                    "proxy.config.io.max_buffer_size");
+  max_iobuffer_size = iobuffer_size_to_index(config_max_iobuffer_size,
+                                           DEFAULT_BUFFER_SIZES - 1);
+  if (default_small_iobuffer_size > max_iobuffer_size)
+    default_small_iobuffer_size = max_iobuffer_size;
+  if (default_large_iobuffer_size > max_iobuffer_size)
+    default_large_iobuffer_size = max_iobuffer_size;
+  init_buffer_allocators(); netProcessor.start(); return;}
 
 //
 // Startup process manager
 //
-                    void initialize_process_manager()
-                    {
-                    ProcessRecords * precs; mgmt_use_syslog();
-                    // Temporary Hack to Enable Communuication with LocalManager
-                    if (getenv("PROXY_REMOTE_MGMT")) {
-                    remote_management_flag = true;}
-
-                    //
-                    // Remove excess '/'
-                    //
-                    if (management_directory[strlen(management_directory) - 1] == '/')
-                    management_directory[strlen(management_directory) - 1] = 0;
-                    //
-                    // Start up manager
-                    //
-                    precs = NEW(new ProcessRecords(management_directory, "records.config",
"lm.config"));
-                    pmgmt = NEW(new ProcessManager(remote_management_flag, management_directory,
-                                                   precs));
-                    ReadConfigString(system_config_directory, "proxy.config.config_dir",
PATH_NAME_MAX);
-                    //
-                    // Define version info records
-                    //
-                    precs->setString("proxy.process.version.server.short",
-                                     appVersionInfo.VersionStr);
-                    precs->setString("proxy.process.version.server.long",
-                                     appVersionInfo.FullVersionInfoStr);
-                    precs->setString("proxy.process.version.server.build_number",
-                                     appVersionInfo.BldNumStr);
-                    precs->setString("proxy.process.version.server.build_time",
+void initialize_process_manager()
+{
+  ProcessRecords * precs; mgmt_use_syslog();
+  // Temporary Hack to Enable Communuication with LocalManager
+  if (getenv("PROXY_REMOTE_MGMT")) {
+    remote_management_flag = true;}
+  
+  //
+  // Remove excess '/'
+  //
+  if (management_directory[strlen(management_directory) - 1] == '/')
+    management_directory[strlen(management_directory) - 1] = 0;
+  //
+  // Start up manager
+  //
+  char rstr[] = "records.config";
+  char lstr[] = "lm.config";
+  precs = NEW(new ProcessRecords(management_directory, rstr, lstr));
+  pmgmt = NEW(new ProcessManager(remote_management_flag, management_directory,
+                                 precs));
+  ReadConfigString(system_config_directory, "proxy.config.config_dir", PATH_NAME_MAX);
+  //
+  // Define version info records
+  //
+  precs->setString("proxy.process.version.server.short",
+                   appVersionInfo.VersionStr);
+  precs->setString("proxy.process.version.server.long",
+                   appVersionInfo.FullVersionInfoStr);
+  precs->setString("proxy.process.version.server.build_number",
+                   appVersionInfo.BldNumStr);
+  precs->setString("proxy.process.version.server.build_time",
                                      appVersionInfo.BldTimeStr);
-                    precs->setString("proxy.process.version.server.build_date",
-                                     appVersionInfo.BldDateStr);
-                    precs->setString("proxy.process.version.server.build_machine",
-                                     appVersionInfo.BldMachineStr);
-                    precs->setString("proxy.process.version.server.build_person", appVersionInfo.BldPersonStr);
-//  precs->setString("proxy.process.version.server.build_compile_flags",
-//                   appVersionInfo.BldCompileFlagsStr);
-                    }
-
-
-                    void clear_http_handler_times()
-                    {
-                    return;}
-
-                    void initialize_thread_for_icp(EThread * thread)
-                    {
-                    (void) thread; return;}
-
-                    void initialize_thread_for_ftp(EThread * thread)
-                    {
-                    (void) thread; return;}
-
-                    void initialize_thread_for_cluster(EThread * thread)
-                    {
-                    (void) thread;}
+  precs->setString("proxy.process.version.server.build_date",
+                   appVersionInfo.BldDateStr);
+  precs->setString("proxy.process.version.server.build_machine",
+                   appVersionInfo.BldMachineStr);
+  precs->setString("proxy.process.version.server.build_person", appVersionInfo.BldPersonStr);
+  //  precs->setString("proxy.process.version.server.build_compile_flags",
+  //                   appVersionInfo.BldCompileFlagsStr);
+}
+
+
+void clear_http_handler_times()
+{
+  return;}
+
+void initialize_thread_for_icp(EThread * thread)
+{
+  (void) thread; return;}
+
+void initialize_thread_for_ftp(EThread * thread)
+{
+  (void) thread; return;}
+
+void initialize_thread_for_cluster(EThread * thread)
+{
+  (void) thread;}
 
 // void syslog_thr_init()
 //
@@ -208,6 +206,6 @@ initialize_standalone()
 //     with stored facility information from system
 //     startup
 //
-                    void syslog_thr_init()
-                    {
-                    }
+void syslog_thr_init()
+{
+}

Modified: trafficserver/traffic/trunk/proxy/Makefile.am
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/Makefile.am?rev=940506&r1=940505&r2=940506&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/Makefile.am (original)
+++ trafficserver/traffic/trunk/proxy/Makefile.am Mon May  3 16:38:46 2010
@@ -16,8 +16,22 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-
+if STANDALONE_IOCORE
+SUBDIRS =
+noinst_LIBRARIES = libTrafficServerStandalone.a
+bin_PROGRAMS =
+noinst_PROGRAMS =
+else
 SUBDIRS = congest dns_cache http2 hdrs logging mgmt2 config stats
+noinst_LIBRARIES =
+bin_PROGRAMS = \
+  traffic_server \
+  traffic_logcat \
+  traffic_logstats \
+  traffic_sac
+
+noinst_PROGRAMS =  traffic_cust_log_fmt_cnvrt
+endif
 
 AM_CPPFLAGS = \
   $(iocore_include_dirs) \
@@ -37,13 +51,6 @@ AM_CPPFLAGS = \
   -DPKGLOCALSTATEDIR=\"$(pkglocalstatedir)\" \
   -DPKGSYSUSER=\"$(pkgsysuser)\"
 
-bin_PROGRAMS = \
-  traffic_server \
-  traffic_logcat \
-  traffic_logstats \
-  traffic_sac
-
-noinst_PROGRAMS =  traffic_cust_log_fmt_cnvrt
 
 includedir=$(prefix)/include/ts
 



Mime
View raw message