aboutsummaryrefslogtreecommitdiff
path: root/system/include/libc
diff options
context:
space:
mode:
Diffstat (limited to 'system/include/libc')
-rw-r--r--system/include/libc/pthread.h4
-rw-r--r--system/include/libc/sys/resource.h1
-rw-r--r--system/include/libc/sys/types.h8
3 files changed, 10 insertions, 3 deletions
diff --git a/system/include/libc/pthread.h b/system/include/libc/pthread.h
index 1185fcc1..ae9f2c88 100644
--- a/system/include/libc/pthread.h
+++ b/system/include/libc/pthread.h
@@ -27,7 +27,7 @@ extern "C" {
#include <unistd.h>
-#if defined(_POSIX_THREADS) || defined(EMSCRIPTEN)
+#if defined(_POSIX_THREADS)
#include <sys/types.h>
#include <time.h>
@@ -46,7 +46,7 @@ int _EXFUN(pthread_mutexattr_getpshared,
int _EXFUN(pthread_mutexattr_setpshared,
(pthread_mutexattr_t *__attr, int __pshared));
-#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) || defined(EMSCRIPTEN)
+#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
/* Single UNIX Specification 2 Mutex Attributes types */
diff --git a/system/include/libc/sys/resource.h b/system/include/libc/sys/resource.h
index a7fbe4dd..f39dcb33 100644
--- a/system/include/libc/sys/resource.h
+++ b/system/include/libc/sys/resource.h
@@ -43,6 +43,7 @@ struct rlimit {
rlim_t rlim_cur;
rlim_t rlim_max;
};
+int getrlimit(int resource, struct rlimit *rlim);
int setrlimit(int resource, const struct rlimit *rlim);
#endif
diff --git a/system/include/libc/sys/types.h b/system/include/libc/sys/types.h
index 2f887537..4bf41a34 100644
--- a/system/include/libc/sys/types.h
+++ b/system/include/libc/sys/types.h
@@ -24,6 +24,12 @@
#include <machine/_types.h>
+#if EMSCRIPTEN
+ #define _POSIX_THREADS
+ #define _UNIX98_THREAD_MUTEX_ATTRIBUTES
+ #define _POSIX_READER_WRITER_LOCKS
+#endif
+
#if defined(__rtems__) || defined(__XMK__) || defined(EMSCRIPTEN)
/*
* The following section is RTEMS specific and is needed to more
@@ -360,7 +366,7 @@ typedef struct {
#endif /* !defined(__XMK__) */
-#if defined(_POSIX_THREAD_PROCESS_SHARED)
+#if defined(_POSIX_THREAD_PROCESS_SHARED) || defined(EMSCRIPTEN)
/* NOTE: P1003.1c/D10, p. 81 defines following values for process_shared. */
#define PTHREAD_PROCESS_PRIVATE 0 /* visible within only the creating process */