Skip to content

Commit d70a62f

Browse files
committed
---
yaml --- r: 24299 b: refs/heads/master c: 6bb0399 h: refs/heads/master i: 24297: ad54711 24295: aea4fbb v: v3
1 parent be1f138 commit d70a62f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 42c6265a8c38bbf899b7afbb15fc6de50ab210c5
2+
refs/heads/master: 6bb0399df2123a2a87262b0f36ba0e56f1de787b
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/rt/sync/rust_thread.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ rust_thread::start() {
3232
thread = CreateThread(NULL, stack_sz, rust_thread_start, this, 0, NULL);
3333
#else
3434
pthread_attr_t attr;
35-
pthread_attr_init(&attr);
36-
pthread_attr_setstacksize(&attr, stack_sz);
37-
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
38-
pthread_create(&thread, &attr, rust_thread_start, (void *) this);
35+
CHECKED(pthread_attr_init(&attr));
36+
CHECKED(pthread_attr_setstacksize(&attr, stack_sz));
37+
CHECKED(pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE));
38+
CHECKED(pthread_create(&thread, &attr, rust_thread_start, (void *) this));
3939
#endif
4040
}
4141

@@ -46,7 +46,7 @@ rust_thread::join() {
4646
WaitForSingleObject(thread, INFINITE);
4747
#else
4848
if (thread)
49-
pthread_join(thread, NULL);
49+
CHECKED(pthread_join(thread, NULL));
5050
#endif
5151
thread = 0;
5252
}
@@ -56,6 +56,6 @@ rust_thread::detach() {
5656
#if !defined(__WIN32__)
5757
// Don't leak pthread resources.
5858
// http://crosstantine.blogspot.com/2010/01/pthreadcreate-memory-leak.html
59-
pthread_detach(thread);
59+
CHECKED(pthread_detach(thread));
6060
#endif
6161
}

0 commit comments

Comments
 (0)