Displaying 6 results from an estimated 6 matches for "__page_shift".
Did you mean:
xc_page_shift
2013 May 13
0
[klibc:sysconf] Framework and trivial implementation of sysconf(3)
.../include/unistd.h
+++ b/usr/include/unistd.h
@@ -144,13 +144,13 @@ __extern int optind, opterr, optopt;
__extern int isatty(int);
__extern unsigned int __page_size;
-static __inline__ int getpagesize(void)
+__must_inline int getpagesize(void)
{
return __page_size;
}
__extern unsigned int __page_shift;
-static __inline__ int __getpageshift(void)
+__must_inline int __getpageshift(void)
{
return __page_shift;
}
@@ -162,4 +162,7 @@ __extern int daemon(int, int);
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
+/* This #include must be at the end */
+#include <sys/sysconf.h>
+
#endif...
2014 Jan 25
0
[klibc:master] auxv: convert auxiliary vector into an array; define getauxval()
...c
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <klibc/compiler.h>
#include <elf.h>
+#include <sys/auxv.h>
#include "atexit.h"
/* This file is included from __static_init.c or __shared_init.c */
@@ -35,12 +36,14 @@ char **environ;
unsigned int __page_size, __page_shift;
struct auxentry {
- uintptr_t type;
- uintptr_t v;
+ unsigned long type;
+ unsigned long v;
};
extern void __init_stdio(void);
+unsigned long __auxval[_AUXVAL_MAX];
+
__noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void))
{
int argc;
@@ -76,20 +79,16 @@ __noreturn __libc_i...
2007 Aug 24
2
[git patch] klibc bzero, mount fixes + random stuff
...c/../include/unistd.h: In function 'getpagesize':
usr/klibc/../include/unistd.h:145: warning: nested extern declaration of '__page_size'
usr/klibc/../include/unistd.h: In function '__getpageshift':
usr/klibc/../include/unistd.h:150: warning: nested extern declaration of '__page_shift'
they also appear when compiling udev against klibc, as udev
sets aboves gcc warning. can you enlight me on what's going
on, tried to compile with -E to see if any preprocessor trick
was going on, but..?
--
maks
commit 63310d84839af47b0beb304d9722f26a379ff7dd
Author: maximilian attems...
2014 Apr 09
0
[klibc:master] Move architecture-specific initialization to arch/
...uot;: "=r"(page_shift):"r"(page_size));
+ asm("bsrl %1,%0" : "=r" (page_shift) : "r" (page_size));
#else
while (page_size > 1) {
page_shift++;
@@ -112,7 +105,11 @@ __noreturn __libc_init(uintptr_t * elfdata, void (*onexit) (void))
#endif
__page_shift = page_shift;
- __init_stdio();
+#if _KLIBC_HAS_ARCHINIT
+ __libc_archinit();
+#endif
+
+ __libc_init_stdio();
environ = envp;
exit(MAIN(argc, argv, envp));
diff --git a/usr/klibc/stdio/fdopen.c b/usr/klibc/stdio/fdopen.c
index 51285ba..cdc35cc 100644
--- a/usr/klibc/stdio/fdopen.c
+++ b/us...
2020 Jun 18
1
[PATCH] Kbuild for klibc and nfsmount: fix multiple definitions
...t;
#include <stdlib.h>
#include <stdint.h>
+#include <unistd.h>
#include <klibc/compiler.h>
#include <elf.h>
#include <sys/auxv.h>
@@ -39,7 +40,6 @@
# error "SHARED should be defined to 0 or 1"
#endif
-char **environ;
unsigned int __page_size, __page_shift;
struct auxentry {
diff --git a/usr/klibc/lrand48.c b/usr/klibc/lrand48.c
index 7dfcf9200128..a2fc87ae039f 100644
--- a/usr/klibc/lrand48.c
+++ b/usr/klibc/lrand48.c
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <stdint.h>
-unsigned short __rand48_seed[3]; /* Common with mrand48.c...
2012 Jan 29
5
[PATCH 0/2 v3] mkstemp() and m68k support
Hi,
after a year, I decided to hack on klibc again. I?ve reworked
both the patch to add mkstemp(), discussing to use AT_RANDOM
as cheap entropy source on IRC (if there will ever be another
entropy consumer, I can quickly write a minimal arc4random()
seeded from it, as it has only 16 octets), capable of making
a working mksh (static and shared) on amd64/xen, and the m68k
support code, leading to