about summary refs log tree commit diff stats
path: root/src/libtools/threads.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtools/threads.c')
-rw-r--r--src/libtools/threads.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libtools/threads.c b/src/libtools/threads.c
index 3e344e8c..40e7b956 100644
--- a/src/libtools/threads.c
+++ b/src/libtools/threads.c
@@ -930,6 +930,20 @@ EXPORT int my_pthread_mutexattr_setkind_np(x64emu_t* emu, my_mutexattr_t *attr,
 	attr->x86 = mattr.x86;
 	return ret;
 }
+EXPORT int my_pthread_mutexattr_setprioceiling(x64emu_t* emu, my_mutexattr_t *attr, int p)
+{
+#ifndef TERMUX
+	(void)emu;
+	my_mutexattr_t mattr = {0};
+	mattr.x86 = attr->x86;
+	int ret = pthread_mutexattr_setprioceiling(&mattr.nat, p);
+	attr->x86 = mattr.x86;
+	return ret;
+#else
+	(void)emu; (void)attr; (void)p;
+	return 0;
+#endif
+}
 EXPORT int my_pthread_mutexattr_setprotocol(x64emu_t* emu, my_mutexattr_t *attr, int p)
 {
 #ifndef TERMUX