sysconf: move in from cpp-cheat

arm baremetal: give more TTBR rationale
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-07-18 00:00:00 +00:00
parent 3ea041e4d9
commit afb38d249b
4 changed files with 49 additions and 0 deletions

12
userland/posix/sysconf.c Normal file
View File

@@ -0,0 +1,12 @@
/* https://github.com/cirosantilli/linux-kernel-module-cheat#sysconf */
#define _XOPEN_SOURCE 700
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(void) {
/* Maximum lengh of command line arguments + environment variables: */
printf("_SC_ARG_MAX (MiB) = %ld\n", sysconf(_SC_ARG_MAX) / (1 << 20));
return EXIT_SUCCESS;
}