summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c')
-rw-r--r--mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c b/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c
new file mode 100644
index 000000000..53f1bed8c
--- /dev/null
+++ b/mdk-stage1/dietlibc/libpthread/pthread_attr_getschedpolicy.c
@@ -0,0 +1,13 @@
+#include <unistd.h>
+#include <errno.h>
+
+#include <pthread.h>
+#include "thread_internal.h"
+
+int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy)
+{
+ __THREAD_INIT();
+
+ *policy = attr->__schedpolicy;
+ return 0;
+}