Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 47086fa

Browse files
chore: increase readability
1 parent 9d2f0ba commit 47086fa

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

‎06-multi-threading/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if(SDL2_LIBRARIES)
4141
m
4242
${SDL2_LIBRARIES}
4343
)
44+
4445
add_executable(composer
4546
src/musicmaker/composer.c
4647
)

‎06-multi-threading/src/simple_multi_threading.c‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,19 @@ void print_name(char *n) {
2525
int main(int argc, char** argv) {
2626

2727
pthread_t t;
28-
pthread_create(&t, NULL, (void*)print_date, NULL);
29-
28+
pthread_create(
29+
&t,
30+
NULL,
31+
(void*)print_date, NULL
32+
);
3033

3134
pthread_t n;
32-
pthread_create(&n, NULL, (void*)print_name, argv[1] == NULL ? "george" : argv[1]);
33-
35+
pthread_create(
36+
&n,
37+
NULL,
38+
(void*)print_name, argv[1] == NULL ? "george" : argv[1]
39+
);
40+
3441

3542
sleep(10);
3643
run = 0;
@@ -39,4 +46,4 @@ int main(int argc, char** argv) {
3946
pthread_join(n, NULL);
4047

4148
return 0;
42-
}
49+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /