From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

pthreads: implement pthread_attr_getdetachstate

This function is used by Java when enabling logging at trace level

Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
Message-Id: <20190810042907.16905-1-jwkozac...@gmail.com>

---
diff --git a/libc/pthread.cc b/libc/pthread.cc
--- a/libc/pthread.cc
+++ b/libc/pthread.cc
@@ -639,6 +639,13 @@ int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr)
     return 0;
 }

+int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
+{
+    auto a = from_libc(attr);
+    *detachstate = a->detached;
+    return 0;
+}
+
 int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
 {
     auto a = from_libc(attr);

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000047a0bf058fd6f227%40google.com.

Reply via email to