am 7875b506: Merge "Fix two errors in pthread_detach.cpp."
* commit '7875b506edfb1fe593034eaf4bc9aa156179fbd2': Fix two errors in pthread_detach.cpp.
This commit is contained in:
commit
09170b9968
@ -45,7 +45,7 @@ int pthread_detach(pthread_t t) {
|
|||||||
switch (old_state) {
|
switch (old_state) {
|
||||||
case THREAD_NOT_JOINED: return 0;
|
case THREAD_NOT_JOINED: return 0;
|
||||||
case THREAD_JOINED: return 0; // Already being joined; silently do nothing, like glibc.
|
case THREAD_JOINED: return 0; // Already being joined; silently do nothing, like glibc.
|
||||||
case THREAD_DETACHED: return THREAD_DETACHED;
|
case THREAD_DETACHED: return EINVAL;
|
||||||
case THREAD_EXITED_NOT_JOINED: break; // Call pthread_join out of scope of pthread_accessor.
|
case THREAD_EXITED_NOT_JOINED: break; // Call pthread_join out of scope of pthread_accessor.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,9 +39,6 @@
|
|||||||
/* Has the thread been joined by another thread? */
|
/* Has the thread been joined by another thread? */
|
||||||
#define PTHREAD_ATTR_FLAG_JOINED 0x00000002
|
#define PTHREAD_ATTR_FLAG_JOINED 0x00000002
|
||||||
|
|
||||||
/* Did the thread exit without freeing pthread_internal_t? */
|
|
||||||
#define PTHREAD_ATTR_FLAG_ZOMBIE 0x00000004
|
|
||||||
|
|
||||||
struct pthread_key_data_t {
|
struct pthread_key_data_t {
|
||||||
uintptr_t seq; // Use uintptr_t just for alignment, as we use pointer below.
|
uintptr_t seq; // Use uintptr_t just for alignment, as we use pointer below.
|
||||||
void* data;
|
void* data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user