mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Make some system call fixes
- Fix minor ABI issue with SIOCGIFCONF - Fix ABI translation issues with statfs() on BSDs - Fix SQLite angled header line
This commit is contained in:
parent
0eb621f75e
commit
2b6261a52d
11 changed files with 88 additions and 37 deletions
|
@ -23,7 +23,9 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/nexgen32e/x86feature.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/f.h"
|
||||
#include "libc/sysv/consts/mlock.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
|
||||
double g_avx2_juiceup_doubles_[4] forcealign(32);
|
||||
|
@ -47,6 +49,15 @@ void testlib_benchwarmup(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void EnableCruiseControlForCool(void) {
|
||||
int fd, micros = 10;
|
||||
if ((fd = open("/dev/cpu_dma_latency", O_WRONLY)) != -1) {
|
||||
write(fd, µs, sizeof(micros));
|
||||
fcntl(fd, F_DUPFD_CLOEXEC, 123);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs all benchmark functions in sorted order.
|
||||
*
|
||||
|
@ -55,5 +66,6 @@ void testlib_benchwarmup(void) {
|
|||
void testlib_runallbenchmarks(void) {
|
||||
int e;
|
||||
__log_level = kLogWarn;
|
||||
EnableCruiseControlForCool();
|
||||
testlib_runtestcases(__bench_start, __bench_end, testlib_benchwarmup);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue