MAP_SYNC troubles on MIPS platforms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

While testing musl-libc builds with MIPS-based platforms, I ran into the following build failure affecting the mmap.c file only:

    mmap.c: In function 'mmap_f':
    mmap.c:196:12: error: 'MAP_SYNC' undeclared (first use in this function); did you mean 'MS_SYNC'?
      196 |    flags = MAP_SYNC | MAP_SHARED_VALIDATE;
          |            ^~~~~~~~
          |            MS_SYNC
    mmap.c:196:12: note: each undeclared identifier is reported only once for each function it appears in
    make[4]: *** [../include/buildrules:81: mmap.o] Error 1

musl-libc does explicitly un-define MAP_SYNC since MIPS does not support it:

https://git.musl-libc.org/cgit/musl/tree/arch/mips/bits/mman.h#n21

however the include chain for io/mmap.c should still have the linux.h compatibility shim provide a suitable definition for MAP_SYNC so this did not really make sense to me:

#include <sys/mman.h>
	-> bits/mman.h	(where the undefined happens)
#include "io.h"
	-> include/xfs.h
		-> include/linux.h

I have confirmed that at every stage of the inclusion chain the MAP_SYNC and HAVE_MAP_SYNC are defined or undefined as intended, up until the top-level inclusion of include/xfs.h in io/io.h where MAP_SYNC is not defined after we included xfs.h which does not quite make sense to me at all. The build command line for that file is:

mipsel-buildroot-linux-musl-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g0 -DDANGEROUS_COMMANDS_ENABLED -D_FILE_OFFSET_BITS=64 -Wno-address-of-packed-member -g -O2 -DDEBUG -DVERSION=\"5.14.2\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -I../libxfs -I.. -D_LGPL_SOURCE -D_GNU_SOURCE -funsigned-char -fno-strict-aliasing -Wall -DHAVE_MNTENT -DHAVE_FSETXATTR -DENABLE_BLKID -DHAVE_GETFSMAP -DHAVE_FALLOCATE -DHAVE_FADVISE -DHAVE_MADVISE -DHAVE_MINCORE -DHAVE_SENDFILE -DHAVE_FIEMAP -DHAVE_COPY_FILE_RANGE -DHAVE_SYNC_FILE_RANGE -DHAVE_SYNCFS -DHAVE_FALLOCATE -DHAVE_PREADV -DHAVE_PWRITEV -DHAVE_READDIR -DHAVE_MREMAP -DHAVE_STATFS_FLAGS -c mmap.c

People in other projects have attempted to fix it

https://github.com/openwrt/packages/blob/master/utils/xfsprogs/patches/140-mman.patch

but this feels just plain wrong. The only way that I could get it to build was to do the following, but this does not really work on my x86_64 glibc host:

diff --git a/include/linux.h b/include/linux.h
index 3d9f4e3dca80..7ca9fab16705 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -252,8 +252,11 @@ struct fsxattr {
 #endif

 #ifndef HAVE_MAP_SYNC
+#include <sys/mman.h>
 #define MAP_SYNC 0
+#ifndef MAP_SHARED_VALIDATE
 #define MAP_SHARED_VALIDATE 0
+#endif
 #else
 #include <asm-generic/mman.h>
 #include <asm-generic/mman-common.h>

Any clues from the mmap.i attached filed what could be going wrong?

Thank you for reading me!
-- 
Florian
# 1 "mmap.c"
# 1 "/home/fainelli/work/buildroot/output/bmips/build/xfsprogs-5.14.2/io//"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "mmap.c"






# 1 "../include/command.h" 1
# 9 "../include/command.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/time.h" 1 3 4






# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/features.h" 1 3 4
# 8 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/time.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/select.h" 1 3 4
# 16 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/select.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 43 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4

# 43 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned int size_t;
# 78 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef long long time_t;




typedef long long suseconds_t;
# 217 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
struct timeval { time_t tv_sec; suseconds_t tv_usec; };




struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(1234==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(1234!=4321); };
# 342 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/select.h" 2 3 4



typedef unsigned long fd_mask;

typedef struct {
 unsigned long fds_bits[1024 / 8 / sizeof(long)];
} fd_set;






int select (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict);
int pselect (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, const struct timespec *restrict, const sigset_t *restrict);






__typeof__(select) select __asm__("__select_time64");
__typeof__(pselect) pselect __asm__("__pselect_time64");
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/time.h" 2 3 4

int gettimeofday (struct timeval *restrict, void *restrict);





struct itimerval {
 struct timeval it_interval;
 struct timeval it_value;
};

int getitimer (int, struct itimerval *);
int setitimer (int, const struct itimerval *restrict, struct itimerval *restrict);
int utimes (const char *, const struct timeval [2]);


struct timezone {
 int tz_minuteswest;
 int tz_dsttime;
};
int futimes(int, const struct timeval [2]);
int futimesat(int, const char *, const struct timeval [2]);
int lutimes(const char *, const struct timeval [2]);
int settimeofday(const struct timeval *, const struct timezone *);
int adjtime (const struct timeval *, struct timeval *);
# 60 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/time.h" 3 4
__typeof__(gettimeofday) gettimeofday __asm__("__gettimeofday_time64");
__typeof__(getitimer) getitimer __asm__("__getitimer_time64");
__typeof__(setitimer) setitimer __asm__("__setitimer_time64");
__typeof__(utimes) utimes __asm__("__utimes_time64");

__typeof__(futimes) futimes __asm__("__futimes_time64");
__typeof__(futimesat) futimesat __asm__("__futimesat_time64");
__typeof__(lutimes) lutimes __asm__("__lutimes_time64");
__typeof__(settimeofday) settimeofday __asm__("__settimeofday_time64");
__typeof__(adjtime) adjtime __asm__("__adjtime64");
# 10 "../include/command.h" 2
# 20 "../include/command.h"

# 20 "../include/command.h"
typedef int (*cfunc_t)(int argc, char **argv);
typedef void (*helpfunc_t)(void);

typedef struct cmdinfo {
 const char *name;
 const char *altname;
 cfunc_t cfunc;
 int argmin;
 int argmax;
 int canpush;
 int flags;
 const char *args;
 const char *oneline;
 helpfunc_t help;
} cmdinfo_t;

extern cmdinfo_t *cmdtab;
extern int ncmds;

extern void help_init(void);
extern void quit_init(void);

typedef int (*iterfunc_t)(int index);
typedef int (*checkfunc_t)(const cmdinfo_t *ci);

extern void add_command(const cmdinfo_t *ci);
extern void add_user_command(char *optarg);
extern void add_oneshot_user_command(char *optarg);
extern void add_command_iterator(iterfunc_t func);
extern void add_check_command(checkfunc_t cf);

extern const cmdinfo_t *find_command(const char *cmd);

extern void command_loop(void);
extern int command_usage(const cmdinfo_t *ci);
extern int command(const cmdinfo_t *ci, int argc, char **argv);

extern void report_io_times(const char *verb, struct timeval *t2,
     long long offset, long long count,
     long long total, int ops, int compact);
# 8 "mmap.c" 2
# 1 "../include/input.h" 1
# 9 "../include/input.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pwd.h" 1 3 4
# 18 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pwd.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 238 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4

# 238 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned uid_t;




typedef unsigned gid_t;
# 313 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct _IO_FILE FILE;
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pwd.h" 2 3 4

struct passwd {
 char *pw_name;
 char *pw_passwd;
 uid_t pw_uid;
 gid_t pw_gid;
 char *pw_gecos;
 char *pw_dir;
 char *pw_shell;
};


void setpwent (void);
void endpwent (void);
struct passwd *getpwent (void);


struct passwd *getpwuid (uid_t);
struct passwd *getpwnam (const char *);
int getpwuid_r (uid_t, struct passwd *, char *, size_t, struct passwd **);
int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **);


struct passwd *fgetpwent(FILE *);
int putpwent(const struct passwd *, FILE *);
# 10 "../include/input.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/grp.h" 1 3 4
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/grp.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 18 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/grp.h" 2 3 4

struct group {
 char *gr_name;
 char *gr_passwd;
 gid_t gr_gid;
 char **gr_mem;
};

struct group *getgrgid(gid_t);
struct group *getgrnam(const char *);

int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);


struct group *getgrent(void);
void endgrent(void);
void setgrent(void);



struct group *fgetgrent(FILE *);
int putgrent(const struct group *, FILE *);



int getgrouplist(const char *, gid_t, gid_t *, int *);
int setgroups(size_t, const gid_t *);
int initgroups(const char *, gid_t);
# 11 "../include/input.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/types.h" 1 3 4
# 57 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/types.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 58 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int ssize_t;
# 73 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int register_t;
# 89 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef signed char int8_t;




typedef signed short int16_t;




typedef signed int int32_t;




typedef signed long long int64_t;
# 134 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned long long u_int64_t;
# 145 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned mode_t;




typedef unsigned int nlink_t;




typedef long long off_t;




typedef unsigned long long ino_t;




typedef unsigned long long dev_t;




typedef long blksize_t;




typedef long long blkcnt_t;




typedef unsigned long long fsblkcnt_t;




typedef unsigned long long fsfilcnt_t;
# 202 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef void * timer_t;




typedef int clockid_t;




typedef long clock_t;
# 228 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int pid_t;




typedef unsigned id_t;
# 248 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int key_t;




typedef unsigned useconds_t;
# 266 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct __pthread * pthread_t;





typedef int pthread_once_t;




typedef unsigned pthread_key_t;




typedef int pthread_spinlock_t;




typedef struct { unsigned __attr; } pthread_mutexattr_t;




typedef struct { unsigned __attr; } pthread_condattr_t;




typedef struct { unsigned __attr; } pthread_barrierattr_t;




typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t;
# 371 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;




typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
# 386 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
# 396 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;




typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
# 58 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/types.h" 2 3 4


typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned u_int32_t;
typedef char *caddr_t;
typedef unsigned char u_char;
typedef unsigned short u_short, ushort;
typedef unsigned u_int, uint;
typedef unsigned long u_long, ulong;
typedef long long quad_t;
typedef unsigned long long u_quad_t;
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/endian.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/endian.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 119 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned short uint16_t;




typedef unsigned int uint32_t;




typedef unsigned long long uint64_t;
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/endian.h" 2 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/endian.h" 3 4
static inline uint16_t __bswap16(uint16_t __x)
{
 return __x<<8 | __x>>8;
}

static inline uint32_t __bswap32(uint32_t __x)
{
 return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
}

static inline uint64_t __bswap64(uint64_t __x)
{
 return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
}
# 71 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/types.h" 2 3 4
# 12 "../include/input.h" 2
# 1 "../libfrog/projects.h" 1
# 9 "../libfrog/projects.h"
# 1 "../include/platform_defs.h" 1
# 10 "../include/platform_defs.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdio.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdio.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 319 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef __builtin_va_list va_list;




typedef __builtin_va_list __isoc_va_list;
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdio.h" 2 3 4
# 56 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdio.h" 3 4
typedef union _G_fpos64_t {
 char __opaque[16];
 long long __lldata;
 double __align;
} fpos_t;

extern FILE *const stdin;
extern FILE *const stdout;
extern FILE *const stderr;





FILE *fopen(const char *restrict, const char *restrict);
FILE *freopen(const char *restrict, const char *restrict, FILE *restrict);
int fclose(FILE *);

int remove(const char *);
int rename(const char *, const char *);

int feof(FILE *);
int ferror(FILE *);
int fflush(FILE *);
void clearerr(FILE *);

int fseek(FILE *, long, int);
long ftell(FILE *);
void rewind(FILE *);

int fgetpos(FILE *restrict, fpos_t *restrict);
int fsetpos(FILE *, const fpos_t *);

size_t fread(void *restrict, size_t, size_t, FILE *restrict);
size_t fwrite(const void *restrict, size_t, size_t, FILE *restrict);

int fgetc(FILE *);
int getc(FILE *);
int getchar(void);
int ungetc(int, FILE *);

int fputc(int, FILE *);
int putc(int, FILE *);
int putchar(int);

char *fgets(char *restrict, int, FILE *restrict);




int fputs(const char *restrict, FILE *restrict);
int puts(const char *);

int printf(const char *restrict, ...);
int fprintf(FILE *restrict, const char *restrict, ...);
int sprintf(char *restrict, const char *restrict, ...);
int snprintf(char *restrict, size_t, const char *restrict, ...);

int vprintf(const char *restrict, __isoc_va_list);
int vfprintf(FILE *restrict, const char *restrict, __isoc_va_list);
int vsprintf(char *restrict, const char *restrict, __isoc_va_list);
int vsnprintf(char *restrict, size_t, const char *restrict, __isoc_va_list);

int scanf(const char *restrict, ...);
int fscanf(FILE *restrict, const char *restrict, ...);
int sscanf(const char *restrict, const char *restrict, ...);
int vscanf(const char *restrict, __isoc_va_list);
int vfscanf(FILE *restrict, const char *restrict, __isoc_va_list);
int vsscanf(const char *restrict, const char *restrict, __isoc_va_list);

void perror(const char *);

int setvbuf(FILE *restrict, char *restrict, int, size_t);
void setbuf(FILE *restrict, char *restrict);

char *tmpnam(char *);
FILE *tmpfile(void);




FILE *fmemopen(void *restrict, size_t, const char *restrict);
FILE *open_memstream(char **, size_t *);
FILE *fdopen(int, const char *);
FILE *popen(const char *, const char *);
int pclose(FILE *);
int fileno(FILE *);
int fseeko(FILE *, off_t, int);
off_t ftello(FILE *);
int dprintf(int, const char *restrict, ...);
int vdprintf(int, const char *restrict, __isoc_va_list);
void flockfile(FILE *);
int ftrylockfile(FILE *);
void funlockfile(FILE *);
int getc_unlocked(FILE *);
int getchar_unlocked(void);
int putc_unlocked(int, FILE *);
int putchar_unlocked(int);
ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict);
ssize_t getline(char **restrict, size_t *restrict, FILE *restrict);
int renameat(int, const char *, int, const char *);
char *ctermid(char *);







char *tempnam(const char *, const char *);




char *cuserid(char *);
void setlinebuf(FILE *);
void setbuffer(FILE *, char *, size_t);
int fgetc_unlocked(FILE *);
int fputc_unlocked(int, FILE *);
int fflush_unlocked(FILE *);
size_t fread_unlocked(void *, size_t, size_t, FILE *);
size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
void clearerr_unlocked(FILE *);
int feof_unlocked(FILE *);
int ferror_unlocked(FILE *);
int fileno_unlocked(FILE *);
int getw(FILE *);
int putw(int, FILE *);
char *fgetln(FILE *, size_t *);
int asprintf(char **, const char *, ...);
int vasprintf(char **, const char *, __isoc_va_list);



char *fgets_unlocked(char *, int, FILE *);
int fputs_unlocked(const char *, FILE *);

typedef ssize_t (cookie_read_function_t)(void *, char *, size_t);
typedef ssize_t (cookie_write_function_t)(void *, const char *, size_t);
typedef int (cookie_seek_function_t)(void *, off_t *, int);
typedef int (cookie_close_function_t)(void *);

typedef struct _IO_cookie_io_functions_t {
 cookie_read_function_t *read;
 cookie_write_function_t *write;
 cookie_seek_function_t *seek;
 cookie_close_function_t *close;
} cookie_io_functions_t;

FILE *fopencookie(void *, const char *, cookie_io_functions_t);
# 11 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/errno.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/errno.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/errno.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/errno.h" 2 3 4


__attribute__((const))

int *__errno_location(void);



extern char *program_invocation_short_name, *program_invocation_name;
# 12 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 1 3 4
# 20 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 348 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
struct iovec { void *iov_base; size_t iov_len; };
# 21 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/fcntl.h" 1 3 4
# 23 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 2 3 4

struct flock {
 short l_type;
 short l_whence;
 off_t l_start;
 off_t l_len;
 pid_t l_pid;
};

int creat(const char *, mode_t);
int fcntl(int, int, ...);
int open(const char *, int, ...);
int openat(int, const char *, int, ...);
int posix_fadvise(int, off_t, off_t, int);
int posix_fallocate(int, off_t, off_t);
# 159 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 3 4
int lockf(int, int, off_t);







struct file_handle {
 unsigned handle_bytes;
 int handle_type;
 unsigned char f_handle[];
};
struct f_owner_ex {
 int type;
 pid_t pid;
};
# 186 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/fcntl.h" 3 4
int fallocate(int, int, off_t, off_t);

int name_to_handle_at(int, const char *, struct file_handle *, int *, int);
int open_by_handle_at(int, struct file_handle *, int);
ssize_t readahead(int, off_t, size_t);
int sync_file_range(int, off_t, off_t, unsigned);
ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
ssize_t splice(int, off_t *, int, off_t *, size_t, unsigned);
ssize_t tee(int, int, size_t, unsigned);
# 13 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdarg.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdarg.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdarg.h" 2 3 4
# 14 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 3 4
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
# 15 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stddef.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stddef.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 16 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int wchar_t;
# 34 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct { long long __ll; long double __ld; } max_align_t;
# 53 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int ptrdiff_t;
# 20 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stddef.h" 2 3 4
# 16 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdlib.h" 1 3 4
# 21 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdlib.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 22 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdlib.h" 2 3 4

int atoi (const char *);
long atol (const char *);
long long atoll (const char *);
double atof (const char *);

float strtof (const char *restrict, char **restrict);
double strtod (const char *restrict, char **restrict);
long double strtold (const char *restrict, char **restrict);

long strtol (const char *restrict, char **restrict, int);
unsigned long strtoul (const char *restrict, char **restrict, int);
long long strtoll (const char *restrict, char **restrict, int);
unsigned long long strtoull (const char *restrict, char **restrict, int);

int rand (void);
void srand (unsigned);

void *malloc (size_t);
void *calloc (size_t, size_t);
void *realloc (void *, size_t);
void free (void *);
void *aligned_alloc(size_t, size_t);

_Noreturn void abort (void);
int atexit (void (*) (void));
_Noreturn void exit (int);
_Noreturn void _Exit (int);
int at_quick_exit (void (*) (void));
_Noreturn void quick_exit (int);

char *getenv (const char *);

int system (const char *);

void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));

int abs (int);
long labs (long);
long long llabs (long long);

typedef struct { int quot, rem; } div_t;
typedef struct { long quot, rem; } ldiv_t;
typedef struct { long long quot, rem; } lldiv_t;

div_t div (int, int);
ldiv_t ldiv (long, long);
lldiv_t lldiv (long long, long long);

int mblen (const char *, size_t);
int mbtowc (wchar_t *restrict, const char *restrict, size_t);
int wctomb (char *, wchar_t);
size_t mbstowcs (wchar_t *restrict, const char *restrict, size_t);
size_t wcstombs (char *restrict, const wchar_t *restrict, size_t);




