mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
Update brace style.
Add braces around single-line blocks, and remove line breaks before function-opening braces. This resolves #537.
This commit is contained in:
parent
5154ff32ee
commit
c4c2592c83
119 changed files with 2971 additions and 3572 deletions
|
|
@ -9,8 +9,7 @@ struct mq_msg_s {
|
|||
};
|
||||
mq_gen(static, mq_, mq_t, mq_msg_t, link)
|
||||
|
||||
TEST_BEGIN(test_mq_basic)
|
||||
{
|
||||
TEST_BEGIN(test_mq_basic) {
|
||||
mq_t mq;
|
||||
mq_msg_t msg;
|
||||
|
||||
|
|
@ -31,8 +30,7 @@ TEST_BEGIN(test_mq_basic)
|
|||
TEST_END
|
||||
|
||||
static void *
|
||||
thd_receiver_start(void *arg)
|
||||
{
|
||||
thd_receiver_start(void *arg) {
|
||||
mq_t *mq = (mq_t *)arg;
|
||||
unsigned i;
|
||||
|
||||
|
|
@ -45,8 +43,7 @@ thd_receiver_start(void *arg)
|
|||
}
|
||||
|
||||
static void *
|
||||
thd_sender_start(void *arg)
|
||||
{
|
||||
thd_sender_start(void *arg) {
|
||||
mq_t *mq = (mq_t *)arg;
|
||||
unsigned i;
|
||||
|
||||
|
|
@ -61,8 +58,7 @@ thd_sender_start(void *arg)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
TEST_BEGIN(test_mq_threaded)
|
||||
{
|
||||
TEST_BEGIN(test_mq_threaded) {
|
||||
mq_t mq;
|
||||
thd_t receiver;
|
||||
thd_t senders[NSENDERS];
|
||||
|
|
@ -71,20 +67,21 @@ TEST_BEGIN(test_mq_threaded)
|
|||
assert_false(mq_init(&mq), "Unexpected mq_init() failure");
|
||||
|
||||
thd_create(&receiver, thd_receiver_start, (void *)&mq);
|
||||
for (i = 0; i < NSENDERS; i++)
|
||||
for (i = 0; i < NSENDERS; i++) {
|
||||
thd_create(&senders[i], thd_sender_start, (void *)&mq);
|
||||
}
|
||||
|
||||
thd_join(receiver, NULL);
|
||||
for (i = 0; i < NSENDERS; i++)
|
||||
for (i = 0; i < NSENDERS; i++) {
|
||||
thd_join(senders[i], NULL);
|
||||
}
|
||||
|
||||
mq_fini(&mq);
|
||||
}
|
||||
TEST_END
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
main(void) {
|
||||
return (test(
|
||||
test_mq_basic,
|
||||
test_mq_threaded));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue