activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1370779 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
Date Wed, 08 Aug 2012 14:09:30 GMT
Author: tabish
Date: Wed Aug  8 14:09:30 2012
New Revision: 1370779

URL: http://svn.apache.org/viewvc?rev=1370779&view=rev
Log:
fix for: https://issues.apache.org/jira/browse/AMQCPP-417 HPUX aCC

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp?rev=1370779&r1=1370778&r2=1370779&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/System.cpp Wed Aug  8 14:09:30
2012
@@ -51,6 +51,9 @@
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#if defined(__HP_aCC)
+#include <sys/mpctl.h>
+#endif
 
 #include <cstdlib>
 
@@ -511,6 +514,8 @@ int System::availableProcessors() {
     len = sizeof(numCpus);
     sysctl(mib, 2, &numCpus, &len, NULL, 0);
 
+#elif defined(__HP_aCC)
+    numCpus = (int)mpctl(MPC_GETNUMSPUS, NULL, NULL);
 #else
 
     // returns number of online(_SC_NPROCESSORS_ONLN) processors, number configured(_SC_NPROCESSORS_CONF)



Mime
View raw message