size_t __ctype_get_mb_cur_max(void);
# 101 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdlib.h" 3 4
int posix_memalign (void **, size_t, size_t);
int setenv (const char *, const char *, int);
int unsetenv (const char *);
int mkstemp (char *);
int mkostemp (char *, int);
char *mkdtemp (char *);
int getsubopt (char **, char *const *, char **);
int rand_r (unsigned *);






char *realpath (const char *restrict, char *restrict);
long int random (void);
void srandom (unsigned int);
char *initstate (unsigned int, char *, size_t);
char *setstate (char *);
int putenv (char *);
int posix_openpt (int);
int grantpt (int);
int unlockpt (int);
char *ptsname (int);
char *l64a (long);
long a64l (const char *);
void setkey (const char *);
double drand48 (void);
double erand48 (unsigned short [3]);
long int lrand48 (void);
long int nrand48 (unsigned short [3]);
long mrand48 (void);
long jrand48 (unsigned short [3]);
void srand48 (long);
unsigned short *seed48 (unsigned short [3]);
void lcong48 (unsigned short [7]);



# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/alloca.h" 1 3 4
# 9 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/alloca.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/alloca.h" 2 3 4

void *alloca(size_t);
# 141 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdlib.h" 2 3 4
char *mktemp (char *);
int mkstemps (char *, int);
int mkostemps (char *, int, int);
void *valloc (size_t);
void *memalign(size_t, size_t);
int getloadavg(double *, int);
int clearenv(void);


void *reallocarray (void *, size_t, size_t);
void qsort_r (void *, size_t, size_t, int (*)(const void *, const void *, void *), void *);



int ptsname_r(int, char *, size_t);
char *ecvt(double, int, int *, int *);
char *fcvt(double, int, int *, int *);
char *gcvt(double, int, char *);
char *secure_getenv(const char *);
struct __locale_struct;
float strtof_l(const char *restrict, char **restrict, struct __locale_struct *);
double strtod_l(const char *restrict, char **restrict, struct __locale_struct *);
long double strtold_l(const char *restrict, char **restrict, struct __locale_struct *);
# 17 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/string.h" 1 3 4
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/string.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 336 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef struct __locale_struct * locale_t;
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/string.h" 2 3 4

void *memcpy (void *restrict, const void *restrict, size_t);
void *memmove (void *, const void *, size_t);
void *memset (void *, int, size_t);
int memcmp (const void *, const void *, size_t);
void *memchr (const void *, int, size_t);

char *strcpy (char *restrict, const char *restrict);
char *strncpy (char *restrict, const char *restrict, size_t);

char *strcat (char *restrict, const char *restrict);
char *strncat (char *restrict, const char *restrict, size_t);

int strcmp (const char *, const char *);
int strncmp (const char *, const char *, size_t);

int strcoll (const char *, const char *);
size_t strxfrm (char *restrict, const char *restrict, size_t);

char *strchr (const char *, int);
char *strrchr (const char *, int);

size_t strcspn (const char *, const char *);
size_t strspn (const char *, const char *);
char *strpbrk (const char *, const char *);
char *strstr (const char *, const char *);
char *strtok (char *restrict, const char *restrict);

size_t strlen (const char *);

char *strerror (int);


# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/strings.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/strings.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 12 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/strings.h" 2 3 4




int bcmp (const void *, const void *, size_t);
void bcopy (const void *, void *, size_t);
void bzero (void *, size_t);
char *index (const char *, int);
char *rindex (const char *, int);



int ffs (int);
int ffsl (long);
int ffsll (long long);


int strcasecmp (const char *, const char *);
int strncasecmp (const char *, const char *, size_t);

int strcasecmp_l (const char *, const char *, locale_t);
int strncasecmp_l (const char *, const char *, size_t, locale_t);
# 60 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/string.h" 2 3 4





char *strtok_r (char *restrict, const char *restrict, char **restrict);
int strerror_r (int, char *, size_t);
char *stpcpy(char *restrict, const char *restrict);
char *stpncpy(char *restrict, const char *restrict, size_t);
size_t strnlen (const char *, size_t);
char *strdup (const char *);
char *strndup (const char *, size_t);
char *strsignal(int);
char *strerror_l (int, locale_t);
int strcoll_l (const char *, const char *, locale_t);
size_t strxfrm_l (char *restrict, const char *restrict, size_t, locale_t);




void *memccpy (void *restrict, const void *restrict, int, size_t);



char *strsep(char **, const char *);
size_t strlcat (char *, const char *, size_t);
size_t strlcpy (char *, const char *, size_t);
void explicit_bzero (void *, size_t);




int strverscmp (const char *, const char *);
char *strchrnul(const char *, int);
char *strcasestr(const char *, const char *);
void *memmem(const void *, size_t, const void *, size_t);
void *memrchr(const void *, int, size_t);
void *mempcpy(void *, const void *, size_t);

char *basename();
# 18 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdint.h" 1 3 4
# 20 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdint.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 48 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned int uintptr_t;
# 63 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef int intptr_t;
# 109 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef signed long long intmax_t;




typedef unsigned char uint8_t;
# 139 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
typedef unsigned long long uintmax_t;
# 21 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdint.h" 2 3 4

typedef int8_t int_fast8_t;
typedef int64_t int_fast64_t;

typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;

typedef uint8_t uint_fast8_t;
typedef uint64_t uint_fast64_t;

typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
# 95 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdint.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/stdint.h" 1 3 4
typedef int32_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef uint32_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
# 96 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdint.h" 2 3 4
# 19 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/unistd.h" 1 3 4
# 37 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/unistd.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 38 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/unistd.h" 2 3 4

int pipe(int [2]);
int pipe2(int [2], int);
int close(int);
int posix_close(int, int);
int dup(int);
int dup2(int, int);
int dup3(int, int, int);
off_t lseek(int, off_t, int);
int fsync(int);
int fdatasync(int);

ssize_t read(int, void *, size_t);
ssize_t write(int, const void *, size_t);
ssize_t pread(int, void *, size_t, off_t);
ssize_t pwrite(int, const void *, size_t, off_t);

int chown(const char *, uid_t, gid_t);
int fchown(int, uid_t, gid_t);
int lchown(const char *, uid_t, gid_t);
int fchownat(int, const char *, uid_t, gid_t, int);

int link(const char *, const char *);
int linkat(int, const char *, int, const char *, int);
int symlink(const char *, const char *);
int symlinkat(const char *, int, const char *);
ssize_t readlink(const char *restrict, char *restrict, size_t);
ssize_t readlinkat(int, const char *restrict, char *restrict, size_t);
int unlink(const char *);
int unlinkat(int, const char *, int);
int rmdir(const char *);
int truncate(const char *, off_t);
int ftruncate(int, off_t);






int access(const char *, int);
int faccessat(int, const char *, int, int);

int chdir(const char *);
int fchdir(int);
char *getcwd(char *, size_t);

unsigned alarm(unsigned);
unsigned sleep(unsigned);
int pause(void);

pid_t fork(void);
pid_t _Fork(void);
int execve(const char *, char *const [], char *const []);
int execv(const char *, char *const []);
int execle(const char *, const char *, ...);
int execl(const char *, const char *, ...);
int execvp(const char *, char *const []);
int execlp(const char *, const char *, ...);
int fexecve(int, char *const [], char *const []);
_Noreturn void _exit(int);

pid_t getpid(void);
pid_t getppid(void);
pid_t getpgrp(void);
pid_t getpgid(pid_t);
int setpgid(pid_t, pid_t);
pid_t setsid(void);
pid_t getsid(pid_t);
char *ttyname(int);
int ttyname_r(int, char *, size_t);
int isatty(int);
pid_t tcgetpgrp(int);
int tcsetpgrp(int, pid_t);

uid_t getuid(void);
uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
int getgroups(int, gid_t []);
int setuid(uid_t);
int seteuid(uid_t);
int setgid(gid_t);
int setegid(gid_t);

char *getlogin(void);
int getlogin_r(char *, size_t);
int gethostname(char *, size_t);
char *ctermid(char *);

int getopt(int, char * const [], const char *);
extern char *optarg;
extern int optind, opterr, optopt;

long pathconf(const char *, int);
long fpathconf(int, int);
long sysconf(int);
size_t confstr(int, char *, size_t);






int setreuid(uid_t, uid_t);
int setregid(gid_t, gid_t);
int lockf(int, int, off_t);
long gethostid(void);
int nice(int);
void sync(void);
pid_t setpgrp(void);
char *crypt(const char *, const char *);
void encrypt(char *, int);
void swab(const void *restrict, void *restrict, ssize_t);




int usleep(unsigned);
unsigned ualarm(unsigned, unsigned);






int brk(void *);
void *sbrk(intptr_t);
pid_t vfork(void);
int vhangup(void);
int chroot(const char *);
int getpagesize(void);
int getdtablesize(void);
int sethostname(const char *, size_t);
int getdomainname(char *, size_t);
int setdomainname(const char *, size_t);
int setgroups(size_t, const gid_t *);
char *getpass(const char *);
int daemon(int, int);
void setusershell(void);
void endusershell(void);
char *getusershell(void);
int acct(const char *);
long syscall(long, ...);
int execvpe(const char *, char *const [], char *const []);
int issetugid(void);
int getentropy(void *, size_t);
extern int optreset;



extern char **environ;
int setresuid(uid_t, uid_t, uid_t);
int setresgid(gid_t, gid_t, gid_t);
int getresuid(uid_t *, uid_t *, uid_t *);
int getresgid(gid_t *, gid_t *, gid_t *);
char *get_current_dir_name(void);
int syncfs(int);
int euidaccess(const char *, int);
int eaccess(const char *, int);
ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
pid_t gettid(void);
# 260 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/unistd.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/posix.h" 1 3 4
# 261 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/unistd.h" 2 3 4
# 20 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 1 3 4
# 28 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 1 3 4
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 18 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 2 3 4

struct sched_param {
 int sched_priority;
 int __reserved1;

 long __reserved2[4];






 int __reserved3;
};

int sched_get_priority_max(int);
int sched_get_priority_min(int);
int sched_getparam(pid_t, struct sched_param *);
int sched_getscheduler(pid_t);
int sched_rr_get_interval(pid_t, struct timespec *);
int sched_setparam(pid_t, const struct sched_param *);
int sched_setscheduler(pid_t, int, const struct sched_param *);
int sched_yield(void);
# 77 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 3 4
int clone (int (*)(void *), void *, int, void *, ...);
int unshare(int);
int setns(int, int);

void *memcpy(void *restrict, const void *restrict, size_t);
int memcmp(const void *, const void *, size_t);
void *memset (void *, int, size_t);
void *calloc(size_t, size_t);
void free(void *);

typedef struct cpu_set_t { unsigned long __bits[128/sizeof(long)]; } cpu_set_t;
int __sched_cpucount(size_t, const cpu_set_t *);
int sched_getcpu(void);
int sched_getaffinity(pid_t, size_t, cpu_set_t *);
int sched_setaffinity(pid_t, size_t, const cpu_set_t *);
# 110 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 3 4
static inline void __CPU_AND_S(size_t __size, cpu_set_t *__dest, const cpu_set_t *__src1, const cpu_set_t *__src2) { size_t __i; for (__i=0; __i<__size/sizeof(long); __i++) ((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] & ((unsigned long *)__src2)[__i] ; }
static inline void __CPU_OR_S(size_t __size, cpu_set_t *__dest, const cpu_set_t *__src1, const cpu_set_t *__src2) { size_t __i; for (__i=0; __i<__size/sizeof(long); __i++) ((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] | ((unsigned long *)__src2)[__i] ; }
static inline void __CPU_XOR_S(size_t __size, cpu_set_t *__dest, const cpu_set_t *__src1, const cpu_set_t *__src2) { size_t __i; for (__i=0; __i<__size/sizeof(long); __i++) ((unsigned long *)__dest)[__i] = ((unsigned long *)__src1)[__i] ^ ((unsigned long *)__src2)[__i] ; }
# 142 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sched.h" 3 4
__typeof__(sched_rr_get_interval) sched_rr_get_interval __asm__("__sched_rr_get_interval_time64");
# 31 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/time.h" 1 3 4
# 33 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/time.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 34 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/time.h" 2 3 4






struct tm {
 int tm_sec;
 int tm_min;
 int tm_hour;
 int tm_mday;
 int tm_mon;
 int tm_year;
 int tm_wday;
 int tm_yday;
 int tm_isdst;
 long tm_gmtoff;
 const char *tm_zone;
};

clock_t clock (void);
time_t time (time_t *);
double difftime (time_t, time_t);
time_t mktime (struct tm *);
size_t strftime (char *restrict, size_t, const char *restrict, const struct tm *restrict);
struct tm *gmtime (const time_t *);
struct tm *localtime (const time_t *);
char *asctime (const struct tm *);
char *ctime (const time_t *);
int timespec_get(struct timespec *, int);
# 73 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/time.h" 3 4
size_t strftime_l (char * restrict, size_t, const char * restrict, const struct tm * restrict, locale_t);

struct tm *gmtime_r (const time_t *restrict, struct tm *restrict);
struct tm *localtime_r (const time_t *restrict, struct tm *restrict);
char *asctime_r (const struct tm *restrict, char *restrict);
char *ctime_r (const time_t *, char *);

void tzset (void);

struct itimerspec {
 struct timespec it_interval;
 struct timespec it_value;
};
# 102 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/time.h" 3 4
int nanosleep (const struct timespec *, struct timespec *);
int clock_getres (clockid_t, struct timespec *);
int clock_gettime (clockid_t, struct timespec *);
int clock_settime (clockid_t, const struct timespec *);
int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *);
int clock_getcpuclockid (pid_t, clockid_t *);

struct sigevent;
int timer_create (clockid_t, struct sigevent *restrict, timer_t *restrict);
int timer_delete (timer_t);
int timer_settime (timer_t, int, const struct itimerspec *restrict, struct itimerspec *restrict);
int timer_gettime (timer_t, struct itimerspec *);
int timer_getoverrun (timer_t);

extern char *tzname[2];





char *strptime (const char *restrict, const char *restrict, struct tm *restrict);
extern int daylight;
extern long timezone;
extern int getdate_err;
struct tm *getdate (const char *);




int stime(const time_t *);
time_t timegm(struct tm *);



__typeof__(time) time __asm__("__time64");
__typeof__(difftime) difftime __asm__("__difftime64");
__typeof__(mktime) mktime __asm__("__mktime64");
__typeof__(gmtime) gmtime __asm__("__gmtime64");
__typeof__(localtime) localtime __asm__("__localtime64");
__typeof__(ctime) ctime __asm__("__ctime64");
__typeof__(timespec_get) timespec_get __asm__("__timespec_get_time64");



__typeof__(gmtime_r) gmtime_r __asm__("__gmtime64_r");
__typeof__(localtime_r) localtime_r __asm__("__localtime64_r");
__typeof__(ctime_r) ctime_r __asm__("__ctime64_r");
__typeof__(nanosleep) nanosleep __asm__("__nanosleep_time64");
__typeof__(clock_getres) clock_getres __asm__("__clock_getres_time64");
__typeof__(clock_gettime) clock_gettime __asm__("__clock_gettime64");
__typeof__(clock_settime) clock_settime __asm__("__clock_settime64");
__typeof__(clock_nanosleep) clock_nanosleep __asm__("__clock_nanosleep_time64");
__typeof__(timer_settime) timer_settime __asm__("__timer_settime64");
__typeof__(timer_gettime) timer_gettime __asm__("__timer_gettime64");


__typeof__(stime) stime __asm__("__stime64");
__typeof__(timegm) timegm __asm__("__timegm_time64");
# 32 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 2 3 4
# 80 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/pthread.h" 3 4
int pthread_create(pthread_t *restrict, const pthread_attr_t *restrict, void *(*)(void *), void *restrict);
int pthread_detach(pthread_t);
_Noreturn void pthread_exit(void *);
int pthread_join(pthread_t, void **);


__attribute__((const))

pthread_t pthread_self(void);

int pthread_equal(pthread_t, pthread_t);




int pthread_setcancelstate(int, int *);
int pthread_setcanceltype(int, int *);
void pthread_testcancel(void);
int pthread_cancel(pthread_t);

int pthread_getschedparam(pthread_t, int *restrict, struct sched_param *restrict);
int pthread_setschedparam(pthread_t, int, const struct sched_param *);
int pthread_setschedprio(pthread_t, int);

int pthread_once(pthread_once_t *, void (*)(void));

int pthread_mutex_init(pthread_mutex_t *restrict, const pthread_mutexattr_t *restrict);
int pthread_mutex_lock(pthread_mutex_t *);
int pthread_mutex_unlock(pthread_mutex_t *);
int pthread_mutex_trylock(pthread_mutex_t *);
int pthread_mutex_timedlock(pthread_mutex_t *restrict, const struct timespec *restrict);
int pthread_mutex_destroy(pthread_mutex_t *);
int pthread_mutex_consistent(pthread_mutex_t *);

int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict, int *restrict);
int pthread_mutex_setprioceiling(pthread_mutex_t *restrict, int, int *restrict);

int pthread_cond_init(pthread_cond_t *restrict, const pthread_condattr_t *restrict);
int pthread_cond_destroy(pthread_cond_t *);
int pthread_cond_wait(pthread_cond_t *restrict, pthread_mutex_t *restrict);
int pthread_cond_timedwait(pthread_cond_t *restrict, pthread_mutex_t *restrict, const struct timespec *restrict);
int pthread_cond_broadcast(pthread_cond_t *);
int pthread_cond_signal(pthread_cond_t *);

int pthread_rwlock_init(pthread_rwlock_t *restrict, const pthread_rwlockattr_t *restrict);
int pthread_rwlock_destroy(pthread_rwlock_t *);
int pthread_rwlock_rdlock(pthread_rwlock_t *);
int pthread_rwlock_tryrdlock(pthread_rwlock_t *);
int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict, const struct timespec *restrict);
int pthread_rwlock_wrlock(pthread_rwlock_t *);
int pthread_rwlock_trywrlock(pthread_rwlock_t *);
int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict, const struct timespec *restrict);
int pthread_rwlock_unlock(pthread_rwlock_t *);

int pthread_spin_init(pthread_spinlock_t *, int);
int pthread_spin_destroy(pthread_spinlock_t *);
int pthread_spin_lock(pthread_spinlock_t *);
int pthread_spin_trylock(pthread_spinlock_t *);
int pthread_spin_unlock(pthread_spinlock_t *);

int pthread_barrier_init(pthread_barrier_t *restrict, const pthread_barrierattr_t *restrict, unsigned);
int pthread_barrier_destroy(pthread_barrier_t *);
int pthread_barrier_wait(pthread_barrier_t *);

int pthread_key_create(pthread_key_t *, void (*)(void *));
int pthread_key_delete(pthread_key_t);
void *pthread_getspecific(pthread_key_t);
int pthread_setspecific(pthread_key_t, const void *);

int pthread_attr_init(pthread_attr_t *);
int pthread_attr_destroy(pthread_attr_t *);

int pthread_attr_getguardsize(const pthread_attr_t *restrict, size_t *restrict);
int pthread_attr_setguardsize(pthread_attr_t *, size_t);
int pthread_attr_getstacksize(const pthread_attr_t *restrict, size_t *restrict);
int pthread_attr_setstacksize(pthread_attr_t *, size_t);
int pthread_attr_getdetachstate(const pthread_attr_t *, int *);
int pthread_attr_setdetachstate(pthread_attr_t *, int);
int pthread_attr_getstack(const pthread_attr_t *restrict, void **restrict, size_t *restrict);
int pthread_attr_setstack(pthread_attr_t *, void *, size_t);
int pthread_attr_getscope(const pthread_attr_t *restrict, int *restrict);
int pthread_attr_setscope(pthread_attr_t *, int);
int pthread_attr_getschedpolicy(const pthread_attr_t *restrict, int *restrict);
int pthread_attr_setschedpolicy(pthread_attr_t *, int);
int pthread_attr_getschedparam(const pthread_attr_t *restrict, struct sched_param *restrict);
int pthread_attr_setschedparam(pthread_attr_t *restrict, const struct sched_param *restrict);
int pthread_attr_getinheritsched(const pthread_attr_t *restrict, int *restrict);
int pthread_attr_setinheritsched(pthread_attr_t *, int);

int pthread_mutexattr_destroy(pthread_mutexattr_t *);
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict, int *restrict);
int pthread_mutexattr_init(pthread_mutexattr_t *);
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int);
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int);
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int);
int pthread_mutexattr_setrobust(pthread_mutexattr_t *, int);
int pthread_mutexattr_settype(pthread_mutexattr_t *, int);

int pthread_condattr_init(pthread_condattr_t *);
int pthread_condattr_destroy(pthread_condattr_t *);
int pthread_condattr_setclock(pthread_condattr_t *, clockid_t);
int pthread_condattr_setpshared(pthread_condattr_t *, int);
int pthread_condattr_getclock(const pthread_condattr_t *restrict, clockid_t *restrict);
int pthread_condattr_getpshared(const pthread_condattr_t *restrict, int *restrict);

int pthread_rwlockattr_init(pthread_rwlockattr_t *);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict, int *restrict);

int pthread_barrierattr_destroy(pthread_barrierattr_t *);
int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict, int *restrict);
int pthread_barrierattr_init(pthread_barrierattr_t *);
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int);

int pthread_atfork(void (*)(void), void (*)(void), void (*)(void));

int pthread_getconcurrency(void);
int pthread_setconcurrency(int);

int pthread_getcpuclockid(pthread_t, clockid_t *);

struct __ptcb {
 void (*__f)(void *);
 void *__x;
 struct __ptcb *__next;
};

void _pthread_cleanup_push(struct __ptcb *, void (*)(void *), void *);
void _pthread_cleanup_pop(struct __ptcb *, int);





struct cpu_set_t;
int pthread_getaffinity_np(pthread_t, size_t, struct cpu_set_t *);
int pthread_setaffinity_np(pthread_t, size_t, const struct cpu_set_t *);
int pthread_getattr_np(pthread_t, pthread_attr_t *);
int pthread_setname_np(pthread_t, const char *);
int pthread_getname_np(pthread_t, char *, size_t);
int pthread_getattr_default_np(pthread_attr_t *);
int pthread_setattr_default_np(const pthread_attr_t *);
int pthread_tryjoin_np(pthread_t, void **);
int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);



__typeof__(pthread_mutex_timedlock) pthread_mutex_timedlock __asm__("__pthread_mutex_timedlock_time64");
__typeof__(pthread_cond_timedwait) pthread_cond_timedwait __asm__("__pthread_cond_timedwait_time64");
__typeof__(pthread_rwlock_timedrdlock) pthread_rwlock_timedrdlock __asm__("__pthread_rwlock_timedrdlock_time64");
__typeof__(pthread_rwlock_timedwrlock) pthread_rwlock_timedwrlock __asm__("__pthread_rwlock_timedwrlock_time64");

__typeof__(pthread_timedjoin_np) pthread_timedjoin_np __asm__("__pthread_timedjoin_np_time64");
# 21 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ctype.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ctype.h" 3 4
int isalnum(int);
int isalpha(int);
int isblank(int);
int iscntrl(int);
int isdigit(int);
int isgraph(int);
int islower(int);
int isprint(int);
int ispunct(int);
int isspace(int);
int isupper(int);
int isxdigit(int);
int tolower(int);
int toupper(int);


static inline int __isspace(int _c)
{
 return _c == ' ' || (unsigned)_c-'\t' < 5;
}
# 46 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ctype.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 47 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ctype.h" 2 3 4

int isalnum_l(int, locale_t);
int isalpha_l(int, locale_t);
int isblank_l(int, locale_t);
int iscntrl_l(int, locale_t);
int isdigit_l(int, locale_t);
int isgraph_l(int, locale_t);
int islower_l(int, locale_t);
int isprint_l(int, locale_t);
int ispunct_l(int, locale_t);
int isspace_l(int, locale_t);
int isupper_l(int, locale_t);
int isxdigit_l(int, locale_t);
int tolower_l(int, locale_t);
int toupper_l(int, locale_t);

int isascii(int);
int toascii(int);
# 22 "../include/platform_defs.h" 2

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/param.h" 1 3 4
# 31 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/param.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/resource.h" 1 3 4
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/resource.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 18 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/resource.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/resource.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/resource.h" 2 3 4

typedef unsigned long long rlim_t;

struct rlimit {
 rlim_t rlim_cur;
 rlim_t rlim_max;
};

struct rusage {
 struct timeval ru_utime;
 struct timeval ru_stime;

 long ru_maxrss;
 long ru_ixrss;
 long ru_idrss;
 long ru_isrss;
 long ru_minflt;
 long ru_majflt;
 long ru_nswap;
 long ru_inblock;
 long ru_oublock;
 long ru_msgsnd;
 long ru_msgrcv;
 long ru_nsignals;
 long ru_nvcsw;
 long ru_nivcsw;

 long __reserved[16];
};

int getrlimit (int, struct rlimit *);
int setrlimit (int, const struct rlimit *);
int getrusage (int, struct rusage *);

int getpriority (int, id_t);
int setpriority (int, id_t, int);


int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
# 109 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/resource.h" 3 4
__typeof__(getrusage) getrusage __asm__("__getrusage_time64");
# 32 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/param.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/limits.h" 1 3 4





# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 7 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/limits.h" 2 3 4
# 40 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/limits.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/limits.h" 1 3 4
# 41 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/limits.h" 2 3 4
# 34 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/param.h" 2 3 4
# 24 "../include/platform_defs.h" 2

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/stdbool.h" 1 3 4
# 26 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/libgen.h" 1 3 4







char *dirname(char *);
char *basename(char *);
# 27 "../include/platform_defs.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu.h" 1 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu.h" 1 3 4
# 39 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 1 3 4
# 41 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 1 3 4
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/compiler.h" 1 3 4
# 30 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch.h" 1 3 4
# 138 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/syscall-compat.h" 1 3 4
# 33 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/syscall-compat.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/syscall.h" 1 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/syscall.h" 1 3 4



# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/syscall.h" 1 3 4
# 5 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/syscall.h" 2 3 4
# 2 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/syscall.h" 2 3 4
# 34 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/syscall-compat.h" 2 3 4
# 28 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 2 3 4
# 43 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/generic.h" 1 3 4
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/generic.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/generic.h" 2 3 4
# 186 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/generic.h" 3 4
typedef uint64_t caa_cycles_t;

static inline caa_cycles_t caa_get_cycles (void)
{
 struct timespec ts;

 if (__builtin_expect(!!(clock_gettime(1, &ts)), 0))
  return -1ULL;
 return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
}
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch/mips.h" 2 3 4
# 139 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/arch.h" 2 3 4
# 31 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic.h" 1 3 4
# 43 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/mips.h" 1 3 4
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/mips.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/system.h" 1 3 4
# 30 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/mips.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 1 3 4
# 56 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
extern void _uatomic_link_error(void);





static inline __attribute__((always_inline))
unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
         unsigned long _new, int len)
{
 switch (len) {
# 77 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 case 4:
  return __sync_val_compare_and_swap_4((uint32_t *) addr, old,
    _new);





 }
 _uatomic_link_error();
 return 0;
}
# 101 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
static inline __attribute__((always_inline))
void _uatomic_and(void *addr, unsigned long val,
    int len)
{
 switch (len) {
# 116 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 case 4:
  __sync_and_and_fetch_4((uint32_t *) addr, val);
  return;





 }
 _uatomic_link_error();
}
# 140 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
static inline __attribute__((always_inline))
void _uatomic_or(void *addr, unsigned long val,
   int len)
{
 switch (len) {
# 155 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 case 4:
  __sync_or_and_fetch_4((uint32_t *) addr, val);
  return;





 }
 _uatomic_link_error();
 return;
}
# 181 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
static inline __attribute__((always_inline))
unsigned long _uatomic_add_return(void *addr, unsigned long val,
     int len)
{
 switch (len) {
# 194 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 case 4:
  return __sync_add_and_fetch_4((uint32_t *) addr, val);




 }
 _uatomic_link_error();
 return 0;
}
# 215 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
static inline __attribute__((always_inline))
unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
{
 switch (len) {
# 245 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 case 4:
 {
  uint32_t old;

  do {
   old = __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(*((uint32_t *) addr)) *)&(*((uint32_t *) addr))); });
  } while (!__sync_bool_compare_and_swap_4((uint32_t *) addr,
    old, val));

  return old;
 }
# 269 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/generic.h" 3 4
 }
 _uatomic_link_error();
 return 0;
}
# 31 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic/mips.h" 2 3 4
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/uatomic.h" 2 3 4
# 32 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 2 3 4







# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/pointer.h" 1 3 4
# 40 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/pointer.h" 2 3 4
# 42 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4





# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/map/urcu-memb.h" 1 3 4
# 48 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4
# 59 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 1 3 4
# 37 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 38 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/list.h" 1 3 4
# 37 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/list.h" 3 4
struct cds_list_head {
 struct cds_list_head *next, *prev;
};
# 52 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/list.h" 3 4
static inline
void cds_list_add(struct cds_list_head *newp, struct cds_list_head *head)
{
 head->next->prev = newp;
 newp->next = head->next;
 newp->prev = head;
 head->next = newp;
}


static inline
void cds_list_add_tail(struct cds_list_head *newp, struct cds_list_head *head)
{
 head->prev->next = newp;
 newp->next = head;
 newp->prev = head->prev;
 head->prev = newp;
}


static inline
void __cds_list_del(struct cds_list_head *prev, struct cds_list_head *next)
{
 next->prev = prev;
 prev->next = next;
}


static inline
void cds_list_del(struct cds_list_head *elem)
{
 __cds_list_del(elem->prev, elem->next);
}


static inline
void cds_list_del_init(struct cds_list_head *elem)
{
 cds_list_del(elem);
 (elem)->next = (elem)->prev = (elem);
}


static inline
void cds_list_move(struct cds_list_head *elem, struct cds_list_head *head)
{
 __cds_list_del(elem->prev, elem->next);
 cds_list_add(elem, head);
}


static inline
void cds_list_replace(struct cds_list_head *old, struct cds_list_head *_new)
{
 _new->next = old->next;
 _new->prev = old->prev;
 _new->prev->next = _new;
 _new->next->prev = _new;
}


static inline
void cds_list_splice(struct cds_list_head *add, struct cds_list_head *head)
{

 if (add != add->next) {
  add->next->prev = head;
  add->prev->next = head->next;
  head->next->prev = add->prev;
  head->next = add->next;
 }
}
# 184 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/list.h" 3 4
static inline
int cds_list_empty(struct cds_list_head *head)
{
 return head == head->next;
}

static inline
void cds_list_replace_init(struct cds_list_head *old,
  struct cds_list_head *_new)
{
 struct cds_list_head *head = old->next;

 cds_list_del(old);
 cds_list_add_tail(_new, head);
 (old)->next = (old)->prev = (old);
}
# 43 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 2 3 4
# 54 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 3 4
extern int compat_futex_noasync(int32_t *uaddr, int op, int32_t val,
  const struct timespec *timeout, int32_t *uaddr2, int32_t val3);
extern int compat_futex_async(int32_t *uaddr, int op, int32_t val,
  const struct timespec *timeout, int32_t *uaddr2, int32_t val3);
# 69 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 3 4
static inline int futex(int32_t *uaddr, int op, int32_t val,
  const struct timespec *timeout, int32_t *uaddr2, int32_t val3)
{
 return syscall(4238, uaddr, op, val, timeout,
   uaddr2, val3);
}

static inline int futex_noasync(int32_t *uaddr, int op, int32_t val,
  const struct timespec *timeout, int32_t *uaddr2, int32_t val3)
{
 int ret;

 ret = futex(uaddr, op, val, timeout, uaddr2, val3);
 if (__builtin_expect(!!(ret < 0 && (*__errno_location()) == 89), 0)) {
# 92 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/futex.h" 3 4
  return compat_futex_async(uaddr, op, val, timeout,
    uaddr2, val3);
 }
 return ret;

}

static inline int futex_async(int32_t *uaddr, int op, int32_t val,
  const struct timespec *timeout, int32_t *uaddr2, int32_t val3)
{
 int ret;

 ret = futex(uaddr, op, val, timeout, uaddr2, val3);
 if (__builtin_expect(!!(ret < 0 && (*__errno_location()) == 89), 0)) {
  return compat_futex_async(uaddr, op, val, timeout,
    uaddr2, val3);
 }
 return ret;
}
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/tls-compat.h" 1 3 4
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/tls-compat.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 28 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/tls-compat.h" 2 3 4
# 45 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/debug.h" 1 3 4
# 22 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/debug.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 3 4
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
# 23 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/debug.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/debug.h" 2 3 4
# 46 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-common.h" 1 3 4
# 37 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-common.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/config.h" 1 3 4
# 38 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-common.h" 2 3 4
# 51 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-common.h" 3 4
enum urcu_state {
 URCU_READER_ACTIVE_CURRENT,
 URCU_READER_ACTIVE_OLD,
 URCU_READER_INACTIVE,
};
# 67 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-common.h" 3 4
struct urcu_gp {







 unsigned long ctr;

 int32_t futex;
} __attribute__((aligned(64)));

struct urcu_reader {

 unsigned long ctr;
 char need_mb;

 struct cds_list_head node __attribute__((aligned(64)));
 pthread_t tid;

 unsigned int registered:1;
};




static inline void urcu_common_wake_up_gp(struct urcu_gp *gp)
{
 if (__builtin_expect(!!(__extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(*(&gp->futex)) *)&(*(&gp->futex))); }) == -1), 0)) {
  ((void) __extension__ ({ __typeof__(*(&gp->futex)) _v = __extension__ ({ (*(__volatile__ __typeof__(*(&gp->futex)) *)&(*(&gp->futex))) = ((0)); }); __asm__ __volatile__ ("" : : : "memory"); _v = _v; }));





  (void) futex_async(&gp->futex, 1, 1,
    ((void*)0), ((void*)0), 0);
 }
}

static inline enum urcu_state urcu_common_reader_state(struct urcu_gp *gp,
  unsigned long *ctr)
{
 unsigned long v;





 v = __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(*ctr) *)&(*ctr)); });
 if (!(v & ((1UL << (sizeof(unsigned long) << 2)) - 1)))
  return URCU_READER_INACTIVE;
 if (!((v ^ gp->ctr) & (1UL << (sizeof(unsigned long) << 2))))
  return URCU_READER_ACTIVE_CURRENT;
 return URCU_READER_ACTIVE_OLD;
}
# 47 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 2 3 4
# 72 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
extern int urcu_memb_has_sys_membarrier;


static inline void urcu_memb_smp_mb_slave(void)
{
 if (__builtin_expect(!!(urcu_memb_has_sys_membarrier), 1))
  __asm__ __volatile__ ("" : : : "memory");
 else
  __asm__ __volatile__ ( "	.set	mips2		\n" "	sync			\n" "	.set	mips0		\n" :::"memory");
}

extern struct urcu_gp urcu_memb_gp;

extern __thread struct urcu_reader urcu_memb_reader;
# 94 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
static inline void _urcu_memb_read_lock_update(unsigned long tmp)
{
 if (__builtin_expect(!!(!(tmp & ((1UL << (sizeof(unsigned long) << 2)) - 1))), 1)) {
  __extension__ ({ (*(__volatile__ __typeof__((urcu_memb_reader).ctr) *)&((urcu_memb_reader).ctr)) = ((*(__volatile__ __typeof__(urcu_memb_gp.ctr) *)&(urcu_memb_gp.ctr))); });
  urcu_memb_smp_mb_slave();
 } else
  __extension__ ({ (*(__volatile__ __typeof__((urcu_memb_reader).ctr) *)&((urcu_memb_reader).ctr)) = (tmp + (1UL << 0)); });
}
# 113 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
static inline void _urcu_memb_read_lock(void)
{
 unsigned long tmp;

 ;
 __asm__ __volatile__ ("" : : : "memory");
 tmp = (urcu_memb_reader).ctr;
 ;
 _urcu_memb_read_lock_update(tmp);
}
# 132 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
static inline void _urcu_memb_read_unlock_update_and_wakeup(unsigned long tmp)
{
 if (__builtin_expect(!!((tmp & ((1UL << (sizeof(unsigned long) << 2)) - 1)) == (1UL << 0)), 1)) {
  urcu_memb_smp_mb_slave();
  __extension__ ({ (*(__volatile__ __typeof__((urcu_memb_reader).ctr) *)&((urcu_memb_reader).ctr)) = (tmp - (1UL << 0)); });
  urcu_memb_smp_mb_slave();
  urcu_common_wake_up_gp(&urcu_memb_gp);
 } else
  __extension__ ({ (*(__volatile__ __typeof__((urcu_memb_reader).ctr) *)&((urcu_memb_reader).ctr)) = (tmp - (1UL << 0)); });
}






static inline void _urcu_memb_read_unlock(void)
{
 unsigned long tmp;

 ;
 tmp = (urcu_memb_reader).ctr;
 ;
 _urcu_memb_read_unlock_update_and_wakeup(tmp);
 __asm__ __volatile__ ("" : : : "memory");
}
# 166 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/urcu-memb.h" 3 4
static inline int _urcu_memb_read_ongoing(void)
{
 return (urcu_memb_reader).ctr & ((1UL << (sizeof(unsigned long) << 2)) - 1);
}
# 60 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4
# 91 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 3 4
extern void urcu_memb_synchronize_rcu(void);




extern void urcu_memb_register_thread(void);
extern void urcu_memb_unregister_thread(void);




extern void urcu_memb_init(void);




static inline void urcu_memb_quiescent_state(void)
{
}

static inline void urcu_memb_thread_offline(void)
{
}

static inline void urcu_memb_thread_online(void)
{
}





# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/call-rcu.h" 1 3 4
# 33 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/call-rcu.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 1 3 4
# 28 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 3 4
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 2 3 4
# 48 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 3 4
enum cds_wfcq_ret {
 CDS_WFCQ_RET_WOULDBLOCK = -1,
 CDS_WFCQ_RET_DEST_EMPTY = 0,
 CDS_WFCQ_RET_DEST_NON_EMPTY = 1,
 CDS_WFCQ_RET_SRC_EMPTY = 2,
};

enum cds_wfcq_state {
 CDS_WFCQ_STATE_LAST = (1U << 0),
};

struct cds_wfcq_node {
 struct cds_wfcq_node *next;
};






struct __cds_wfcq_head {
 struct cds_wfcq_node node;
};

struct cds_wfcq_head {
 struct cds_wfcq_node node;
 pthread_mutex_t lock;
};







typedef union {
 struct __cds_wfcq_head *_h;
 struct cds_wfcq_head *h;
} __attribute__((__transparent_union__)) cds_wfcq_head_ptr_t;





static inline struct __cds_wfcq_head *__cds_wfcq_head_cast(struct __cds_wfcq_head *head)
{
 return head;
}





static inline struct cds_wfcq_head *cds_wfcq_head_cast(struct cds_wfcq_head *head)
{
 return head;
}
# 127 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 3 4
struct cds_wfcq_tail {
 struct cds_wfcq_node *p;
};



# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 1 3 4
# 31 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 3 4
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
# 32 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/poll.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/poll.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/poll.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/poll.h" 2 3 4
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/poll.h" 3 4
typedef unsigned long nfds_t;

struct pollfd {
 int fd;
 short events;
 short revents;
};

int poll (struct pollfd *, nfds_t, int);





# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/poll.h" 2 3 4
int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);




__typeof__(ppoll) ppoll __asm__("__ppoll_time64");
# 33 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 2 3 4
# 89 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline void _cds_wfcq_node_init(struct cds_wfcq_node *node)
{
 node->next = ((void*)0);
}





static inline void _cds_wfcq_init(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail)
{
 int ret;


 _cds_wfcq_node_init(&head->node);
 tail->p = &head->node;
 ret = pthread_mutex_init(&head->lock, ((void*)0));
 ((void)((!ret) || (__assert_fail("!ret", "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h", 107, __func__),0)));
}





static inline void _cds_wfcq_destroy(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail __attribute__((unused)))
{
 int ret = pthread_mutex_destroy(&head->lock);
 ((void)((!ret) || (__assert_fail("!ret", "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h", 118, __func__),0)));
}





static inline void ___cds_wfcq_init(struct __cds_wfcq_head *head,
  struct cds_wfcq_tail *tail)
{

 _cds_wfcq_node_init(&head->node);
 tail->p = &head->node;
}
# 145 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline _Bool _cds_wfcq_empty(cds_wfcq_head_ptr_t u_head,
  struct cds_wfcq_tail *tail)
{
 struct __cds_wfcq_head *head = u_head._h;







 return __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(head->node.next) *)&(head->node.next)); }) == ((void*)0)
  && __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(tail->p) *)&(tail->p)); }) == &head->node;
}

static inline void _cds_wfcq_dequeue_lock(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail __attribute__((unused)))
{
 int ret;

 ret = pthread_mutex_lock(&head->lock);
 ((void)((!ret) || (__assert_fail("!ret", "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h", 166, __func__),0)));
}

static inline void _cds_wfcq_dequeue_unlock(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail __attribute__((unused)))
{
 int ret;

 ret = pthread_mutex_unlock(&head->lock);
 ((void)((!ret) || (__assert_fail("!ret", "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h", 175, __func__),0)));
}

static inline _Bool ___cds_wfcq_append(cds_wfcq_head_ptr_t u_head,
  struct cds_wfcq_tail *tail,
  struct cds_wfcq_node *new_head,
  struct cds_wfcq_node *new_tail)
{
 struct __cds_wfcq_head *head = u_head._h;
 struct cds_wfcq_node *old_tail;






 old_tail = ((__typeof__(*(&tail->p))) _uatomic_exchange((&tail->p), ((unsigned long) (new_tail)), sizeof(*(&tail->p))));
# 202 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
 __extension__ ({ __typeof__(old_tail->next) _v = __extension__ ({ (*(__volatile__ __typeof__(old_tail->next) *)&(old_tail->next)) = (new_head); }); __asm__ __volatile__ ("" : : : "memory"); _v = _v; });




 return old_tail != &head->node;
}
# 219 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline _Bool _cds_wfcq_enqueue(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail,
  struct cds_wfcq_node *new_tail)
{
 return ___cds_wfcq_append(head, tail, new_tail, new_tail);
}
# 238 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline void ___cds_wfcq_wait_sleep(int msec)
{
 (void) poll(((void*)0), 0, msec);
}






static inline _Bool
___cds_wfcq_busy_wait(int *attempt, int blocking)
{
 if (!blocking)
  return 1;
 if (++(*attempt) >= 10) {
  ___cds_wfcq_wait_sleep(10);
  *attempt = 0;
 } else {
  __asm__ __volatile__ ("" : : : "memory");
 }
 return 0;
}




static inline struct cds_wfcq_node *
___cds_wfcq_node_sync_next(struct cds_wfcq_node *node, int blocking)
{
 struct cds_wfcq_node *next;
 int attempt = 0;




 while ((next = __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(node->next) *)&(node->next)); })) == ((void*)0)) {
  if (___cds_wfcq_busy_wait(&attempt, blocking))
   return ((struct cds_wfcq_node *) -1UL);
 }

 return next;
}

static inline struct cds_wfcq_node *
___cds_wfcq_first(cds_wfcq_head_ptr_t u_head,
  struct cds_wfcq_tail *tail,
  int blocking)
{
 struct __cds_wfcq_head *head = u_head._h;
 struct cds_wfcq_node *node;

 if (_cds_wfcq_empty(__cds_wfcq_head_cast(head), tail))
  return ((void*)0);
 node = ___cds_wfcq_node_sync_next(&head->node, blocking);

 ;
 return node;
}
# 312 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline struct cds_wfcq_node *
___cds_wfcq_first_blocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail)
{
 return ___cds_wfcq_first(head, tail, 1);
}
# 326 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline struct cds_wfcq_node *
___cds_wfcq_first_nonblocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail)
{
 return ___cds_wfcq_first(head, tail, 0);
}

static inline struct cds_wfcq_node *
___cds_wfcq_next(cds_wfcq_head_ptr_t head __attribute__((unused)),
  struct cds_wfcq_tail *tail,
  struct cds_wfcq_node *node,
  int blocking)
{
 struct cds_wfcq_node *next;







 if ((next = __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(node->next) *)&(node->next)); })) == ((void*)0)) {

  __asm__ __volatile__ ( "	.set	mips2		\n" "	sync			\n" "	.set	mips0		\n" :::"memory");
  if (__extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(tail->p) *)&(tail->p)); }) == node)
   return ((void*)0);
  next = ___cds_wfcq_node_sync_next(node, blocking);
 }

 ;
 return next;
}
# 374 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline struct cds_wfcq_node *
___cds_wfcq_next_blocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail,
  struct cds_wfcq_node *node)
{
 return ___cds_wfcq_next(head, tail, node, 1);
}







static inline struct cds_wfcq_node *
___cds_wfcq_next_nonblocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail,
  struct cds_wfcq_node *node)
{
 return ___cds_wfcq_next(head, tail, node, 0);
}

static inline struct cds_wfcq_node *
___cds_wfcq_dequeue_with_state(cds_wfcq_head_ptr_t u_head,
  struct cds_wfcq_tail *tail,
  int *state,
  int blocking)
{
 struct __cds_wfcq_head *head = u_head._h;
 struct cds_wfcq_node *node, *next;

 if (state)
  *state = 0;

 if (_cds_wfcq_empty(__cds_wfcq_head_cast(head), tail)) {
  return ((void*)0);
 }

 node = ___cds_wfcq_node_sync_next(&head->node, blocking);
 if (!blocking && node == ((struct cds_wfcq_node *) -1UL)) {
  return ((struct cds_wfcq_node *) -1UL);
 }

 if ((next = __extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(node->next) *)&(node->next)); })) == ((void*)0)) {
# 432 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
  _cds_wfcq_node_init(&head->node);
  if (((__typeof__(*(&tail->p))) _uatomic_cmpxchg((&tail->p), ((unsigned long) (node)), ((unsigned long) (&head->node)), sizeof(*(&tail->p)))) == node) {
   if (state)
    *state |= CDS_WFCQ_STATE_LAST;
   return node;
  }
  next = ___cds_wfcq_node_sync_next(node, blocking);





  if (!blocking && next == ((struct cds_wfcq_node *) -1UL)) {
   head->node.next = node;
   return ((struct cds_wfcq_node *) -1UL);
  }
 }




 head->node.next = next;


 ;
 return node;
}
# 469 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline struct cds_wfcq_node *
___cds_wfcq_dequeue_with_state_blocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail, int *state)
{
 return ___cds_wfcq_dequeue_with_state(head, tail, state, 1);
}







static inline struct cds_wfcq_node *
___cds_wfcq_dequeue_blocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail)
{
 return ___cds_wfcq_dequeue_with_state_blocking(head, tail, ((void*)0));
}







static inline struct cds_wfcq_node *
___cds_wfcq_dequeue_with_state_nonblocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail, int *state)
{
 return ___cds_wfcq_dequeue_with_state(head, tail, state, 0);
}







static inline struct cds_wfcq_node *
___cds_wfcq_dequeue_nonblocking(cds_wfcq_head_ptr_t head,
  struct cds_wfcq_tail *tail)
{
 return ___cds_wfcq_dequeue_with_state_nonblocking(head, tail, ((void*)0));
}
# 525 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline enum cds_wfcq_ret
___cds_wfcq_splice(
  cds_wfcq_head_ptr_t u_dest_q_head,
  struct cds_wfcq_tail *dest_q_tail,
  cds_wfcq_head_ptr_t u_src_q_head,
  struct cds_wfcq_tail *src_q_tail,
  int blocking)
{
 struct __cds_wfcq_head *dest_q_head = u_dest_q_head._h;
 struct __cds_wfcq_head *src_q_head = u_src_q_head._h;
 struct cds_wfcq_node *head, *tail;
 int attempt = 0;





 if (_cds_wfcq_empty(__cds_wfcq_head_cast(src_q_head), src_q_tail))
  return CDS_WFCQ_RET_SRC_EMPTY;

 for (;;) {





  head = ((__typeof__(*(&src_q_head->node.next))) _uatomic_exchange((&src_q_head->node.next), ((unsigned long) (((void*)0))), sizeof(*(&src_q_head->node.next))));
  if (head)
   break;
  if (__extension__ ({ __asm__ __volatile__ ("" : : : "memory"); (*(__volatile__ __typeof__(src_q_tail->p) *)&(src_q_tail->p)); }) == &src_q_head->node)
   return CDS_WFCQ_RET_SRC_EMPTY;
  if (___cds_wfcq_busy_wait(&attempt, blocking))
   return CDS_WFCQ_RET_WOULDBLOCK;
 }







 tail = ((__typeof__(*(&src_q_tail->p))) _uatomic_exchange((&src_q_tail->p), ((unsigned long) (&src_q_head->node)), sizeof(*(&src_q_tail->p))));





 if (___cds_wfcq_append(__cds_wfcq_head_cast(dest_q_head), dest_q_tail,
   head, tail))
  return CDS_WFCQ_RET_DEST_NON_EMPTY;
 else
  return CDS_WFCQ_RET_DEST_EMPTY;
}
# 589 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline enum cds_wfcq_ret
___cds_wfcq_splice_blocking(
  cds_wfcq_head_ptr_t dest_q_head,
  struct cds_wfcq_tail *dest_q_tail,
  cds_wfcq_head_ptr_t src_q_head,
  struct cds_wfcq_tail *src_q_tail)
{
 return ___cds_wfcq_splice(dest_q_head, dest_q_tail,
  src_q_head, src_q_tail, 1);
}







static inline enum cds_wfcq_ret
___cds_wfcq_splice_nonblocking(
  cds_wfcq_head_ptr_t dest_q_head,
  struct cds_wfcq_tail *dest_q_tail,
  cds_wfcq_head_ptr_t src_q_head,
  struct cds_wfcq_tail *src_q_tail)
{
 return ___cds_wfcq_splice(dest_q_head, dest_q_tail,
  src_q_head, src_q_tail, 0);
}
# 626 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline struct cds_wfcq_node *
_cds_wfcq_dequeue_with_state_blocking(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail, int *state)
{
 struct cds_wfcq_node *retval;

 _cds_wfcq_dequeue_lock(head, tail);
 retval = ___cds_wfcq_dequeue_with_state_blocking(cds_wfcq_head_cast(head),
   tail, state);
 _cds_wfcq_dequeue_unlock(head, tail);
 return retval;
}






static inline struct cds_wfcq_node *
_cds_wfcq_dequeue_blocking(struct cds_wfcq_head *head,
  struct cds_wfcq_tail *tail)
{
 return _cds_wfcq_dequeue_with_state_blocking(head, tail, ((void*)0));
}
# 663 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/static/wfcqueue.h" 3 4
static inline enum cds_wfcq_ret
_cds_wfcq_splice_blocking(
  struct cds_wfcq_head *dest_q_head,
  struct cds_wfcq_tail *dest_q_tail,
  struct cds_wfcq_head *src_q_head,
  struct cds_wfcq_tail *src_q_tail)
{
 enum cds_wfcq_ret ret;

 _cds_wfcq_dequeue_lock(src_q_head, src_q_tail);
 ret = ___cds_wfcq_splice_blocking(cds_wfcq_head_cast(dest_q_head), dest_q_tail,
   cds_wfcq_head_cast(src_q_head), src_q_tail);
 _cds_wfcq_dequeue_unlock(src_q_head, src_q_tail);
 return ret;
}
# 134 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/wfcqueue.h" 2 3 4
# 34 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/call-rcu.h" 2 3 4







struct call_rcu_data;
# 57 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/call-rcu.h" 3 4
struct rcu_head {
 struct cds_wfcq_node next;
 void (*func)(struct rcu_head *head);
};
# 70 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/call-rcu.h" 3 4
void urcu_memb_call_rcu(struct rcu_head *head,
       void (*func)(struct rcu_head *head));

struct call_rcu_data *urcu_memb_create_call_rcu_data(unsigned long flags,
        int cpu_affinity);
void urcu_memb_call_rcu_data_free(struct call_rcu_data *crdp);

struct call_rcu_data *urcu_memb_get_default_call_rcu_data(void);
struct call_rcu_data *urcu_memb_get_cpu_call_rcu_data(int cpu);
struct call_rcu_data *urcu_memb_get_thread_call_rcu_data(void);
struct call_rcu_data *urcu_memb_get_call_rcu_data(void);
pthread_t urcu_memb_get_call_rcu_thread(struct call_rcu_data *crdp);

void urcu_memb_set_thread_call_rcu_data(struct call_rcu_data *crdp);
int urcu_memb_set_cpu_call_rcu_data(int cpu, struct call_rcu_data *crdp);

int urcu_memb_create_all_cpu_call_rcu_data(unsigned long flags);
void urcu_memb_free_all_cpu_call_rcu_data(void);

void urcu_memb_call_rcu_before_fork(void);
void urcu_memb_call_rcu_after_fork_parent(void);
void urcu_memb_call_rcu_after_fork_child(void);

void urcu_memb_barrier(void);
# 124 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/defer.h" 1 3 4
# 51 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/defer.h" 3 4
extern void urcu_memb_defer_rcu(void (*fct)(void *p), void *p);




extern int urcu_memb_defer_register_thread(void);
extern void urcu_memb_defer_unregister_thread(void);
extern void urcu_memb_defer_barrier(void);
extern void urcu_memb_defer_barrier_thread(void);
# 125 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/flavor.h" 1 3 4
# 30 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/flavor.h" 3 4
struct rcu_head;

struct urcu_atfork {
 void (*before_fork)(void *priv);
 void (*after_fork_parent)(void *priv);
 void (*after_fork_child)(void *priv);
 void *priv;
};

void urcu_memb_register_rculfhash_atfork(struct urcu_atfork *atfork);
void urcu_memb_unregister_rculfhash_atfork(struct urcu_atfork *atfork);

struct rcu_flavor_struct {
 void (*read_lock)(void);
 void (*read_unlock)(void);
 int (*read_ongoing)(void);
 void (*read_quiescent_state)(void);
 void (*update_call_rcu)(struct rcu_head *head,
    void (*func)(struct rcu_head *head));
 void (*update_synchronize_rcu)(void);
 void (*update_defer_rcu)(void (*fct)(void *p), void *p);

 void (*thread_offline)(void);
 void (*thread_online)(void);
 void (*register_thread)(void);
 void (*unregister_thread)(void);

 void (*barrier)(void);

 void (*register_rculfhash_atfork)(struct urcu_atfork *atfork);
 void (*unregister_rculfhash_atfork)(struct urcu_atfork *atfork);
};
# 81 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/flavor.h" 3 4
extern const struct rcu_flavor_struct urcu_memb_flavor;
# 126 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu-memb.h" 2 3 4
# 40 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu/urcu.h" 2 3 4
# 3 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/urcu.h" 2 3 4
# 28 "../include/platform_defs.h" 2


# 29 "../include/platform_defs.h"
typedef struct filldir filldir_t;
# 38 "../include/platform_defs.h"
typedef unsigned short umode_t;
# 53 "../include/platform_defs.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/locale.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/locale.h" 3 4

# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/locale.h" 3 4
struct lconv {
 char *decimal_point;
 char *thousands_sep;
 char *grouping;

 char *int_curr_symbol;
 char *currency_symbol;
 char *mon_decimal_point;
 char *mon_thousands_sep;
 char *mon_grouping;
 char *positive_sign;
 char *negative_sign;
 char int_frac_digits;
 char frac_digits;
 char p_cs_precedes;
 char p_sep_by_space;
 char n_cs_precedes;
 char n_sep_by_space;
 char p_sign_posn;
 char n_sign_posn;
 char int_p_cs_precedes;
 char int_p_sep_by_space;
 char int_n_cs_precedes;
 char int_n_sep_by_space;
 char int_p_sign_posn;
 char int_n_sign_posn;
};


char *setlocale (int, const char *);
struct lconv *localeconv(void);







# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 65 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/locale.h" 2 3 4
# 76 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/locale.h" 3 4
locale_t duplocale(locale_t);
void freelocale(locale_t);
locale_t newlocale(int, const char *, locale_t);
locale_t uselocale(locale_t);
# 54 "../include/platform_defs.h" 2
# 83 "../include/platform_defs.h"

