Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <maxbase/ccdefs.hh>
|
||||
#include <cerrno>
|
||||
@ -24,13 +24,13 @@ namespace maxbase
|
||||
class Semaphore
|
||||
{
|
||||
Semaphore(const Semaphore&) = delete;
|
||||
Semaphore& operator = (const Semaphore&) = delete;
|
||||
Semaphore& operator=(const Semaphore&) = delete;
|
||||
|
||||
public:
|
||||
enum signal_approach_t
|
||||
{
|
||||
HONOUR_SIGNALS, /* Honour signals and return when interrupted. */
|
||||
IGNORE_SIGNALS /* Ignore signals and re-issue the comment when signals occur. */
|
||||
HONOUR_SIGNALS, /* Honour signals and return when interrupted. */
|
||||
IGNORE_SIGNALS /* Ignore signals and re-issue the comment when signals occur. */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -48,7 +48,7 @@ public:
|
||||
initial_count = SEM_VALUE_MAX;
|
||||
}
|
||||
|
||||
MXB_AT_DEBUG(int rc =) sem_init(&m_sem, 0, initial_count);
|
||||
MXB_AT_DEBUG(int rc = ) sem_init(&m_sem, 0, initial_count);
|
||||
mxb_assert(rc == 0);
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
mxb_assert(rc == 0);
|
||||
mxb_assert(count == 0);
|
||||
#endif
|
||||
MXB_AT_DEBUG(rc =) sem_destroy(&m_sem);
|
||||
MXB_AT_DEBUG(rc = ) sem_destroy(&m_sem);
|
||||
mxb_assert(rc == 0);
|
||||
}
|
||||
|
||||
@ -181,9 +181,9 @@ public:
|
||||
}
|
||||
while ((rc != 0) && ((errno == EINTR) && (signal_approach == IGNORE_SIGNALS)));
|
||||
|
||||
mxb_assert((rc == 0) ||
|
||||
(errno == EAGAIN) ||
|
||||
((errno == EINTR) && (signal_approach == HONOUR_SIGNALS)));
|
||||
mxb_assert((rc == 0)
|
||||
|| (errno == EAGAIN)
|
||||
|| ((errno == EINTR) && (signal_approach == HONOUR_SIGNALS)));
|
||||
|
||||
return rc == 0;
|
||||
}
|
||||
@ -217,9 +217,9 @@ public:
|
||||
}
|
||||
while ((rc != 0) && ((errno == EINTR) && (signal_approach == IGNORE_SIGNALS)));
|
||||
|
||||
mxb_assert((rc == 0) ||
|
||||
(errno == ETIMEDOUT) ||
|
||||
((errno == EINTR) && (signal_approach == HONOUR_SIGNALS)));
|
||||
mxb_assert((rc == 0)
|
||||
|| (errno == ETIMEDOUT)
|
||||
|| ((errno == EINTR) && (signal_approach == HONOUR_SIGNALS)));
|
||||
|
||||
return rc == 0;
|
||||
}
|
||||
@ -285,7 +285,7 @@ public:
|
||||
* and in the latter `EINTR.
|
||||
*/
|
||||
bool timedwait(time_t seconds,
|
||||
long nseconds,
|
||||
long nseconds,
|
||||
signal_approach_t signal_approach = IGNORE_SIGNALS) const
|
||||
{
|
||||
timespec ts;
|
||||
@ -316,7 +316,7 @@ public:
|
||||
*/
|
||||
size_t timedwait_n(size_t n_wait,
|
||||
time_t seconds,
|
||||
long nseconds,
|
||||
long nseconds,
|
||||
signal_approach_t signal_approach = IGNORE_SIGNALS) const
|
||||
{
|
||||
timespec ts;
|
||||
@ -380,5 +380,4 @@ private:
|
||||
private:
|
||||
mutable sem_t m_sem;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user