fix indentation

This commit is contained in:
ale_bychuk
2015-03-08 22:04:29 +03:00
parent 662fbc861a
commit 3af35f548c
13 changed files with 1370 additions and 1367 deletions

View File

@@ -39,8 +39,7 @@
// Block SIGPIPE in main thread. // Block SIGPIPE in main thread.
// //
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS)
namespace namespace {
{
class SignalBlocker class SignalBlocker
{ {
public: public:
@@ -64,8 +63,7 @@ namespace
#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES) #if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES)
namespace namespace {
{
void setThreadName(pthread_t thread, const char* threadName) void setThreadName(pthread_t thread, const char* threadName)
{ {
# if (POCO_OS == POCO_OS_MAC_OS_X) # if (POCO_OS == POCO_OS_MAC_OS_X)
@@ -109,7 +107,8 @@ void ThreadImpl::setPriorityImpl(int prio)
_pData->policy = SCHED_OTHER; _pData->policy = SCHED_OTHER;
if (isRunningImpl()) if (isRunningImpl())
{ {
struct sched_param par; struct MyStruct struct sched_param par;
struct MyStruct
{ {
}; };
@@ -220,7 +219,8 @@ void ThreadImpl::setAffinityImpl(unsigned cpu)
yieldImpl(); yieldImpl();
} }
unsigned ThreadImpl::getAffinityImpl() const { unsigned ThreadImpl::getAffinityImpl() const
{
unsigned cpuSet = 0; unsigned cpuSet = 0;
unsigned cpuCount = Environment::processorCount(); unsigned cpuCount = Environment::processorCount();
#if defined (POCO_OS_FAMILY_UNIX) && POCO_OS != POCO_OS_MAC_OS_X #if defined (POCO_OS_FAMILY_UNIX) && POCO_OS != POCO_OS_MAC_OS_X
@@ -234,8 +234,10 @@ unsigned cpuCount = Environment::processorCount();
if (pthread_getaffinity_np(_pData->thread, &cpuset) != 0) if (pthread_getaffinity_np(_pData->thread, &cpuset) != 0)
throw SystemException("Failed to get affinity", errno); throw SystemException("Failed to get affinity", errno);
#endif #endif
for (unsigned i = 0; i < cpuCount; i++) { for (unsigned i = 0; i < cpuCount; i++)
if (CPU_ISSET(i, &cpuset)) { {
if (CPU_ISSET(i, &cpuset))
{
cpuSet = i; cpuSet = i;
break; break;
} }
@@ -255,7 +257,8 @@ unsigned cpuCount = Environment::processorCount();
(thread_policy_t)&policy, (thread_policy_t)&policy,
&count, &count,
&get_default); &get_default);
if (ret != KERN_SUCCESS) { if (ret != KERN_SUCCESS)
{
throw SystemException("Failed to get affinity", errno); throw SystemException("Failed to get affinity", errno);
} }
cpuSet = policy.affinity_tag; cpuSet = policy.affinity_tag;

View File

@@ -23,8 +23,7 @@
#if defined(POCO_WIN32_DEBUGGER_THREAD_NAMES) #if defined(POCO_WIN32_DEBUGGER_THREAD_NAMES)
namespace namespace {
{
/// See <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx> /// See <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>
/// and <http://blogs.msdn.com/b/stevejs/archive/2005/12/19/505815.aspx> for /// and <http://blogs.msdn.com/b/stevejs/archive/2005/12/19/505815.aspx> for
/// more information on the code below. /// more information on the code below.
@@ -107,12 +106,14 @@ void ThreadImpl::setAffinityImpl(unsigned cpu)
{ {
DWORD mask = 1; DWORD mask = 1;
mask <<= cpu; mask <<= cpu;
if (SetThreadAffinityMask(_thread, mask) == 0) { if (SetThreadAffinityMask(_thread, mask) == 0)
{
throw SystemException("Failed to set affinity"); throw SystemException("Failed to set affinity");
} }
} }
unsigned ThreadImpl::getAffinityImpl() const { unsigned ThreadImpl::getAffinityImpl() const
{
throw Poco::NotImplementedException("Get thread affinity not supported on this system"); throw Poco::NotImplementedException("Get thread affinity not supported on this system");
} }

View File

@@ -20,7 +20,6 @@
#include "Poco/Timestamp.h" #include "Poco/Timestamp.h"
#include "Poco/Timespan.h" #include "Poco/Timespan.h"
#include "Poco/Environment.h" #include "Poco/Environment.h"
//#include <iostream>
#if defined(__sun) && defined(__SVR4) && !defined(__EXTENSIONS__) #if defined(__sun) && defined(__SVR4) && !defined(__EXTENSIONS__)
#define __EXTENSIONS__ #define __EXTENSIONS__
#endif #endif

View File

@@ -8,15 +8,15 @@ rm -rf cmake-build
mkdir cmake-build mkdir cmake-build
cd cmake-build cd cmake-build
cmake ../. -DCMAKE_BUILD_TYPE=Debug $1 $2 $3 $4 $5 cmake ../. -DCMAKE_INSTALL_PREFIX=/opt/devel -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -G "Sublime Text 2 - Unix Makefiles" $1 $2 $3 $4 $5
make -j3 make -j8
make install sudo make install
rm -rf CMakeCache.txt #rm -rf CMakeCache.txt
cmake ../. -DCMAKE_BUILD_TYPE=Release $1 $2 $3 $4 $5 #cmake ../. -DCMAKE_INSTALL_PREFIX=/opt/devel -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON $1 $2 $3 $4 $5
make -j3 #make -j8
make install #sudo make install
cd .. cd ..