# 83 "../include/platform_defs.h"
extern int platform_nproc(void);
# 94 "../include/platform_defs.h"
static inline size_t __ab_c_size(size_t a, size_t b, size_t c)
{
 return (a * b) + c;
}
# 10 "../libfrog/projects.h" 2
# 1 "../include/xfs.h" 1
# 9 "../include/xfs.h"
# 1 "../include/xfs/linux.h" 1
# 13 "../include/xfs/linux.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/uuid/uuid.h" 1 3 4
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/uuid/uuid.h" 3 4

# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/uuid/uuid.h" 3 4
typedef unsigned char uuid_t[16];
# 82 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/uuid/uuid.h" 3 4
extern void uuid_clear(uuid_t uu);


extern int uuid_compare(const uuid_t uu1, const uuid_t uu2);


extern void uuid_copy(uuid_t dst, const uuid_t src);


extern void uuid_generate(uuid_t out);
extern void uuid_generate_random(uuid_t out);
extern void uuid_generate_time(uuid_t out);
extern int uuid_generate_time_safe(uuid_t out);

extern void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len);
extern void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len);


extern int uuid_is_null(const uuid_t uu);


extern int uuid_parse(const char *in, uuid_t uu);
extern int uuid_parse_range(const char *in_start, const char *in_end, uuid_t uu);


extern void uuid_unparse(const uuid_t uu, char *out);
extern void uuid_unparse_lower(const uuid_t uu, char *out);
extern void uuid_unparse_upper(const uuid_t uu, char *out);


extern time_t uuid_time(const uuid_t uu, struct timeval *ret_tv);
extern int uuid_type(const uuid_t uu);
extern int uuid_variant(const uuid_t uu);


extern const uuid_t *uuid_get_template(const char *alias);
# 14 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/vfs.h" 1 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statfs.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statfs.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statvfs.h" 1 3 4
# 12 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statvfs.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 13 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statvfs.h" 2 3 4

struct statvfs {
 unsigned long f_bsize, f_frsize;
 fsblkcnt_t f_blocks, f_bfree, f_bavail;
 fsfilcnt_t f_files, f_ffree, f_favail;

 unsigned long f_fsid;
 unsigned :8*(2*sizeof(int)-sizeof(long));




 unsigned long f_flag, f_namemax;
 int __reserved[6];
};

int statvfs (const char *restrict, struct statvfs *restrict);
int fstatvfs (int, struct statvfs *);
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statfs.h" 2 3 4

typedef struct __fsid_t {
 int __val[2];
} fsid_t;

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/statfs.h" 1 3 4
struct statfs {
 unsigned long f_type, f_bsize, f_frsize;
 fsblkcnt_t f_blocks, f_bfree;
 fsfilcnt_t f_files, f_ffree;
 fsblkcnt_t f_bavail;
 fsid_t f_fsid;
 unsigned long f_namelen, f_flags, f_spare[5];
};
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/statfs.h" 2 3 4

int statfs (const char *, struct statfs *);
int fstatfs (int, struct statfs *);
# 2 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/vfs.h" 2 3 4
# 15 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/ioctl.h" 1 3 4
# 9 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/ioctl.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 354 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 3 4
struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; };
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/ioctl.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/ioctl.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/ioctl.h" 2 3 4
# 115 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/ioctl.h" 3 4
int ioctl (int, int, ...);
# 16 "../include/xfs/linux.h" 2

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/sysmacros.h" 1 3 4
# 18 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 1 3 4
# 21 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 22 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 2 3 4

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/stat.h" 1 3 4



struct stat {
 dev_t st_dev;
 long __st_padding1[2];
 ino_t st_ino;
 mode_t st_mode;
 nlink_t st_nlink;
 uid_t st_uid;
 gid_t st_gid;
 dev_t st_rdev;
 long __st_padding2[2];
 off_t st_size;
 struct {
  long tv_sec;
  long tv_nsec;
 } __st_atim32, __st_mtim32, __st_ctim32;
 blksize_t st_blksize;
 long __st_padding3;
 blkcnt_t st_blocks;
 struct timespec st_atim;
 struct timespec st_mtim;
 struct timespec st_ctim;
 long __st_padding4[2];
};
# 24 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 2 3 4
# 73 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 3 4
int stat(const char *restrict, struct stat *restrict);
int fstat(int, struct stat *);
int lstat(const char *restrict, struct stat *restrict);
int fstatat(int, const char *restrict, struct stat *restrict, int);
int chmod(const char *, mode_t);
int fchmod(int, mode_t);
int fchmodat(int, const char *, mode_t, int);
mode_t umask(mode_t);
int mkdir(const char *, mode_t);
int mkfifo(const char *, mode_t);
int mkdirat(int, const char *, mode_t);
int mkfifoat(int, const char *, mode_t);


int mknod(const char *, mode_t, dev_t);
int mknodat(int, const char *, mode_t, dev_t);


int futimens(int, const struct timespec [2]);
int utimensat(int, const char *, const struct timespec [2], int);


int lchmod(const char *, mode_t);
# 114 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/stat.h" 3 4
__typeof__(stat) stat __asm__("__stat_time64");
__typeof__(fstat) fstat __asm__("__fstat_time64");
__typeof__(lstat) lstat __asm__("__lstat_time64");
__typeof__(fstatat) fstatat __asm__("__fstatat_time64");
__typeof__(futimens) futimens __asm__("__futimens_time64");
__typeof__(utimensat) utimensat __asm__("__utimensat_time64");
# 19 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/inttypes.h" 1 3 4
# 12 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/inttypes.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 13 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/inttypes.h" 2 3 4

typedef struct { intmax_t quot, rem; } imaxdiv_t;

intmax_t imaxabs(intmax_t);
imaxdiv_t imaxdiv(intmax_t, intmax_t);

intmax_t strtoimax(const char *restrict, char **restrict, int);
uintmax_t strtoumax(const char *restrict, char **restrict, int);

intmax_t wcstoimax(const wchar_t *restrict, wchar_t **restrict, int);
uintmax_t wcstoumax(const wchar_t *restrict, wchar_t **restrict, int);
# 20 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/malloc.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/malloc.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 11 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/malloc.h" 2 3 4

void *malloc (size_t);
void *calloc (size_t, size_t);
void *realloc (void *, size_t);
void free (void *);
void *valloc (size_t);
void *memalign(size_t, size_t);

size_t malloc_usable_size(void *);
# 21 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/getopt.h" 1 3 4







int getopt(int, char * const [], const char *);
extern char *optarg;
extern int optind, opterr, optopt, optreset;

struct option {
 const char *name;
 int has_arg;
 int *flag;
 int val;
};

int getopt_long(int, char *const *, const char *, const struct option *, int *);
int getopt_long_only(int, char *const *, const char *, const struct option *, int *);
# 22 "../include/xfs/linux.h" 2




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 1 3 4
# 28 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 29 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 2 3 4
# 44 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
typedef struct sigaltstack stack_t;



# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/signal.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/signal.h" 3 4
typedef unsigned long long greg_t, gregset_t[32];
typedef struct {
 union {
  double fp_dregs[32];
  struct {
   float _fp_fregs;
   unsigned _fp_pad;
  } fp_fregs[32];
 } fp_r;
} fpregset_t;
struct sigcontext {
 unsigned sc_regmask, sc_status;
 unsigned long long sc_pc;
 gregset_t sc_regs;
 fpregset_t sc_fpregs;
 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
 unsigned long long sc_mdhi, sc_mdlo;
 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
};
typedef struct {
 unsigned regmask, status;
 unsigned long long pc;
 gregset_t gregs;
 fpregset_t fpregs;
 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;
 unsigned long long mdhi, mdlo;
 unsigned long hi1, lo1, hi2, lo2, hi3, lo3;
} mcontext_t;
# 48 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/signal.h" 3 4
struct sigaltstack {
 void *ss_sp;
 size_t ss_size;
 int ss_flags;
};

typedef struct ucontext {
 unsigned long uc_flags;
 struct ucontext *uc_link;
 stack_t uc_stack;
 mcontext_t uc_mcontext;
 sigset_t uc_sigmask;
} ucontext_t;
# 49 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 2 3 4
# 94 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
union sigval {
 int sival_int;
 void *sival_ptr;
};

typedef struct {

 int si_signo, si_code, si_errno;



 union {
  char __pad[128 - 2*sizeof(int) - sizeof(long)];
  struct {
   union {
    struct {
     pid_t si_pid;
     uid_t si_uid;
    } __piduid;
    struct {
     int si_timerid;
     int si_overrun;
    } __timer;
   } __first;
   union {
    union sigval si_value;
    struct {
     int si_status;
     clock_t si_utime, si_stime;
    } __sigchld;
   } __second;
  } __si_common;
  struct {
   void *si_addr;
   short si_addr_lsb;
   union {
    struct {
     void *si_lower;
     void *si_upper;
    } __addr_bnd;
    unsigned si_pkey;
   } __first;
  } __sigfault;
  struct {
   long si_band;
   int si_fd;
  } __sigpoll;
  struct {
   void *si_call_addr;
   int si_syscall;
   unsigned si_arch;
  } __sigsys;
 } __si_fields;
} siginfo_t;
# 169 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
struct sigaction {
 union {
  void (*sa_handler)(int);
  void (*sa_sigaction)(int, siginfo_t *, void *);
 } __sa_handler;
 sigset_t sa_mask;
 int sa_flags;
 void (*sa_restorer)(void);
};






struct sigevent {
 union sigval sigev_value;
 int sigev_signo;
 int sigev_notify;
 union {
  char __pad[64 - 2*sizeof(int) - sizeof(union sigval)];
  pid_t sigev_notify_thread_id;
  struct {
   void (*sigev_notify_function)(union sigval);
   pthread_attr_t *sigev_notify_attributes;
  } __sev_thread;
 } __sev_fields;
};
# 207 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
int __libc_current_sigrtmin(void);
int __libc_current_sigrtmax(void);




int kill(pid_t, int);

int sigemptyset(sigset_t *);
int sigfillset(sigset_t *);
int sigaddset(sigset_t *, int);
int sigdelset(sigset_t *, int);
int sigismember(const sigset_t *, int);

int sigprocmask(int, const sigset_t *restrict, sigset_t *restrict);
int sigsuspend(const sigset_t *);
int sigaction(int, const struct sigaction *restrict, struct sigaction *restrict);
int sigpending(sigset_t *);
int sigwait(const sigset_t *restrict, int *restrict);
int sigwaitinfo(const sigset_t *restrict, siginfo_t *restrict);
int sigtimedwait(const sigset_t *restrict, siginfo_t *restrict, const struct timespec *restrict);
int sigqueue(pid_t, int, union sigval);

int pthread_sigmask(int, const sigset_t *restrict, sigset_t *restrict);
int pthread_kill(pthread_t, int);

void psiginfo(const siginfo_t *, const char *);
void psignal(int, const char *);




int killpg(pid_t, int);
int sigaltstack(const stack_t *restrict, stack_t *restrict);
int sighold(int);
int sigignore(int);
int siginterrupt(int, int);
int sigpause(int);
int sigrelse(int);
void (*sigset(int, void (*)(int)))(int);
# 266 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
typedef void (*sig_t)(int);






typedef void (*sighandler_t)(int);
void (*bsd_signal(int, void (*)(int)))(int);
int sigisemptyset(const sigset_t *);
int sigorset (sigset_t *, const sigset_t *, const sigset_t *);
int sigandset(sigset_t *, const sigset_t *, const sigset_t *);
# 287 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/signal.h" 3 4
typedef int sig_atomic_t;

void (*signal(int, void (*)(int)))(int);
int raise(int);





__typeof__(sigtimedwait) sigtimedwait __asm__("__sigtimedwait_time64");
# 27 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/types.h" 1 3 4
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/types.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/int-ll64.h" 1 3 4
# 12 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/int-ll64.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/bitsperlong.h" 1 3 4






# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/bitsperlong.h" 1 3 4
# 8 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/bitsperlong.h" 2 3 4
# 13 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/int-ll64.h" 2 3 4







typedef __signed__ char __s8;
typedef unsigned char __u8;

typedef __signed__ short __s16;
typedef unsigned short __u16;

typedef __signed__ int __s32;
typedef unsigned int __u32;


__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/types.h" 2 3 4
# 28 "../include/xfs/linux.h" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/mntent.h" 1 3 4
# 9 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/mntent.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/mntent.h" 2 3 4
# 23 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/mntent.h" 3 4
struct mntent {
 char *mnt_fsname;
 char *mnt_dir;
 char *mnt_type;
 char *mnt_opts;
 int mnt_freq;
 int mnt_passno;
};

FILE *setmntent(const char *, const char *);
int endmntent(FILE *);
struct mntent *getmntent(FILE *);
struct mntent *getmntent_r(FILE *, struct mntent *, char *, int);
int addmntent(FILE *, const struct mntent *);
char *hasmntopt(const struct mntent *, const char *);
# 29 "../include/xfs/linux.h" 2


# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/falloc.h" 1 3 4
# 32 "../include/xfs/linux.h" 2




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 1 3 4
# 13 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/limits.h" 1 3 4
# 14 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/ioctl.h" 1 3 4




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/ioctl.h" 1 3 4
# 26 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/ioctl.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/ioctl.h" 1 3 4
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/ioctl.h" 2 3 4
# 6 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/ioctl.h" 2 3 4
# 15 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/types.h" 1 3 4
# 9 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/types.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/posix_types.h" 1 3 4




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/stddef.h" 1 3 4
# 6 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/posix_types.h" 2 3 4
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/posix_types.h" 3 4
typedef struct {
 unsigned long fds_bits[1024 / (8 * sizeof(long))];
} __kernel_fd_set;


typedef void (*__kernel_sighandler_t)(int);


typedef int __kernel_key_t;
typedef int __kernel_mqd_t;

# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/posix_types.h" 1 3 4
# 13 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/posix_types.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/sgidefs.h" 1 3 4
# 14 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/posix_types.h" 2 3 4







typedef long __kernel_daddr_t;


# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/posix_types.h" 1 3 4
# 15 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/posix_types.h" 3 4
typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;



typedef __kernel_ulong_t __kernel_ino_t;



typedef unsigned int __kernel_mode_t;



typedef int __kernel_pid_t;



typedef int __kernel_ipc_pid_t;



typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;



typedef __kernel_long_t __kernel_suseconds_t;







typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;



typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;



typedef unsigned int __kernel_old_dev_t;
# 68 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/posix_types.h" 3 4
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
# 79 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm-generic/posix_types.h" 3 4
typedef struct {
 int val[2];
} __kernel_fsid_t;





typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_old_time_t;
typedef __kernel_long_t __kernel_time_t;
typedef long long __kernel_time64_t;
typedef __kernel_long_t __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
# 25 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/asm/posix_types.h" 2 3 4
# 37 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/posix_types.h" 2 3 4
# 10 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/types.h" 2 3 4
# 27 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/types.h" 3 4
typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;

typedef __u16 __sum16;
typedef __u32 __wsum;
# 50 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/types.h" 3 4
typedef unsigned __poll_t;
# 16 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 2 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fscrypt.h" 1 3 4
# 40 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fscrypt.h" 3 4
struct fscrypt_policy_v1 {
 __u8 version;
 __u8 contents_encryption_mode;
 __u8 filenames_encryption_mode;
 __u8 flags;
 __u8 master_key_descriptor[8];
};
# 55 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fscrypt.h" 3 4
struct fscrypt_key {
 __u32 mode;
 __u8 raw[64];
 __u32 size;
};






struct fscrypt_policy_v2 {
 __u8 version;
 __u8 contents_encryption_mode;
 __u8 filenames_encryption_mode;
 __u8 flags;
 __u8 __reserved[4];
 __u8 master_key_identifier[16];
};


struct fscrypt_get_policy_ex_arg {
 __u64 policy_size;
 union {
  __u8 version;
  struct fscrypt_policy_v1 v1;
  struct fscrypt_policy_v2 v2;
 } policy;
};
# 102 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fscrypt.h" 3 4
struct fscrypt_key_specifier {
 __u32 type;
 __u32 __reserved;
 union {
  __u8 __reserved[32];
  __u8 descriptor[8];
  __u8 identifier[16];
 } u;
};





struct fscrypt_provisioning_key_payload {
 __u32 type;
 __u32 __reserved;
 __u8 raw[];
};


struct fscrypt_add_key_arg {
 struct fscrypt_key_specifier key_spec;
 __u32 raw_size;
 __u32 key_id;
 __u32 __reserved[8];
 __u8 raw[];
};


struct fscrypt_remove_key_arg {
 struct fscrypt_key_specifier key_spec;


 __u32 removal_status_flags;
 __u32 __reserved[5];
};


struct fscrypt_get_key_status_arg {

 struct fscrypt_key_specifier key_spec;
 __u32 __reserved[6];





 __u32 status;

 __u32 status_flags;
 __u32 user_count;
 __u32 __out_reserved[13];
};
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 2 3 4


# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/mount.h" 1 3 4
# 95 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/mount.h" 3 4
enum fsconfig_command {
 FSCONFIG_SET_FLAG = 0,
 FSCONFIG_SET_STRING = 1,
 FSCONFIG_SET_BINARY = 2,
 FSCONFIG_SET_PATH = 3,
 FSCONFIG_SET_PATH_EMPTY = 4,
 FSCONFIG_SET_FD = 5,
 FSCONFIG_CMD_CREATE = 6,
 FSCONFIG_CMD_RECONFIGURE = 7,
};
# 129 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/mount.h" 3 4
struct mount_attr {
 __u64 attr_set;
 __u64 attr_clr;
 __u64 propagation;
 __u64 userns_fd;
};
# 20 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 2 3 4
# 50 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 3 4
struct file_clone_range {
 __s64 src_fd;
 __u64 src_offset;
 __u64 src_length;
 __u64 dest_offset;
};

struct fstrim_range {
 __u64 start;
 __u64 len;
 __u64 minlen;
};






struct file_dedupe_range_info {
 __s64 dest_fd;
 __u64 dest_offset;
 __u64 bytes_deduped;






 __s32 status;
 __u32 reserved;
};


struct file_dedupe_range {
 __u64 src_offset;
 __u64 src_length;
 __u16 dest_count;
 __u16 reserved1;
 __u32 reserved2;
 struct file_dedupe_range_info info[0];
};


struct files_stat_struct {
 unsigned long nr_files;
 unsigned long nr_free_files;
 unsigned long max_files;
};

struct inodes_stat_t {
 long nr_inodes;
 long nr_unused;
 long dummy[5];
};







struct fsxattr {
 __u32 fsx_xflags;
 __u32 fsx_extsize;
 __u32 fsx_nextents;
 __u32 fsx_projid;
 __u32 fsx_cowextsize;
 unsigned char fsx_pad[8];
};
# 283 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fs.h" 3 4
typedef int __kernel_rwf_t;
# 37 "../include/xfs/linux.h" 2




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 1 3 4
# 19 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/assert.h" 3 4
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
# 42 "../include/xfs/linux.h" 2


# 43 "../include/xfs/linux.h"
static __inline__ int xfsctl(const char *path, int fd, int cmd, void *p)
{
 return ioctl(fd, cmd, p);
}







static __inline__ int platform_test_xfs_fd(int fd)
{
 struct statfs statfsbuf;
 struct stat statbuf;

 if (fstatfs(fd, &statfsbuf) < 0)
  return 0;
 if (fstat(fd, &statbuf) < 0)
  return 0;
 if (!
# 63 "../include/xfs/linux.h" 3 4
     (((
# 63 "../include/xfs/linux.h"
     statbuf.st_mode
# 63 "../include/xfs/linux.h" 3 4
     ) & 0170000) == 0100000) 
# 63 "../include/xfs/linux.h"
                              && !
# 63 "../include/xfs/linux.h" 3 4
                                  (((
# 63 "../include/xfs/linux.h"
                                  statbuf.st_mode
# 63 "../include/xfs/linux.h" 3 4
                                  ) & 0170000) == 0040000)
# 63 "../include/xfs/linux.h"
                                                          )
  return 0;
 return (statfsbuf.f_type == 0x58465342);
}

static __inline__ int platform_test_xfs_path(const char *path)
{
 struct statfs statfsbuf;
 struct stat statbuf;

 if (statfs(path, &statfsbuf) < 0)
  return 0;
 if (stat(path, &statbuf) < 0)
  return 0;
 if (!
# 77 "../include/xfs/linux.h" 3 4
     (((
# 77 "../include/xfs/linux.h"
     statbuf.st_mode
# 77 "../include/xfs/linux.h" 3 4
     ) & 0170000) == 0100000) 
# 77 "../include/xfs/linux.h"
                              && !
# 77 "../include/xfs/linux.h" 3 4
                                  (((
# 77 "../include/xfs/linux.h"
                                  statbuf.st_mode
# 77 "../include/xfs/linux.h" 3 4
                                  ) & 0170000) == 0040000)
# 77 "../include/xfs/linux.h"
                                                          )
  return 0;
 return (statfsbuf.f_type == 0x58465342);
}

static __inline__ int platform_fstatfs(int fd, struct statfs *buf)
{
 return fstatfs(fd, buf);
}

static __inline__ void platform_getoptreset(void)
{
 extern int optind;
 optind = 0;
}

static __inline__ int platform_uuid_compare(uuid_t *uu1, uuid_t *uu2)
{
 return uuid_compare(*uu1, *uu2);
}

static __inline__ void platform_uuid_unparse(uuid_t *uu, char *buffer)
{
 uuid_unparse(*uu, buffer);
}

static __inline__ int platform_uuid_parse(const char *buffer, uuid_t *uu)
{
 return uuid_parse(buffer, *uu);
}

static __inline__ int platform_uuid_is_null(uuid_t *uu)
{
 return uuid_is_null(*uu);
}

static __inline__ void platform_uuid_generate(uuid_t *uu)
{
 uuid_generate(*uu);
}

static __inline__ void platform_uuid_clear(uuid_t *uu)
{
 uuid_clear(*uu);
}

static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
{
 uuid_copy(*dst, *src);
}





static __inline__ int
platform_discard_blocks(int fd, uint64_t start, uint64_t len)
{
 uint64_t range[2] = { start, len };

 if (ioctl(fd, 
# 137 "../include/xfs/linux.h" 3 4
              (((1U) << (((0 +8)+8)+13)) | (((0x12)) << (0 +8)) | (((119)) << 0) | ((0) << ((0 +8)+8)))
# 137 "../include/xfs/linux.h"
                        , &range) < 0)
  return 
# 138 "../include/xfs/linux.h" 3 4
        (*__errno_location())
# 138 "../include/xfs/linux.h"
             ;
 return 0;
}





typedef off_t xfs_off_t;
typedef uint64_t xfs_ino_t;
typedef uint32_t xfs_dev_t;
typedef int64_t xfs_daddr_t;
typedef __u32 xfs_nlink_t;




struct mntent_cursor {
 FILE *mtabp;
};

static inline int platform_mntent_open(struct mntent_cursor * cursor, char *mtab)
{
 cursor->mtabp = setmntent(mtab, "r");
 if (!cursor->mtabp) {
  fprintf(
# 163 "../include/xfs/linux.h" 3 4
         (stderr)
# 163 "../include/xfs/linux.h"
               , "Error: cannot read %s\n", mtab);
  return 1;
 }
 return 0;
}

static inline struct mntent * platform_mntent_next(struct mntent_cursor * cursor)
{
 return getmntent(cursor->mtabp);
}

static inline void platform_mntent_close(struct mntent_cursor * cursor)
{
 endmntent(cursor->mtabp);
}


static inline int
platform_zero_range(
 int fd,
 xfs_off_t start,
 size_t len)
{
 int ret;

 ret = fallocate(fd, 
# 188 "../include/xfs/linux.h" 3 4
                    0x10
# 188 "../include/xfs/linux.h"
                                        , start, len);
 if (!ret)
  return 0;
 return -
# 191 "../include/xfs/linux.h" 3 4
        (*__errno_location())
# 191 "../include/xfs/linux.h"
             ;
}
# 201 "../include/xfs/linux.h"
static inline void
platform_crash(void)
{
 kill(getpid(), 
# 204 "../include/xfs/linux.h" 3 4
               9
# 204 "../include/xfs/linux.h"
                      );
 
# 205 "../include/xfs/linux.h" 3 4
((void)((
# 205 "../include/xfs/linux.h"
0
# 205 "../include/xfs/linux.h" 3 4
) || (__assert_fail(
# 205 "../include/xfs/linux.h"
"0"
# 205 "../include/xfs/linux.h" 3 4
, "../include/xfs/linux.h", 205, __func__),0)))
# 205 "../include/xfs/linux.h"
         ;
}
# 255 "../include/xfs/linux.h"
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fsmap.h" 1 3 4
# 50 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fsmap.h" 3 4

# 50 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/linux/fsmap.h" 3 4
struct fsmap {
 __u32 fmr_device;
 __u32 fmr_flags;
 __u64 fmr_physical;
 __u64 fmr_owner;
 __u64 fmr_offset;
 __u64 fmr_length;
 __u64 fmr_reserved[3];
};

struct fsmap_head {
 __u32 fmh_iflags;
 __u32 fmh_oflags;
 __u32 fmh_count;
 __u32 fmh_entries;
 __u64 fmh_reserved[6];

 struct fsmap fmh_keys[2];
 struct fsmap fmh_recs[];
};


static __inline__ __kernel_size_t
fsmap_sizeof(
 unsigned int nr)
{
 return sizeof(struct fsmap_head) + nr * sizeof(struct fsmap);
}


static __inline__ void
fsmap_advance(
 struct fsmap_head *head)
{
 head->fmh_keys[0] = head->fmh_recs[head->fmh_entries - 1];
}
# 256 "../include/xfs/linux.h" 2
# 10 "../include/xfs.h" 2
# 20 "../include/xfs.h"

# 20 "../include/xfs.h"
extern int xfs_assert_largefile[sizeof(off_t)-8];
# 49 "../include/xfs.h"
# 1 "../include/xfs/xfs_types.h" 1
# 9 "../include/xfs/xfs_types.h"
typedef uint32_t prid_t;

typedef uint32_t xfs_agblock_t;
typedef uint32_t xfs_agino_t;
typedef uint32_t xfs_extlen_t;
typedef uint32_t xfs_agnumber_t;
typedef int32_t xfs_extnum_t;
typedef int16_t xfs_aextnum_t;
typedef int64_t xfs_fsize_t;
typedef uint64_t xfs_ufsize_t;

typedef int32_t xfs_suminfo_t;
typedef uint32_t xfs_rtword_t;

typedef int64_t xfs_lsn_t;
typedef int64_t xfs_csn_t;

typedef uint32_t xfs_dablk_t;
typedef uint32_t xfs_dahash_t;

typedef uint64_t xfs_fsblock_t;
typedef uint64_t xfs_rfsblock_t;
typedef uint64_t xfs_rtblock_t;
typedef uint64_t xfs_fileoff_t;
typedef uint64_t xfs_filblks_t;

typedef int64_t xfs_srtblock_t;





typedef void * xfs_failaddr_t;
# 106 "../include/xfs/xfs_types.h"
typedef enum {
 XFS_LOOKUP_EQi, XFS_LOOKUP_LEi, XFS_LOOKUP_GEi
} xfs_lookup_t;
# 119 "../include/xfs/xfs_types.h"
typedef enum {
 XFS_BTNUM_BNOi, XFS_BTNUM_CNTi, XFS_BTNUM_RMAPi, XFS_BTNUM_BMAPi,
 XFS_BTNUM_INOi, XFS_BTNUM_FINOi, XFS_BTNUM_REFCi, XFS_BTNUM_MAX
} xfs_btnum_t;
# 133 "../include/xfs/xfs_types.h"
struct xfs_name {
 const unsigned char *name;
 int len;
 int type;
};





typedef uint32_t xfs_dqid_t;
# 154 "../include/xfs/xfs_types.h"
struct xfs_iext_cursor {
 struct xfs_iext_leaf *leaf;
 int pos;
};

typedef enum {
 XFS_EXT_NORM, XFS_EXT_UNWRITTEN,
} xfs_exntst_t;

typedef struct xfs_bmbt_irec
{
 xfs_fileoff_t br_startoff;
 xfs_fsblock_t br_startblock;
 xfs_filblks_t br_blockcount;
 xfs_exntst_t br_state;
} xfs_bmbt_irec_t;


enum xfs_ag_resv_type {
 XFS_AG_RESV_NONE = 0,
 XFS_AG_RESV_AGFL,
 XFS_AG_RESV_METADATA,
 XFS_AG_RESV_RMAPBT,
};




struct xfs_mount;

xfs_agblock_t xfs_ag_block_count(struct xfs_mount *mp, xfs_agnumber_t agno);

# 185 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 185 "../include/xfs/xfs_types.h"
    xfs_verify_agbno(struct xfs_mount *mp, xfs_agnumber_t agno,
  xfs_agblock_t agbno);

# 187 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 187 "../include/xfs/xfs_types.h"
    xfs_verify_fsbno(struct xfs_mount *mp, xfs_fsblock_t fsbno);

# 188 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 188 "../include/xfs/xfs_types.h"
    xfs_verify_fsbext(struct xfs_mount *mp, xfs_fsblock_t fsbno,
  xfs_fsblock_t len);

void xfs_agino_range(struct xfs_mount *mp, xfs_agnumber_t agno,
  xfs_agino_t *first, xfs_agino_t *last);

# 193 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 193 "../include/xfs/xfs_types.h"
    xfs_verify_agino(struct xfs_mount *mp, xfs_agnumber_t agno,
  xfs_agino_t agino);

# 195 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 195 "../include/xfs/xfs_types.h"
    xfs_verify_agino_or_null(struct xfs_mount *mp, xfs_agnumber_t agno,
  xfs_agino_t agino);

# 197 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 197 "../include/xfs/xfs_types.h"
    xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino);

# 198 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 198 "../include/xfs/xfs_types.h"
    xfs_internal_inum(struct xfs_mount *mp, xfs_ino_t ino);

# 199 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 199 "../include/xfs/xfs_types.h"
    xfs_verify_dir_ino(struct xfs_mount *mp, xfs_ino_t ino);

# 200 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 200 "../include/xfs/xfs_types.h"
    xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);

# 201 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 201 "../include/xfs/xfs_types.h"
    xfs_verify_rtext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
  xfs_rtblock_t len);

# 203 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 203 "../include/xfs/xfs_types.h"
    xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);

# 204 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 204 "../include/xfs/xfs_types.h"
    xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off);
void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min,
  unsigned long long *max);

# 207 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 207 "../include/xfs/xfs_types.h"
    xfs_verify_fileoff(struct xfs_mount *mp, xfs_fileoff_t off);

# 208 "../include/xfs/xfs_types.h" 3 4
_Bool 
# 208 "../include/xfs/xfs_types.h"
    xfs_verify_fileext(struct xfs_mount *mp, xfs_fileoff_t off,
  xfs_fileoff_t len);
# 50 "../include/xfs.h" 2




# 1 "../include/xfs/xfs_fs_compat.h" 1
# 38 "../include/xfs/xfs_fs_compat.h"
struct xfs_clone_args {
 __s64 src_fd;
 __u64 src_offset;
 __u64 src_length;
 __u64 dest_offset;
};
# 53 "../include/xfs/xfs_fs_compat.h"
struct xfs_extent_data_info {
 __s64 fd;
 __u64 logical_offset;
 __u64 bytes_deduped;






 __s32 status;
 __u32 reserved;
};





struct xfs_extent_data {
 __u64 logical_offset;
 __u64 length;
 __u16 dest_count;
 __u16 reserved1;
 __u32 reserved2;
 struct xfs_extent_data_info info[0];
};
# 89 "../include/xfs/xfs_fs_compat.h"
typedef long long int time64_t;

struct timespec64 {
 time64_t tv_sec;
 long tv_nsec;
};
# 55 "../include/xfs.h" 2



# 1 "../include/xfs/xfs_fs.h" 1
# 19 "../include/xfs/xfs_fs.h"
struct dioattr {
 __u32 d_mem;
 __u32 d_miniosz;
 __u32 d_maxiosz;
};
# 34 "../include/xfs/xfs_fs.h"
struct getbmap {
 __s64 bmv_offset;
 __s64 bmv_block;
 __s64 bmv_length;
 __s32 bmv_count;
 __s32 bmv_entries;
};
# 53 "../include/xfs/xfs_fs.h"
struct getbmapx {
 __s64 bmv_offset;
 __s64 bmv_block;
 __s64 bmv_length;
 __s32 bmv_count;
 __s32 bmv_entries;
 __s32 bmv_iflags;
 __s32 bmv_oflags;
 __s32 bmv_unused1;
 __s32 bmv_unused2;
};
# 103 "../include/xfs/xfs_fs.h"
struct fsdmidata {
 __u32 fsd_dmevmask;
 __u16 fsd_padding;
 __u16 fsd_dmstate;
};






typedef struct xfs_flock64 {
 __s16 l_type;
 __s16 l_whence;
 __s64 l_start;
 __s64 l_len;
 __s32 l_sysid;
 __u32 l_pid;
 __s32 l_pad[4];
} xfs_flock64_t;




struct xfs_fsop_geom_v1 {
 __u32 blocksize;
 __u32 rtextsize;
 __u32 agblocks;
 __u32 agcount;
 __u32 logblocks;
 __u32 sectsize;
 __u32 inodesize;
 __u32 imaxpct;
 __u64 datablocks;
 __u64 rtblocks;
 __u64 rtextents;
 __u64 logstart;
 unsigned char uuid[16];
 __u32 sunit;
 __u32 swidth;
 __s32 version;
 __u32 flags;
 __u32 logsectsize;
 __u32 rtsectsize;
 __u32 dirblocksize;
};




struct xfs_fsop_geom_v4 {
 __u32 blocksize;
 __u32 rtextsize;
 __u32 agblocks;
 __u32 agcount;
 __u32 logblocks;
 __u32 sectsize;
 __u32 inodesize;
 __u32 imaxpct;
 __u64 datablocks;
 __u64 rtblocks;
 __u64 rtextents;
 __u64 logstart;
 unsigned char uuid[16];
 __u32 sunit;
 __u32 swidth;
 __s32 version;
 __u32 flags;
 __u32 logsectsize;
 __u32 rtsectsize;
 __u32 dirblocksize;
 __u32 logsunit;
};




struct xfs_fsop_geom {
 __u32 blocksize;
 __u32 rtextsize;
 __u32 agblocks;
 __u32 agcount;
 __u32 logblocks;
 __u32 sectsize;
 __u32 inodesize;
 __u32 imaxpct;
 __u64 datablocks;
 __u64 rtblocks;
 __u64 rtextents;
 __u64 logstart;
 unsigned char uuid[16];
 __u32 sunit;
 __u32 swidth;
 __s32 version;
 __u32 flags;
 __u32 logsectsize;
 __u32 rtsectsize;
 __u32 dirblocksize;
 __u32 logsunit;
 uint32_t sick;
 uint32_t checked;
 __u64 reserved[17];
};
# 215 "../include/xfs/xfs_fs.h"
typedef struct xfs_fsop_counts {
 __u64 freedata;
 __u64 freertx;
 __u64 freeino;
 __u64 allocino;
} xfs_fsop_counts_t;


typedef struct xfs_fsop_resblks {
 __u64 resblks;
 __u64 resblks_avail;
} xfs_fsop_resblks_t;
# 284 "../include/xfs/xfs_fs.h"
struct xfs_ag_geometry {
 uint32_t ag_number;
 uint32_t ag_length;
 uint32_t ag_freeblks;
 uint32_t ag_icount;
 uint32_t ag_ifree;
 uint32_t ag_sick;
 uint32_t ag_checked;
 uint32_t ag_flags;
 uint64_t ag_reserved[12];
};
# 309 "../include/xfs/xfs_fs.h"
typedef struct xfs_growfs_data {
 __u64 newblocks;
 __u32 imaxpct;
} xfs_growfs_data_t;

typedef struct xfs_growfs_log {
 __u32 newblocks;
 __u32 isint;
} xfs_growfs_log_t;

typedef struct xfs_growfs_rt {
 __u64 newblocks;
 __u32 extsize;
} xfs_growfs_rt_t;





typedef struct xfs_bstime {
 __kernel_long_t tv_sec;
 __s32 tv_nsec;
} xfs_bstime_t;

struct xfs_bstat {
 __u64 bs_ino;
 __u16 bs_mode;
 __u16 bs_nlink;
 __u32 bs_uid;
 __u32 bs_gid;
 __u32 bs_rdev;
 __s32 bs_blksize;
 __s64 bs_size;
 xfs_bstime_t bs_atime;
 xfs_bstime_t bs_mtime;
 xfs_bstime_t bs_ctime;
 int64_t bs_blocks;
 __u32 bs_xflags;
 __s32 bs_extsize;
 __s32 bs_extents;
 __u32 bs_gen;
 __u16 bs_projid_lo;

 __u16 bs_forkoff;
 __u16 bs_projid_hi;
 uint16_t bs_sick;
 uint16_t bs_checked;
 unsigned char bs_pad[2];
 __u32 bs_cowextsize;
 __u32 bs_dmevmask;
 __u16 bs_dmstate;
 __u16 bs_aextents;
};


struct xfs_bulkstat {
 uint64_t bs_ino;
 uint64_t bs_size;

 uint64_t bs_blocks;
 uint64_t bs_xflags;

 int64_t bs_atime;
 int64_t bs_mtime;

 int64_t bs_ctime;
 int64_t bs_btime;

 uint32_t bs_gen;
 uint32_t bs_uid;
 uint32_t bs_gid;
 uint32_t bs_projectid;

 uint32_t bs_atime_nsec;
 uint32_t bs_mtime_nsec;
 uint32_t bs_ctime_nsec;
 uint32_t bs_btime_nsec;

 uint32_t bs_blksize;
 uint32_t bs_rdev;
 uint32_t bs_cowextsize_blks;
 uint32_t bs_extsize_blks;

 uint32_t bs_nlink;
 uint32_t bs_extents;
 uint32_t bs_aextents;
 uint16_t bs_version;
 uint16_t bs_forkoff;

 uint16_t bs_sick;
 uint16_t bs_checked;
 uint16_t bs_mode;
 uint16_t bs_pad2;

 uint64_t bs_pad[7];
};
# 424 "../include/xfs/xfs_fs.h"
static inline uint32_t
bstat_get_projid(const struct xfs_bstat *bs)
{
 return (uint32_t)bs->bs_projid_hi << 16 | bs->bs_projid_lo;
}




struct xfs_fsop_bulkreq {
 __u64 *lastip;
 __s32 icount;
 void *ubuffer;
 __s32 *ocount;
};




struct xfs_inogrp {
 __u64 xi_startino;
 __s32 xi_alloccount;
 __u64 xi_allocmask;
};


struct xfs_inumbers {
 uint64_t xi_startino;
 uint64_t xi_allocmask;
 uint8_t xi_alloccount;
 uint8_t xi_version;
 uint8_t xi_padding[6];
};





struct xfs_bulk_ireq {
 uint64_t ino;
 uint32_t flags;
 uint32_t icount;
 uint32_t ocount;
 uint32_t agno;
 uint64_t reserved[5];
};
# 493 "../include/xfs/xfs_fs.h"
struct xfs_bulkstat_req {
 struct xfs_bulk_ireq hdr;
 struct xfs_bulkstat bulkstat[];
};



struct xfs_inumbers_req {
 struct xfs_bulk_ireq hdr;
 struct xfs_inumbers inumbers[];
};






typedef struct xfs_error_injection {
 __s32 fd;
 __s32 errtag;
} xfs_error_injection_t;






struct xfs_fs_eofblocks {
 __u32 eof_version;
 __u32 eof_flags;
 uid_t eof_uid;
 gid_t eof_gid;
 prid_t eof_prid;
 __u32 pad32;
 __u64 eof_min_file_size;
 __u64 pad64[12];
};
# 551 "../include/xfs/xfs_fs.h"
typedef struct xfs_fsop_handlereq {
 __u32 fd;
 void *path;
 __u32 oflags;
 void *ihandle;
 __u32 ihandlen;
 void *ohandle;
 __u32 *ohandlen;
} xfs_fsop_handlereq_t;
# 568 "../include/xfs/xfs_fs.h"
typedef struct xfs_fsop_setdm_handlereq {
 struct xfs_fsop_handlereq hreq;
 struct fsdmidata *data;
} xfs_fsop_setdm_handlereq_t;
# 583 "../include/xfs/xfs_fs.h"
typedef struct xfs_attrlist_cursor {
 __u32 opaque[4];
} xfs_attrlist_cursor_t;
# 596 "../include/xfs/xfs_fs.h"
struct xfs_attrlist {
 __s32 al_count;
 __s32 al_more;
 __s32 al_offset[1];
};

struct xfs_attrlist_ent {
 __u32 a_valuelen;
 char a_name[1];
};

typedef struct xfs_fsop_attrlist_handlereq {
 struct xfs_fsop_handlereq hreq;
 struct xfs_attrlist_cursor pos;
 __u32 flags;
 __u32 buflen;
 void *buffer;
} xfs_fsop_attrlist_handlereq_t;

typedef struct xfs_attr_multiop {
 __u32 am_opcode;



 __s32 am_error;
 void *am_attrname;
 void *am_attrvalue;
 __u32 am_length;
 __u32 am_flags;
} xfs_attr_multiop_t;

typedef struct xfs_fsop_attrmulti_handlereq {
 struct xfs_fsop_handlereq hreq;
 __u32 opcount;
 struct xfs_attr_multiop *ops;
} xfs_fsop_attrmulti_handlereq_t;




typedef struct { __u32 val[2]; } xfs_fsid_t;

typedef struct xfs_fid {
 __u16 fid_len;
 __u16 fid_pad;
 __u32 fid_gen;
 __u64 fid_ino;
} xfs_fid_t;

typedef struct xfs_handle {
 union {
  __s64 align;
  xfs_fsid_t _ha_fsid;
 } ha_u;
 xfs_fid_t ha_fid;
} xfs_handle_t;





typedef struct xfs_swapext
{
 int64_t sx_version;

 int64_t sx_fdtarget;
 int64_t sx_fdtmp;
 xfs_off_t sx_offset;
 xfs_off_t sx_length;
 char sx_pad[16];
 struct xfs_bstat sx_stat;
} xfs_swapext_t;
# 677 "../include/xfs/xfs_fs.h"
struct xfs_scrub_metadata {
 __u32 sm_type;
 __u32 sm_flags;
 __u64 sm_ino;
 __u32 sm_gen;
 __u32 sm_agno;
 __u64 sm_reserved[5];
};
# 59 "../include/xfs.h" 2
# 11 "../libfrog/projects.h" 2

extern int setprojid(const char *__name, int __fd, prid_t __id);
extern int getprojid(const char *__name, int __fd, prid_t *__id);

typedef struct fs_project {
 prid_t pr_prid;
 char *pr_name;
} fs_project_t;

extern void setprent(void);
extern void endprent(void);
extern fs_project_t *getprent(void);
extern fs_project_t *getprnam(char *__name);
extern fs_project_t *getprprid(prid_t __id);

typedef struct fs_project_path {
 prid_t pp_prid;
 char *pp_pathname;
} fs_project_path_t;

extern void setprpathent(void);
extern void endprpathent(void);
extern fs_project_path_t *getprpathent(void);

extern void setprfiles(void);
extern char *projid_file;
extern char *projects_file;
# 13 "../include/input.h" 2
# 1 "../libfrog/convert.h" 1
# 9 "../libfrog/convert.h"
extern int64_t cvt_s64(char *s, int base);
extern int32_t cvt_s32(char *s, int base);
extern int16_t cvt_s16(char *s, int base);

extern uint64_t cvt_u64(char *s, int base);
extern uint32_t cvt_u32(char *s, int base);
extern uint16_t cvt_u16(char *s, int base);

extern long long cvtnum(size_t blocksize, size_t sectorsize, const char *s);
extern void cvtstr(double value, char *str, size_t sz);
extern time64_t cvttime(char *s);

extern uid_t uid_from_string(char *user);
extern gid_t gid_from_string(char *group);
extern prid_t prid_from_string(char *project);
# 14 "../include/input.h" 2


extern char **breakline(char *input, int *count);
extern void doneline(char *input, char **vec);
extern char *fetchline(void);

extern size_t numlen(uint64_t val, size_t base);

extern struct timeval tsub(struct timeval t1, struct timeval t2);
extern double tdiv(double value, struct timeval tv);

enum {
 DEFAULT_TIME = 0x0,
 TERSE_FIXED_TIME = 0x1,
 VERBOSE_FIXED_TIME = 0x2
};

extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);

extern 
# 33 "../include/input.h" 3 4
      _Bool 
# 33 "../include/input.h"
           isdigits_only(const char *str);
extern int timespec_from_string(const char *sec, const char *nsec, struct timespec *ts);




# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ftw.h" 1 3 4
# 24 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ftw.h" 3 4

# 24 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/ftw.h" 3 4
struct FTW {
 int base;
 int level;
};

int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
# 40 "../include/input.h" 2
# 9 "mmap.c" 2
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/mman.h" 1 3 4
# 17 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/mman.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/alltypes.h" 1 3 4
# 18 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/mman.h" 2 3 4
# 114 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/mman.h" 3 4
# 1 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/bits/mman.h" 1 3 4
# 115 "/home/fainelli/work/buildroot/output/bmips/host/mipsel-buildroot-linux-musl/sysroot/usr/include/sys/mman.h" 2 3 4

void *mmap (void *, size_t, int, int, int, off_t);
int munmap (void *, size_t);

int mprotect (void *, size_t, int);
int msync (void *, size_t, int);

int posix_madvise (void *, size_t, int);

int mlock (const void *, size_t);
int munlock (const void *, size_t);
int mlockall (int);
int munlockall (void);


void *mremap (void *, size_t, size_t, int, ...);
int remap_file_pages (void *, size_t, int, size_t, int);
int memfd_create (const char *, unsigned);
int mlock2 (const void *, size_t, unsigned);



int madvise (void *, size_t, int);
int mincore (void *, size_t, unsigned char *);


int shm_open (const char *, int, mode_t);
int shm_unlink (const char *);
# 10 "mmap.c" 2

# 1 "init.h" 1
# 11 "init.h"

# 11 "init.h"
extern char *progname;
extern int exitcode;
extern int expert;
extern size_t pagesize;
extern struct timeval stopwatch;

extern void init_cvtnum(size_t *blocksize, size_t *sectsize);
# 12 "mmap.c" 2
# 1 "io.h" 1






# 1 "../libfrog/paths.h" 1
# 22 "../libfrog/paths.h"
typedef struct fs_path {
 char *fs_name;
 dev_t fs_datadev;
 char *fs_log;
 dev_t fs_logdev;
 char *fs_rt;
 dev_t fs_rtdev;
 char *fs_dir;
 uint fs_flags;
 uint fs_prid;
} fs_path_t;

extern int fs_count;
extern int xfs_fs_count;
extern fs_path_t *fs_table;
extern fs_path_t *fs_path;
extern char *mtab_file;

extern void fs_table_initialise(int, char *[], int, char *[]);
extern void fs_table_destroy(void);

extern void fs_table_insert_project_path(char *__dir, uint __projid);


extern fs_path_t *fs_table_lookup(const char *__dir, uint __flags);
extern fs_path_t *fs_table_lookup_mount(const char *__dir);
extern fs_path_t *fs_table_lookup_blkdev(const char *bdev);

typedef struct fs_cursor {
 uint count;
 uint index;
 uint flags;
 fs_path_t *table;
 fs_path_t local;
} fs_cursor_t;

extern void fs_cursor_initialise(char *__dir, uint __flags, fs_cursor_t *__cp);
extern fs_path_t *fs_cursor_next_entry(fs_cursor_t *__cp);
# 8 "io.h" 2
# 36 "io.h"
typedef struct fileio {
 int fd;
 int flags;
 char *name;
 struct xfs_fsop_geom geom;
 struct fs_path fs_path;
} fileio_t;

extern fileio_t *filetable;
extern int filecount;
extern fileio_t *file;
extern int filelist_f(void);
extern int stat_f(int argc, char **argv);



typedef struct mmap_region {
 void *addr;
 size_t length;
 
# 55 "io.h" 3 4
off_t 
# 55 "io.h"
         offset;
 int prot;
 
# 57 "io.h" 3 4
_Bool 
# 57 "io.h"
      map_sync;
 char *name;
} mmap_region_t;

extern mmap_region_t *maptable;
extern int mapcount;
extern mmap_region_t *mapping;
extern int maplist_f(void);
extern void *check_mapping_range(mmap_region_t *, 
# 65 "io.h" 3 4
                                                 off_t
# 65 "io.h"
                                                        , size_t, int);





extern 
# 71 "io.h" 3 4
      off_t 
# 71 "io.h"
               filesize(void);
extern int openfile(char *, struct xfs_fsop_geom *, int, mode_t,
     struct fs_path *);
extern int addfile(char *, int , struct xfs_fsop_geom *, int,
    struct fs_path *);
extern void printxattr(uint, int, int, const char *, int, int);

extern unsigned int recurse_all;
extern unsigned int recurse_dir;

extern void *io_buffer;
extern size_t io_buffersize;
extern int vectors;
extern struct iovec *iov;
extern int alloc_buffer(size_t, int, unsigned int);
extern int read_buffer(int, 
# 86 "io.h" 3 4
                            off_t
# 86 "io.h"
                                   , long long, long long *,
     int, int);
extern void dump_buffer(
# 88 "io.h" 3 4
                        off_t
# 88 "io.h"
                               , ssize_t);

extern void attr_init(void);
extern void bmap_init(void);
extern void encrypt_init(void);
extern void file_init(void);
extern void flink_init(void);
extern void freeze_init(void);
extern void fsync_init(void);
extern void getrusage_init(void);
extern void help_init(void);
extern void imap_init(void);
extern void inject_init(void);
extern void label_init(void);
extern void mmap_init(void);
extern void open_init(void);
extern void parent_init(void);
extern void pread_init(void);
extern void prealloc_init(void);
extern void pwrite_init(void);
extern void quit_init(void);
extern void resblks_init(void);
extern void seek_init(void);
extern void shutdown_init(void);
extern void stat_init(void);
extern void swapext_init(void);
extern void sync_init(void);
extern void truncate_init(void);
extern void utimes_init(void);


extern void fadvise_init(void);





extern void sendfile_init(void);





extern void madvise_init(void);





extern void mincore_init(void);





extern void fiemap_init(void);





extern void copy_range_init(void);





extern void sync_range_init(void);





extern void readdir_init(void);




extern void reflink_init(void);

extern void cowextsize_init(void);


extern void fsmap_init(void);
# 182 "io.h"
extern void scrub_init(void);
extern void repair_init(void);
extern void crc32cselftest_init(void);
extern void bulkstat_init(void);
# 13 "mmap.c" 2

static cmdinfo_t mmap_cmd;
static cmdinfo_t mread_cmd;
static cmdinfo_t msync_cmd;
static cmdinfo_t munmap_cmd;
static cmdinfo_t mwrite_cmd;

static cmdinfo_t mremap_cmd;


mmap_region_t *maptable;
int mapcount;
mmap_region_t *mapping;

static void
print_mapping(
 mmap_region_t *map,
 int index,
 int braces)
{
 char buffer[8] = { 0 };
 int i;

 static struct {
  int prot;
  int mode;
 } *p, pflags[] = {
  { 
# 40 "mmap.c" 3 4
   1
# 40 "mmap.c"
            , 'r' },
  { 
# 41 "mmap.c" 3 4
   2
# 41 "mmap.c"
             , 'w' },
  { 
# 42 "mmap.c" 3 4
   4
# 42 "mmap.c"
            , 'x' },
  { 
# 43 "mmap.c" 3 4
   0
# 43 "mmap.c"
            , 0 }
 };

 for (i = 0, p = pflags; p->prot != 
# 46 "mmap.c" 3 4
                                   0
# 46 "mmap.c"
                                            ; i++, p++)
  buffer[i] = (map->prot & p->prot) ? p->mode : '-';

 if (map->map_sync)
  sprintf(&buffer[i], " S");

 printf("%c%03d%c 0x%lx - 0x%lx %s  %14s (%lld : %ld)\n",
  braces? '[' : ' ', index, braces? ']' : ' ',
  (unsigned long)map->addr,
  (unsigned long)((char *)map->addr + map->length),
  buffer, map->name ? map->name : "???",
  (long long)map->offset, (long)map->length);
}

void *
check_mapping_range(
 mmap_region_t *map,
 
# 63 "mmap.c" 3 4
off_t 
# 63 "mmap.c"
         offset,
 size_t length,
 int pagealign)
{
 
# 67 "mmap.c" 3 4
off_t 
# 67 "mmap.c"
         relative;

 if (offset < mapping->offset) {
  printf(("offset (%lld) is before start of mapping (%lld)\n"),
   (long long)offset, (long long)mapping->offset);
  return 
# 72 "mmap.c" 3 4
        ((void*)0)
# 72 "mmap.c"
            ;
 }
 relative = offset - mapping->offset;
 if (relative > mapping->length) {
  printf(("offset (%lld) is beyond end of mapping (%lld)\n"),
   (long long)relative, (long long)mapping->offset);
  return 
# 78 "mmap.c" 3 4
        ((void*)0)
# 78 "mmap.c"
            ;
 }
 if ((relative + length) > (mapping->offset + mapping->length)) {
  printf(("range (%lld:%lld) is beyond mapping (%lld:%ld)\n"),
   (long long)offset, (long long)relative,
   (long long)mapping->offset, (long)mapping->length);
  return 
# 84 "mmap.c" 3 4
        ((void*)0)
# 84 "mmap.c"
            ;
 }
 if (pagealign && (long)((char *)mapping->addr + relative) % pagesize) {
  printf(("offset address (%p) is not page aligned\n"),
   (char *)mapping->addr + relative);
  return 
# 89 "mmap.c" 3 4
        ((void*)0)
# 89 "mmap.c"
            ;
 }

 return (char *)mapping->addr + relative;
}

int
maplist_f(void)
{
 int i;

 for (i = 0; i < mapcount; i++)
  print_mapping(&maptable[i], i, &maptable[i] == mapping);
 return 0;
}

static int
mapset_f(
 int argc,
 char **argv)
{
 int i;

 
# 112 "mmap.c" 3 4
((void)((
# 112 "mmap.c"
argc == 2
# 112 "mmap.c" 3 4
) || (__assert_fail(
# 112 "mmap.c"
"argc == 2"
# 112 "mmap.c" 3 4
, "mmap.c", 112, __func__),0)))
# 112 "mmap.c"
                 ;
 i = atoi(argv[1]);
 if (i < 0 || i >= mapcount) {
  printf("value %d is out of range (0-%d)\n", i, mapcount);
  exitcode = 1;
 } else {
  mapping = &maptable[i];
  maplist_f();
 }
 return 0;
}

static void
mmap_help(void)
{
 printf(("\n" " maps a range within the current file into memory\n" "\n" " Example:\n" " 'mmap -rw 0 1m' - maps one megabyte from the start of the current file\n" "\n" " Memory maps a range of a file for subsequent use by other xfs_io commands.\n" " With no arguments, mmap shows the current mappings.  The current mapping\n" " can be set by using the single argument form (mapping number or address).\n" " If two arguments are specified (a range), a new mapping is created and the\n" " following options are available:\n" " -r -- map with PROT_READ protection\n" " -w -- map with PROT_WRITE protection\n" " -x -- map with PROT_EXEC protection\n" " -S -- map with MAP_SYNC and MAP_SHARED_VALIDATE flags\n" " -s <size> -- first do mmap(size)/munmap(size), try to reserve some free space\n" " If no protection mode is specified, all are used by default.\n" "\n")
# 145 "mmap.c"
     );
}

static int
mmap_f(
 int argc,
 char **argv)
{
 
# 153 "mmap.c" 3 4
off_t 
# 153 "mmap.c"
         offset;
 ssize_t length = 0, length2 = 0;
 void *address = 
# 155 "mmap.c" 3 4
                 ((void*)0)
# 155 "mmap.c"
                     ;
 char *filename;
 size_t blocksize, sectsize;
 int c, prot = 0, flags = 
# 158 "mmap.c" 3 4
                          0x01
# 158 "mmap.c"
                                    ;

 if (argc == 1) {
  if (mapping)
   return maplist_f();
  fprintf(
# 163 "mmap.c" 3 4
         (stderr)
# 163 "mmap.c"
               , file ?
   ("no mapped regions, try 'help mmap'\n") :
   ("no files are open, try 'help open'\n"));
  exitcode = 1;
  return 0;
 } else if (argc == 2) {
  if (mapping)
   return mapset_f(argc, argv);
  fprintf(
# 171 "mmap.c" 3 4
         (stderr)
# 171 "mmap.c"
               , file ?
   ("no mapped regions, try 'help mmap'\n") :
   ("no files are open, try 'help open'\n"));
  exitcode = 1;
  return 0;
 } else if (!file) {
  fprintf(
# 177 "mmap.c" 3 4
         (stderr)
# 177 "mmap.c"
               , ("no files are open, try 'help open'\n"));
  exitcode = 1;
  return 0;
 }

 init_cvtnum(&blocksize, &sectsize);

 while ((c = getopt(argc, argv, "rwxSs:")) != 
# 184 "mmap.c" 3 4
                                             (-1)
# 184 "mmap.c"
                                                ) {
  switch (c) {
  case 'r':
   prot |= 
# 187 "mmap.c" 3 4
          1
# 187 "mmap.c"
                   ;
   break;
  case 'w':
   prot |= 
# 190 "mmap.c" 3 4
          2
# 190 "mmap.c"
                    ;
   break;
  case 'x':
   prot |= 
# 193 "mmap.c" 3 4
          4
# 193 "mmap.c"
                   ;
   break;
  case 'S':
   flags = MAP_SYNC | 
# 196 "mmap.c" 3 4
                     0x03
# 196 "mmap.c"
                                        ;






   if (!flags) {
    printf("MAP_SYNC not supported\n");
    return 0;
   }
   break;
  case 's':
   length2 = cvtnum(blocksize, sectsize, optarg);
   break;
  default:
   exitcode = 1;
   return command_usage(&mmap_cmd);
  }
 }
 if (!prot)
  prot = 
# 217 "mmap.c" 3 4
        1 
# 217 "mmap.c"
                  | 
# 217 "mmap.c" 3 4
                    2 
# 217 "mmap.c"
                               | 
# 217 "mmap.c" 3 4
                                 4
# 217 "mmap.c"
                                          ;

 if (optind != argc - 2) {
  exitcode = 1;
  return command_usage(&mmap_cmd);
 }

 offset = cvtnum(blocksize, sectsize, argv[optind]);
 if (offset < 0) {
  printf(("non-numeric offset argument -- %s\n"), argv[optind]);
  exitcode = 1;
  return 0;
 }
 optind++;
 length = cvtnum(blocksize, sectsize, argv[optind]);
 if (length < 0) {
  printf(("non-numeric length argument -- %s\n"), argv[optind]);
  exitcode = 1;
  return 0;
 }

 filename = strdup(file->name);
 if (!filename) {
  perror("strdup");
  exitcode = 1;
  return 0;
 }
# 252 "mmap.c"
 if (length2 > length) {
  address = mmap(
# 253 "mmap.c" 3 4
                ((void*)0)
# 253 "mmap.c"
                    , length2, prot,
                 
# 254 "mmap.c" 3 4
                0x02 
# 254 "mmap.c"
                            | 
# 254 "mmap.c" 3 4
                              0x800
# 254 "mmap.c"
                                           , -1, 0);
  munmap(address, length2);
 }
 address = mmap(address, length, prot, flags, file->fd, offset);
 if (address == 
# 258 "mmap.c" 3 4
               ((void *) -1)
# 258 "mmap.c"
                         ) {
  perror("mmap");
  free(filename);
  exitcode = 1;
  return 0;
 }


 maptable = (mmap_region_t *)realloc(maptable,
     ++mapcount * sizeof(mmap_region_t));
 if (!maptable) {
  perror("realloc");
  mapcount = 0;
  munmap(address, length);
  free(filename);
  exitcode = 1;
  return 0;
 }


 mapping = &maptable[mapcount - 1];
 mapping->addr = address;
 mapping->length = length;
 mapping->offset = offset;
 mapping->name = filename;
 mapping->prot = prot;
 mapping->map_sync = (flags == (MAP_SYNC | 
# 284 "mmap.c" 3 4
                                          0x03
# 284 "mmap.c"
                                                             ));
 return 0;
}

static void
msync_help(void)
{
 printf(("\n" " flushes a range of bytes in the current memory mapping\n" "\n" " Writes all modified copies of pages over the specified range (or entire\n" " mapping if no range specified) to their backing storage locations.  Also,\n" " optionally invalidates so that subsequent references to the pages will be\n" " obtained from their backing storage locations (instead of cached copies).\n" " -a -- perform asynchronous writes (MS_ASYNC)\n" " -i -- invalidate mapped pages (MS_INVALIDATE)\n" " -s -- perform synchronous writes (MS_SYNC)\n" "\n")
# 302 "mmap.c"
     );
}

static int
msync_f(
 int argc,
 char **argv)
{
 
# 310 "mmap.c" 3 4
off_t 
# 310 "mmap.c"
         offset;
 ssize_t length;
 void *start;
 int c, flags = 0;
 size_t blocksize, sectsize;

 while ((c = getopt(argc, argv, "ais")) != 
# 316 "mmap.c" 3 4
                                          (-1)
# 316 "mmap.c"
                                             ) {
  switch (c) {
  case 'a':
   flags |= 
# 319 "mmap.c" 3 4
           1
# 319 "mmap.c"
                   ;
   break;
  case 'i':
   flags |= 
# 322 "mmap.c" 3 4
           2
# 322 "mmap.c"
                        ;
   break;
  case 's':
   flags |= 
# 325 "mmap.c" 3 4
           4
# 325 "mmap.c"
                  ;
   break;
  default:
   exitcode = 1;
   return command_usage(&msync_cmd);
  }
 }

 if (optind == argc) {
  offset = mapping->offset;
  length = mapping->length;
 } else if (optind == argc - 2) {
  init_cvtnum(&blocksize, &sectsize);
  offset = cvtnum(blocksize, sectsize, argv[optind]);
  if (offset < 0) {
   printf(("non-numeric offset argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
  optind++;
  length = cvtnum(blocksize, sectsize, argv[optind]);
  if (length < 0) {
   printf(("non-numeric length argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
 } else {
  exitcode = 1;
  return command_usage(&msync_cmd);
 }

 start = check_mapping_range(mapping, offset, length, 1);
 if (!start) {
  exitcode = 1;
  return 0;
 }

 if (msync(start, length, flags) < 0) {
  perror("msync");
  exitcode = 1;
  return 0;
 }

 return 0;
}

static void
mread_help(void)
{
 printf(("\n" " reads a range of bytes in the current memory mapping\n" "\n" " Example:\n" " 'mread -v 512 20' - dumps 20 bytes read from 512 bytes into the mapping\n" "\n" " Accesses a range of the current memory mapping, optionally dumping it to\n" " the standard output stream (with -v option) for subsequent inspection.\n" " -f -- verbose mode, dump bytes with offsets relative to start of file.\n" " -r -- reverse order; start accessing from the end of range, moving backward\n" " -v -- verbose mode, dump bytes with offsets relative to start of mapping.\n" " The accesses are performed sequentially from the start offset by default.\n" " Notes:\n" "   References to whole pages following the end of the backing file results\n" "   in delivery of the SIGBUS signal.  SIGBUS signals may also be delivered\n" "   on various filesystem conditions, including quota exceeded errors, and\n" "   for physical device errors (such as unreadable disk blocks).  No attempt\n" "   has been made to catch signals at this stage...\n" "\n")
# 395 "mmap.c"
     );
}

static int
mread_f(
 int argc,
 char **argv)
{
 
# 403 "mmap.c" 3 4
off_t 
# 403 "mmap.c"
         offset, tmp, dumpoffset, printoffset;
 ssize_t length;
 size_t dumplen, cnt = 0;
 char *bp;
 void *start;
 int dump = 0, rflag = 0, c;
 size_t blocksize, sectsize;

 while ((c = getopt(argc, argv, "frv")) != 
# 411 "mmap.c" 3 4
                                          (-1)
# 411 "mmap.c"
                                             ) {
  switch (c) {
  case 'f':
   dump = 2;
   break;
  case 'r':
   rflag = 1;
   break;
  case 'v':
   dump = 1;
   break;
  default:
   exitcode = 1;
   return command_usage(&mread_cmd);
  }
 }

 if (optind == argc) {
  offset = mapping->offset;
  length = mapping->length;
 } else if (optind == argc - 2) {
  init_cvtnum(&blocksize, &sectsize);
  offset = cvtnum(blocksize, sectsize, argv[optind]);
  if (offset < 0) {
   printf(("non-numeric offset argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
  optind++;
  length = cvtnum(blocksize, sectsize, argv[optind]);
  if (length < 0) {
   printf(("non-numeric length argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
 } else {
  return command_usage(&mread_cmd);
 }

 start = check_mapping_range(mapping, offset, length, 0);
 if (!start) {
  exitcode = 1;
  return 0;
 }
 dumpoffset = offset - mapping->offset;
 if (dump == 2)
  printoffset = offset;
 else
  printoffset = dumpoffset;

 if (alloc_buffer(pagesize, 0, 0) < 0) {
  exitcode = 1;
  return 0;
 }
 bp = (char *)io_buffer;

 dumplen = length % pagesize;
 if (!dumplen)
  dumplen = pagesize;

 if (rflag) {
  for (tmp = length - 1, c = 0; tmp >= 0; tmp--, c = 1) {
   *bp = *(((char *)mapping->addr) + dumpoffset + tmp);
   cnt++;
   if (c && cnt == dumplen) {
    if (dump) {
     dump_buffer(printoffset, dumplen);
     printoffset += dumplen;
    }
    bp = (char *)io_buffer;
    dumplen = pagesize;
    cnt = 0;
   } else {
    bp++;
   }
  }
 } else {
  for (tmp = 0, c = 0; tmp < length; tmp++, c = 1) {
   *bp = *(((char *)mapping->addr) + dumpoffset + tmp);
   cnt++;
   if (c && cnt == dumplen) {
    if (dump)
     dump_buffer(printoffset + tmp -
      (dumplen - 1), dumplen);
    bp = (char *)io_buffer;
    dumplen = pagesize;
    cnt = 0;
   } else {
    bp++;
   }
  }
 }
 return 0;
}

static int
munmap_f(
 int argc,
 char **argv)
{
 ssize_t length;
 unsigned int offset;

 if (munmap(mapping->addr, mapping->length) < 0) {
  perror("munmap");
  exitcode = 1;
  return 0;
 }
 free(mapping->name);


 offset = mapping - &maptable[0];
 length = mapcount * sizeof(mmap_region_t);
 length -= (offset + 1) * sizeof(mmap_region_t);
 if (length)
  memmove(mapping, mapping + 1, length);


 if (--mapcount) {
  maptable = (mmap_region_t *)realloc(maptable,
     mapcount * sizeof(mmap_region_t));
  if (offset == mapcount)
   offset--;
  mapping = maptable + offset;
 } else {
  free(maptable);
  mapping = maptable = 
# 539 "mmap.c" 3 4
                      ((void*)0)
# 539 "mmap.c"
                          ;
 }
 maplist_f();
 return 0;
}

static void
mwrite_help(void)
{
 printf(("\n" " dirties a range of bytes in the current memory mapping\n" "\n" " Example:\n" " 'mwrite 512 20 - writes 20 bytes at 512 bytes into the current mapping.\n" "\n" " Stores a byte into memory for a range within a mapping.\n" " The default stored value is 'X', repeated to fill the range specified.\n" " -S -- use an alternate seed character\n" " -r -- reverse order; start storing from the end of range, moving backward\n" " The stores are performed sequentially from the start offset by default.\n" "\n")
# 560 "mmap.c"
     );
}

static int
mwrite_f(
 int argc,
 char **argv)
{
 
# 568 "mmap.c" 3 4
off_t 
# 568 "mmap.c"
         offset, tmp;
 ssize_t length;
 void *start;
 char *sp;
 int seed = 'X';
 int rflag = 0;
 int c;
 size_t blocksize, sectsize;

 while ((c = getopt(argc, argv, "rS:")) != 
# 577 "mmap.c" 3 4
                                          (-1)
# 577 "mmap.c"
                                             ) {
  switch (c) {
  case 'r':
   rflag = 1;
   break;
  case 'S':
   seed = (int)strtol(optarg, &sp, 0);
   if (!sp || sp == optarg) {
    printf(("non-numeric seed -- %s\n"), optarg);
    return 0;
   }
   break;
  default:
   exitcode = 1;
   return command_usage(&mwrite_cmd);
  }
 }

 if (optind == argc) {
  offset = mapping->offset;
  length = mapping->length;
 } else if (optind == argc - 2) {
  init_cvtnum(&blocksize, &sectsize);
  offset = cvtnum(blocksize, sectsize, argv[optind]);
  if (offset < 0) {
   printf(("non-numeric offset argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
  optind++;
  length = cvtnum(blocksize, sectsize, argv[optind]);
  if (length < 0) {
   printf(("non-numeric length argument -- %s\n"),
    argv[optind]);
   exitcode = 1;
   return 0;
  }
 } else {
  exitcode = 1;
  return command_usage(&mwrite_cmd);
 }

 start = check_mapping_range(mapping, offset, length, 0);
 if (!start) {
  exitcode = 1;
  return 0;
 }

 offset -= mapping->offset;
 if (rflag) {
  for (tmp = offset + length -1; tmp >= offset; tmp--)
   ((char *)mapping->addr)[tmp] = seed;
 } else {
  for (tmp = offset; tmp < offset + length; tmp++)
   ((char *)mapping->addr)[tmp] = seed;
 }

 return 0;
}


static void
mremap_help(void)
{
 printf(("\n" " resizes the current memory mapping\n" "\n" " Examples:\n" " 'mremap 8192' - resizes the current mapping to 8192 bytes.\n" "\n" " Resizes the mapping, growing or shrinking from the current size.\n" " The default stored value is 'X', repeated to fill the range specified.\n" " -f <new_address> -- use MREMAP_FIXED flag to mremap on new_address\n" " -m -- use the MREMAP_MAYMOVE flag\n" "\n")
# 653 "mmap.c"
     );
}

static int
mremap_f(
 int argc,
 char **argv)
{
 ssize_t new_length;
 void *new_addr = 
# 662 "mmap.c" 3 4
                  ((void*)0)
# 662 "mmap.c"
                      ;
 int flags = 0;
 int c;
 size_t blocksize, sectsize;

 init_cvtnum(&blocksize, &sectsize);

 while ((c = getopt(argc, argv, "f:m")) != 
# 669 "mmap.c" 3 4
                                          (-1)
# 669 "mmap.c"
                                             ) {
  switch (c) {
  case 'f':
   flags = 
# 672 "mmap.c" 3 4
          2
# 672 "mmap.c"
                      |
# 672 "mmap.c" 3 4
                       1
# 672 "mmap.c"
                                     ;
   new_addr = (void *)(unsigned long)cvtnum(blocksize,
                             sectsize, optarg);
   break;
  case 'm':
   flags = 
# 677 "mmap.c" 3 4
          1
# 677 "mmap.c"
                        ;
   break;
  default:
   exitcode = 1;
   return command_usage(&mremap_cmd);
  }
 }

 if (optind != argc - 1) {
  exitcode = 1;
  return command_usage(&mremap_cmd);
 }

 new_length = cvtnum(blocksize, sectsize, argv[optind]);
 if (new_length < 0) {
  printf(("non-numeric offset argument -- %s\n"),
   argv[optind]);
  exitcode = 1;
  return 0;
 }

 if (!new_addr)
  new_addr = mremap(mapping->addr, mapping->length,
                    new_length, flags);
 else
  new_addr = mremap(mapping->addr, mapping->length,
                    new_length, flags, new_addr);
 if (new_addr == 
# 704 "mmap.c" 3 4
                ((void *) -1)
# 704 "mmap.c"
                          ) {
  perror("mremap");
  exitcode = 1;
  return 0;
 }

 mapping->addr = new_addr;
 mapping->length = new_length;
 return 0;
}


void
mmap_init(void)
{
 mmap_cmd.name = "mmap";
 mmap_cmd.altname = "mm";
 mmap_cmd.cfunc = mmap_f;
 mmap_cmd.argmin = 0;
 mmap_cmd.argmax = -1;
 mmap_cmd.flags = (1<<1) | (1<<0) |
    (1u << 30) | (1u << 31);
 mmap_cmd.args = ("[N] | [-rwxS] [-s size] [off len]");
 mmap_cmd.oneline =
  ("mmap a range in the current file, show mappings");
 mmap_cmd.help = mmap_help;

 mread_cmd.name = "mread";
 mread_cmd.altname = "mr";
 mread_cmd.cfunc = mread_f;
 mread_cmd.argmin = 0;
 mread_cmd.argmax = -1;
 mread_cmd.flags = (1<<0) | (1u << 30);
 mread_cmd.args = ("[-r] [off len]");
 mread_cmd.oneline =
  ("reads data from a region in the current memory mapping");
 mread_cmd.help = mread_help;

 msync_cmd.name = "msync";
 msync_cmd.altname = "ms";
 msync_cmd.cfunc = msync_f;
 msync_cmd.argmin = 0;
 msync_cmd.argmax = -1;
 msync_cmd.flags = (1<<0) | (1u << 30);
 msync_cmd.args = ("[-ais] [off len]");
 msync_cmd.oneline = ("flush a region in the current memory mapping");
 msync_cmd.help = msync_help;

 munmap_cmd.name = "munmap";
 munmap_cmd.altname = "mu";
 munmap_cmd.cfunc = munmap_f;
 munmap_cmd.argmin = 0;
 munmap_cmd.argmax = 0;
 munmap_cmd.flags = (1<<0) | (1u << 30);
 munmap_cmd.oneline = ("unmaps the current memory mapping");

 mwrite_cmd.name = "mwrite";
 mwrite_cmd.altname = "mw";
 mwrite_cmd.cfunc = mwrite_f;
 mwrite_cmd.argmin = 0;
 mwrite_cmd.argmax = -1;
 mwrite_cmd.flags = (1<<0) | (1u << 30);
 mwrite_cmd.args = ("[-r] [-S seed] [off len]");
 mwrite_cmd.oneline =
  ("writes data into a region in the current memory mapping");
 mwrite_cmd.help = mwrite_help;


 mremap_cmd.name = "mremap";
 mremap_cmd.altname = "mrm";
 mremap_cmd.cfunc = mremap_f;
 mremap_cmd.argmin = 1;
 mremap_cmd.argmax = 3;
 mremap_cmd.flags = (1<<0) | (1u << 30);
 mremap_cmd.args = ("[-m|-f <new_address>] newsize");
 mremap_cmd.oneline =
  ("alters the size of the current memory mapping");
 mremap_cmd.help = mremap_help;


 add_command(&mmap_cmd);
 add_command(&mread_cmd);
 add_command(&msync_cmd);
 add_command(&munmap_cmd);
 add_command(&mwrite_cmd);

 add_command(&mremap_cmd);

}

[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux