mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
fix indentation
This commit is contained in:
@@ -39,8 +39,7 @@
|
||||
// Block SIGPIPE in main thread.
|
||||
//
|
||||
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS)
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
class SignalBlocker
|
||||
{
|
||||
public:
|
||||
@@ -64,8 +63,7 @@ namespace
|
||||
#if defined(POCO_POSIX_DEBUGGER_THREAD_NAMES)
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
void setThreadName(pthread_t thread, const char* threadName)
|
||||
{
|
||||
# if (POCO_OS == POCO_OS_MAC_OS_X)
|
||||
@@ -109,7 +107,8 @@ void ThreadImpl::setPriorityImpl(int prio)
|
||||
_pData->policy = SCHED_OTHER;
|
||||
if (isRunningImpl())
|
||||
{
|
||||
struct sched_param par; struct MyStruct
|
||||
struct sched_param par;
|
||||
struct MyStruct
|
||||
{
|
||||
|
||||
};
|
||||
@@ -220,7 +219,8 @@ void ThreadImpl::setAffinityImpl(unsigned cpu)
|
||||
yieldImpl();
|
||||
}
|
||||
|
||||
unsigned ThreadImpl::getAffinityImpl() const {
|
||||
unsigned ThreadImpl::getAffinityImpl() const
|
||||
{
|
||||
unsigned cpuSet = 0;
|
||||
unsigned cpuCount = Environment::processorCount();
|
||||
#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)
|
||||
throw SystemException("Failed to get affinity", errno);
|
||||
#endif
|
||||
for (unsigned i = 0; i < cpuCount; i++) {
|
||||
if (CPU_ISSET(i, &cpuset)) {
|
||||
for (unsigned i = 0; i < cpuCount; i++)
|
||||
{
|
||||
if (CPU_ISSET(i, &cpuset))
|
||||
{
|
||||
cpuSet = i;
|
||||
break;
|
||||
}
|
||||
@@ -255,7 +257,8 @@ unsigned cpuCount = Environment::processorCount();
|
||||
(thread_policy_t)&policy,
|
||||
&count,
|
||||
&get_default);
|
||||
if (ret != KERN_SUCCESS) {
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
throw SystemException("Failed to get affinity", errno);
|
||||
}
|
||||
cpuSet = policy.affinity_tag;
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#if defined(POCO_WIN32_DEBUGGER_THREAD_NAMES)
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
/// See <http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx>
|
||||
/// and <http://blogs.msdn.com/b/stevejs/archive/2005/12/19/505815.aspx> for
|
||||
/// more information on the code below.
|
||||
@@ -107,12 +106,14 @@ void ThreadImpl::setAffinityImpl(unsigned cpu)
|
||||
{
|
||||
DWORD mask = 1;
|
||||
mask <<= cpu;
|
||||
if (SetThreadAffinityMask(_thread, mask) == 0) {
|
||||
if (SetThreadAffinityMask(_thread, mask) == 0)
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Environment.h"
|
||||
//#include <iostream>
|
||||
#if defined(__sun) && defined(__SVR4) && !defined(__EXTENSIONS__)
|
||||
#define __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
@@ -8,15 +8,15 @@ rm -rf cmake-build
|
||||
mkdir cmake-build
|
||||
cd cmake-build
|
||||
|
||||
cmake ../. -DCMAKE_BUILD_TYPE=Debug $1 $2 $3 $4 $5
|
||||
make -j3
|
||||
make install
|
||||
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 -j8
|
||||
sudo make install
|
||||
|
||||
rm -rf CMakeCache.txt
|
||||
#rm -rf CMakeCache.txt
|
||||
|
||||
cmake ../. -DCMAKE_BUILD_TYPE=Release $1 $2 $3 $4 $5
|
||||
make -j3
|
||||
make install
|
||||
#cmake ../. -DCMAKE_INSTALL_PREFIX=/opt/devel -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON $1 $2 $3 $4 $5
|
||||
#make -j8
|
||||
#sudo make install
|
||||
|
||||
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user