Fix sem_trywait() implementation + update changelog.
diff --git a/libc/bionic/semaphore.c b/libc/bionic/semaphore.c
index 0c94600..f4eebce 100644
--- a/libc/bionic/semaphore.c
+++ b/libc/bionic/semaphore.c
@@ -196,7 +196,8 @@
if (__atomic_dec_if_positive(&sem->count) > 0) {
return 0;
} else {
- return EAGAIN;
+ errno = EAGAIN;
+ return -1;
}
}
diff --git a/libc/docs/CHANGES.TXT b/libc/docs/CHANGES.TXT
index c2655c5..7c8f38c 100644
--- a/libc/docs/CHANGES.TXT
+++ b/libc/docs/CHANGES.TXT
@@ -46,7 +46,14 @@
- <wchar.h>: Add mbstowcs() and wcstombs()
-- add clone() implementation for ARM (x86 and SH-4 not working yet)
+- add clone() implementation for ARM (x86 and SH-4 not working yet).
+
+- <sys/epoll.h>: <sys/system_properties.h>: Add missing C++ inclusion guards
+
+- fix getpwnam() and getpwgrp() to accept "app_0" as a valid user name.
+
+- fix sem_trywait() to return -1 and set errno to EAGAIN, instead of
+ returning EAGAIN directly.
-------------------------------------------------------------------------------
Differences between Android 2.1 and 2.0.1: