summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ldso/dynlink.c2
-rw-r--r--src/ldso/powerpc/start.s8
-rw-r--r--src/thread/pthread_attr_get.c5
-rw-r--r--src/thread/pthread_getcpuclockid.c6
-rw-r--r--src/thread/pthread_mutex_getprioceiling.c6
-rw-r--r--src/thread/pthread_mutex_setprioceiling.c6
-rw-r--r--src/thread/pthread_mutexattr_setprotocol.c7
7 files changed, 39 insertions, 1 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index ba2f6129..66f22bef 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -481,7 +481,7 @@ static struct dso *load_library(const char *name)
if (getline(&sys_path, (size_t[1]){0}, f) > 0) {
size_t l = strlen(sys_path);
if (l && sys_path[l-1]=='\n')
- sys_path[-1] = 0;
+ sys_path[l-1] = 0;
}
fclose(f);
}
diff --git a/src/ldso/powerpc/start.s b/src/ldso/powerpc/start.s
index 08b5979a..6c499e8e 100644
--- a/src/ldso/powerpc/start.s
+++ b/src/ldso/powerpc/start.s
@@ -16,6 +16,14 @@ _start:
bl __dynlink
addi 1, 1, 16
+ lwz 4, 0(1)
+1: addi 4, 4, -1
+ lwzu 5, 4(1)
+ cmpwi 5, -1
+ beq- 1b
+ addi 4, 4, 1
+ stwu 4, -4(1)
+
mtlr 3
li 3, 0
blr
diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c
index f81103d8..e4650e42 100644
--- a/src/thread/pthread_attr_get.c
+++ b/src/thread/pthread_attr_get.c
@@ -68,6 +68,11 @@ int pthread_condattr_getpshared(const pthread_condattr_t *restrict a, int *restr
return 0;
}
+int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict a, int *restrict protocol)
+{
+ *protocol = PTHREAD_PRIO_NONE;
+ return 0;
+}
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict a, int *restrict pshared)
{
*pshared = *a>>31;
diff --git a/src/thread/pthread_getcpuclockid.c b/src/thread/pthread_getcpuclockid.c
new file mode 100644
index 00000000..cf3d2b84
--- /dev/null
+++ b/src/thread/pthread_getcpuclockid.c
@@ -0,0 +1,6 @@
+#include "pthread_impl.h"
+
+int pthread_getcpuclockid(pthread_t t, clockid_t *clockid)
+{
+ return ENOSYS;
+}
diff --git a/src/thread/pthread_mutex_getprioceiling.c b/src/thread/pthread_mutex_getprioceiling.c
new file mode 100644
index 00000000..8c75a661
--- /dev/null
+++ b/src/thread/pthread_mutex_getprioceiling.c
@@ -0,0 +1,6 @@
+#include "pthread_impl.h"
+
+int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict m, int *restrict ceiling)
+{
+ return EINVAL;
+}
diff --git a/src/thread/pthread_mutex_setprioceiling.c b/src/thread/pthread_mutex_setprioceiling.c
new file mode 100644
index 00000000..681f07c8
--- /dev/null
+++ b/src/thread/pthread_mutex_setprioceiling.c
@@ -0,0 +1,6 @@
+#include "pthread_impl.h"
+
+int pthread_mutex_setprioceiling(pthread_mutex_t *restrict m, int ceiling, int *restrict old)
+{
+ return EINVAL;
+}
diff --git a/src/thread/pthread_mutexattr_setprotocol.c b/src/thread/pthread_mutexattr_setprotocol.c
new file mode 100644
index 00000000..c92a31c8
--- /dev/null
+++ b/src/thread/pthread_mutexattr_setprotocol.c
@@ -0,0 +1,7 @@
+#include "pthread_impl.h"
+
+int pthread_mutexattr_setprotocol(pthread_mutexattr_t *a, int protocol)
+{
+ if (protocol) return ENOTSUP;
+ return 0;
+}