mlibc: bump

This commit is contained in:
Matheus
2026-09-24 21:12:16 -03:00
parent ad1740738b
commit 52e87fa847
7 changed files with 49 additions and 18 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
diff --git frigg-clean/include/frg/formatting.hpp frigg-workdir/include/frg/formatting.hpp diff --git frigg-clean/include/frg/formatting.hpp frigg-workdir/include/frg/formatting.hpp
index a6c89d3..f066c03 100644 index a6c89d39..f066c03c 100644
--- frigg-clean/include/frg/formatting.hpp --- frigg-clean/include/frg/formatting.hpp
+++ frigg-workdir/include/frg/formatting.hpp +++ frigg-workdir/include/frg/formatting.hpp
@@ -341,7 +341,9 @@ namespace _fmt_basics { @@ -341,7 +341,9 @@ namespace _fmt_basics {
@@ -98,10 +98,10 @@ index a6c89d3..f066c03 100644
#endif /* __STDC_HOSTED__ */ #endif /* __STDC_HOSTED__ */
}; };
diff --git frigg-clean/include/frg/printf.hpp frigg-workdir/include/frg/printf.hpp diff --git frigg-clean/include/frg/printf.hpp frigg-workdir/include/frg/printf.hpp
index bce5e24..c4558f8 100644 index cf5bb1c8..9a10f27f 100644
--- frigg-clean/include/frg/printf.hpp --- frigg-clean/include/frg/printf.hpp
+++ frigg-workdir/include/frg/printf.hpp +++ frigg-workdir/include/frg/printf.hpp
@@ -991,7 +991,8 @@ void do_printf_floats(S &sink, Char t, format_options opts, @@ -992,7 +992,8 @@ void do_printf_floats(S &sink, Char t, format_options opts,
sink, pop_arg<long double>(vsp, &opts), sink, pop_arg<long double>(vsp, &opts),
opts.minimum_width, opts.precision, opts.minimum_width, opts.precision,
Char(opts.fill_zeros ? '0' : ' '), opts.left_justify, opts.alt_conversion, Char(opts.fill_zeros ? '0' : ' '), opts.left_justify, opts.alt_conversion,
@@ -111,7 +111,7 @@ index bce5e24..c4558f8 100644
break; break;
} }
#endif #endif
@@ -1000,7 +1001,8 @@ void do_printf_floats(S &sink, Char t, format_options opts, @@ -1001,7 +1002,8 @@ void do_printf_floats(S &sink, Char t, format_options opts,
sink, pop_arg<double>(vsp, &opts), sink, pop_arg<double>(vsp, &opts),
opts.minimum_width, opts.precision, opts.minimum_width, opts.precision,
Char(opts.fill_zeros ? '0' : ' '), opts.left_justify, opts.alt_conversion, use_capitals, Char(opts.fill_zeros ? '0' : ' '), opts.left_justify, opts.alt_conversion, use_capitals,
+38 -7
View File
@@ -1,5 +1,5 @@
diff --git mlibc-clean/options/glibc/generic/stdio_ext.cpp mlibc-workdir/options/glibc/generic/stdio_ext.cpp diff --git mlibc-clean/options/glibc/generic/stdio_ext.cpp mlibc-workdir/options/glibc/generic/stdio_ext.cpp
index ccb3725..3dfa27a 100644 index ccb37257..3dfa27af 100644
--- mlibc-clean/options/glibc/generic/stdio_ext.cpp --- mlibc-clean/options/glibc/generic/stdio_ext.cpp
+++ mlibc-workdir/options/glibc/generic/stdio_ext.cpp +++ mlibc-workdir/options/glibc/generic/stdio_ext.cpp
@@ -71,14 +71,38 @@ size_t __freadahead(FILE *file_base) { @@ -71,14 +71,38 @@ size_t __freadahead(FILE *file_base) {
@@ -52,8 +52,39 @@ index ccb3725..3dfa27a 100644
file->__status_bits |= __MLIBC_ERROR_BIT; file->__status_bits |= __MLIBC_ERROR_BIT;
} }
- -
diff --git mlibc-clean/options/internal/generic/threads.cpp mlibc-workdir/options/internal/generic/threads.cpp
index 2b9abbc0..0be01957 100644
--- mlibc-clean/options/internal/generic/threads.cpp
+++ mlibc-workdir/options/internal/generic/threads.cpp
@@ -269,11 +269,16 @@ int thread_mutex_destroy(struct __mlibc_mutex *mutex) {
int thread_mutex_timedlock(struct __mlibc_mutex *mutex, const struct timespec *__restrict abstime, clockid_t clockid) {
unsigned int this_tid = mlibc::this_tid();
unsigned int expected = 0;
+ bool contended = false;
while(true) {
if(!expected) {
// Try to take the mutex here.
+ unsigned int desired = this_tid;
+ // Preserve the waiters bit after contention, as other waiters may still be asleep.
+ if(contended)
+ desired |= __mlibc_mutex::mutex_waiters_bit;
if(__atomic_compare_exchange_n(&mutex->__mlibc_state,
- &expected, this_tid | __mlibc_mutex::mutex_waiters_bit, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
+ &expected, desired, false, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) {
__ensure(!mutex->__mlibc_recursion);
mutex->__mlibc_recursion = 1;
return 0;
@@ -289,6 +294,8 @@ int thread_mutex_timedlock(struct __mlibc_mutex *mutex, const struct timespec *_
}
}
+ contended = true;
+
// Wait on the futex if the waiters flag is set.
if(expected & __mlibc_mutex::mutex_waiters_bit) {
int e;
diff --git mlibc-clean/options/internal/include/mlibc/allocator.hpp mlibc-workdir/options/internal/include/mlibc/allocator.hpp diff --git mlibc-clean/options/internal/include/mlibc/allocator.hpp mlibc-workdir/options/internal/include/mlibc/allocator.hpp
index d5496df..4dac6db 100644 index d5496df8..4dac6dbd 100644
--- mlibc-clean/options/internal/include/mlibc/allocator.hpp --- mlibc-clean/options/internal/include/mlibc/allocator.hpp
+++ mlibc-workdir/options/internal/include/mlibc/allocator.hpp +++ mlibc-workdir/options/internal/include/mlibc/allocator.hpp
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
@@ -66,7 +97,7 @@ index d5496df..4dac6db 100644
void unmap(uintptr_t address, size_t length); void unmap(uintptr_t address, size_t length);
diff --git mlibc-clean/options/linux/generic/malloc.cpp mlibc-workdir/options/linux/generic/malloc.cpp diff --git mlibc-clean/options/linux/generic/malloc.cpp mlibc-workdir/options/linux/generic/malloc.cpp
index 065de6c..10c7395 100644 index 065de6c1..10c73955 100644
--- mlibc-clean/options/linux/generic/malloc.cpp --- mlibc-clean/options/linux/generic/malloc.cpp
+++ mlibc-workdir/options/linux/generic/malloc.cpp +++ mlibc-workdir/options/linux/generic/malloc.cpp
@@ -1,7 +1,13 @@ @@ -1,7 +1,13 @@
@@ -88,7 +119,7 @@ index 065de6c..10c7395 100644
+ return ptr; + return ptr;
} }
diff --git mlibc-clean/options/posix/generic/monetary.cpp mlibc-workdir/options/posix/generic/monetary.cpp diff --git mlibc-clean/options/posix/generic/monetary.cpp mlibc-workdir/options/posix/generic/monetary.cpp
index 55a567a..d1d7787 100644 index 55a567aa..d1d77873 100644
--- mlibc-clean/options/posix/generic/monetary.cpp --- mlibc-clean/options/posix/generic/monetary.cpp
+++ mlibc-workdir/options/posix/generic/monetary.cpp +++ mlibc-workdir/options/posix/generic/monetary.cpp
@@ -389,6 +389,8 @@ ssize_t strfmon_internal(char *__restrict s, size_t maxsize, mlibc::localeinfo * @@ -389,6 +389,8 @@ ssize_t strfmon_internal(char *__restrict s, size_t maxsize, mlibc::localeinfo *
@@ -101,7 +132,7 @@ index 55a567a..d1d7787 100644
); );
diff --git mlibc-clean/options/posix/include/bits/posix/posix_stdio.h mlibc-workdir/options/posix/include/bits/posix/posix_stdio.h diff --git mlibc-clean/options/posix/include/bits/posix/posix_stdio.h mlibc-workdir/options/posix/include/bits/posix/posix_stdio.h
index f0d6edd..ab57b6b 100644 index f0d6edd1..ab57b6b1 100644
--- mlibc-clean/options/posix/include/bits/posix/posix_stdio.h --- mlibc-clean/options/posix/include/bits/posix/posix_stdio.h
+++ mlibc-workdir/options/posix/include/bits/posix/posix_stdio.h +++ mlibc-workdir/options/posix/include/bits/posix/posix_stdio.h
@@ -63,6 +63,7 @@ char *fgetln(FILE *__stream, size_t *__size); @@ -63,6 +63,7 @@ char *fgetln(FILE *__stream, size_t *__size);
@@ -119,7 +150,7 @@ index f0d6edd..ab57b6b 100644
- -
diff --git mlibc-workdir/tests/glibc/memalign.c mlibc-workdir/tests/glibc/memalign.c diff --git mlibc-workdir/tests/glibc/memalign.c mlibc-workdir/tests/glibc/memalign.c
new file mode 100644 new file mode 100644
index 0000000..0b3a158 index 00000000..0b3a1581
--- /dev/null --- /dev/null
+++ mlibc-workdir/tests/glibc/memalign.c +++ mlibc-workdir/tests/glibc/memalign.c
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
@@ -146,7 +177,7 @@ index 0000000..0b3a158
+ return 0; + return 0;
+} +}
diff --git mlibc-clean/tests/meson.build mlibc-workdir/tests/meson.build diff --git mlibc-clean/tests/meson.build mlibc-workdir/tests/meson.build
index 85b967c..f555a1e 100644 index 85b967c9..f555a1ec 100644
--- mlibc-clean/tests/meson.build --- mlibc-clean/tests/meson.build
+++ mlibc-workdir/tests/meson.build +++ mlibc-workdir/tests/meson.build
@@ -190,6 +190,7 @@ all_test_cases = [ @@ -190,6 +190,7 @@ all_test_cases = [
+1 -1
View File
@@ -1,6 +1,6 @@
name=frigg name=frigg
from_source=frigg from_source=frigg
revision=6 revision=7
hostdeps="xgcc xbinutils pkgconfig" hostdeps="xgcc xbinutils pkgconfig"
imagedeps="meson ninja-build build-essential" imagedeps="meson ninja-build build-essential"
+1 -1
View File
@@ -1,6 +1,6 @@
name=mlibc name=mlibc
from_source=mlibc from_source=mlibc
revision=16 revision=18
hostdeps="xgcc xbinutils pkgconfig" hostdeps="xgcc xbinutils pkgconfig"
builddeps="freestnd-c-hdrs freestnd-cxx-hdrs frigg libsmarter" builddeps="freestnd-c-hdrs freestnd-cxx-hdrs frigg libsmarter"
imagedeps="meson ninja-build git build-essential binutils" imagedeps="meson ninja-build git build-essential binutils"
+1 -1
View File
@@ -1,6 +1,6 @@
name=mlibc-headers name=mlibc-headers
from_source=mlibc from_source=mlibc
revision=10 revision=11
imagedeps="ninja-build meson build-essential rsync" imagedeps="ninja-build meson build-essential rsync"
builddeps="linux-headers" builddeps="linux-headers"
+2 -2
View File
@@ -1,5 +1,5 @@
name=frigg name=frigg
version=b26945516a96c4bd30da6c76d7af013fd69e1a29 version=9bd9c7ba5d2d654fcabf4857373ff7538e304c86
source_method=tarball source_method=tarball
tarball_url="https://github.com/managarm/frigg/archive/${version}.tar.gz" tarball_url="https://github.com/managarm/frigg/archive/${version}.tar.gz"
tarball_sha512=23eb26c0a1db90f7c736fac5ee7d9b603255f6bc0484eede9a4b00c59b16aded5467ce6491077a088fbf94b6d9a20acbb2674c8a84f085802abd62e7f2f4c341 tarball_sha512=4a22c70d10aa10ca007f25b5c825b939dbde818876edaf3b91d6c718c917bc4e8b34b890d0a4b58115610a868bb1b9d7c5a30e7ed7b48b33dbe4073dd2977a9b
+2 -2
View File
@@ -1,5 +1,5 @@
name=mlibc name=mlibc
version=e45676e5a566439e6039f4dfeafc2c1f2253f99a version=0a33162848f8bf4b2cd20dec399340d91cb218a6
source_method=tarball source_method=tarball
tarball_url="https://github.com/managarm/mlibc/archive/${version}.tar.gz" tarball_url="https://github.com/managarm/mlibc/archive/${version}.tar.gz"
tarball_sha512="573e10fbda6bb3ec5b6e94b34495e45ac417cdf213aaafcb187591d208c6d8fde6dbb87378ee91c8bd93bd2a17808b63b013c695cd8f380b87fa04b3bbffb9ab" tarball_sha512="4f4c6e3695f3ca3a0a6e783fc53fc0bba60125c581832c278a1c97cb5052379d57310234236d9b9f6251df62a62eeed5449c828535a316bf42a7e5be704f7343"