[Date Prev][
Date Next][Thread Prev][
Thread Next][
Date Index][
Thread Index]
[BUG REPORT] arm-gcc 3.4.0 internal compiler error
- To: arm-gcc@xxxxxxxxxxxxxxxx
- Subject: [BUG REPORT] arm-gcc 3.4.0 internal compiler error
- From: Catalin Marinas <catalin.marinas@xxxxxxx>
- Date: Fri, 30 Jan 2004 14:03:49 +0000
Hello,
While trying to build the sound subsystem in the 2.6.0-rmk2 Linux kernel
I get an internal compiler error. I use the gcc provided on your website
(i686-pc-linux-gnu-2003-q4.tar.gz) on a Debian Linux box.
You can find attached the build command, the error generated by the
compiler and the pre-processed source of the pcm_plugin.c file. There
are also some warning in the error file but I don't care about them (the
kernel should be fixed).
Thanks,
Catalin
--
Catalin Marinas
Software Engineer - IP Products Division
ARM Ltd - 110 Fulbourn Road, Cambridge, CB1 9NJ, UK
Tel: +44 1223 400583, Fax: +44 1223 400410
This e-mail message is intended for the addressee(s) only and may
contain information that is the property of, and/or subject to a
confidentiality agreement between the intended recipient(s), their
organisation and/or the ARM Group of Companies. If you are not an
intended recipient of this e-mail message, you should not read, copy,
forward or otherwise distribute or further disclose the information in
it; misuse of the contents of this e-mail message may violate various
laws in your state, country or jurisdiction. If you have received this
e-mail message in error, please contact the originator of this e-mail
message via e-mail and delete all copies of this message from your
computer or network, thank you.
/usr/local/arm/gnu/release/bin/arm-none-elf-gcc -Wp,-MD,sound/core/oss/.pcm_plugin.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Dlinux -D__linux__ -D__KERNEL__ -Iinclude -Dlinux -D__linux__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mapcs-32 -D__LINUX_ARM_ARCH__=6 -march=armv5t -Wa,-march=armv6 -mtune=strongarm -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm -g -Wdeclaration-after-statement -DKBUILD_BASENAME=pcm_plugin -DKBUILD_MODNAME=snd_pcm_oss -c pcm_plugin.c
In file included from include/linux/dcache.h:10,
from include/linux/fs.h:17,
from include/linux/mm.h:14,
from include/asm/dma-mapping.h:7,
from include/linux/dma-mapping.h:13,
from include/asm/pci.h:6,
from include/linux/pci.h:710,
from include/sound/memalloc.h:27,
from include/sound/pcm.h:27,
from sound/core/oss/pcm_plugin.c:32:
include/linux/rcupdate.h: In function `rcu_pending':
include/linux/rcupdate.h:114: warning: use of compound expressions as lvalues is deprecated
include/linux/rcupdate.h:116: warning: use of compound expressions as lvalues is deprecated
include/linux/rcupdate.h:117: warning: use of compound expressions as lvalues is deprecated
sound/core/oss/pcm_plugin.c: In function `snd_pcm_area_silence':
sound/core/oss/pcm_plugin.c:862: warning: use of cast expressions as lvalues is deprecated
sound/core/oss/pcm_plugin.c: In function `snd_pcm_plug_playback_channels_mask':
sound/core/oss/pcm_plugin.c:34: internal compiler error: in loc_descriptor_from_tree, at dwarf2out.c:8800
Please submit a full bug report,
with preprocessed source if appropriate.
Send email to arm-gcc@xxxxxxxxxxxxxxxx for instructions.
# 1 "<built-in>"
# 1 "<command line>"
# 1 "sound/core/oss/pcm_plugin.c"
# 27 "sound/core/oss/pcm_plugin.c"
# 1 "include/sound/driver.h" 1
# 29 "include/sound/driver.h"
# 1 "include/linux/config.h" 1
# 1 "include/linux/autoconf.h" 1
# 5 "include/linux/config.h" 2
# 30 "include/sound/driver.h" 2
# 45 "include/sound/driver.h"
# 1 "include/linux/module.h" 1
# 10 "include/linux/module.h"
# 1 "include/linux/sched.h" 1
# 1 "include/asm/param.h" 1
# 13 "include/asm/param.h"
# 1 "include/asm/arch/param.h" 1
# 14 "include/asm/param.h" 2
# 5 "include/linux/sched.h" 2
# 1 "include/linux/capability.h" 1
# 16 "include/linux/capability.h"
# 1 "include/linux/types.h" 1
# 15 "include/linux/types.h"
# 1 "include/linux/posix_types.h" 1
# 1 "include/linux/stddef.h" 1
# 5 "include/linux/posix_types.h" 2
# 36 "include/linux/posix_types.h"
typedef struct {
unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))];
} __kernel_fd_set;
typedef void (*__kernel_sighandler_t)(int);
typedef int __kernel_key_t;
# 1 "include/asm/posix_types.h" 1
# 22 "include/asm/posix_types.h"
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef unsigned short __kernel_old_dev_t;
typedef long long __kernel_loff_t;
typedef struct {
int val[2];
} __kernel_fsid_t;
# 47 "include/linux/posix_types.h" 2
# 16 "include/linux/types.h" 2
# 1 "include/asm/types.h" 1
typedef unsigned short umode_t;
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
# 38 "include/asm/types.h"
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
typedef u32 dma_addr_t;
typedef u32 dma64_addr_t;
# 17 "include/linux/types.h" 2
typedef __u32 __kernel_dev_t;
typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
typedef __kernel_nlink_t nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;
typedef __kernel_old_uid_t old_uid_t;
typedef __kernel_old_gid_t old_gid_t;
# 56 "include/linux/types.h"
typedef __kernel_loff_t loff_t;
# 65 "include/linux/types.h"
typedef __kernel_size_t size_t;
typedef __kernel_ssize_t ssize_t;
typedef __kernel_ptrdiff_t ptrdiff_t;
typedef __kernel_time_t time_t;
typedef __kernel_clock_t clock_t;
typedef __kernel_caddr_t caddr_t;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef __u8 u_int8_t;
typedef __s8 int8_t;
typedef __u16 u_int16_t;
typedef __s16 int16_t;
typedef __u32 u_int32_t;
typedef __s32 int32_t;
typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;
typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef __s64 int64_t;
# 133 "include/linux/types.h"
typedef unsigned long sector_t;
# 151 "include/linux/types.h"
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
char f_fname[6];
char f_fpack[6];
};
# 17 "include/linux/capability.h" 2
# 1 "include/linux/compiler.h" 1
# 16 "include/linux/compiler.h"
# 1 "include/linux/compiler-gcc3.h" 1
# 1 "include/linux/compiler-gcc.h" 1
# 5 "include/linux/compiler-gcc3.h" 2
# 17 "include/linux/compiler.h" 2
# 18 "include/linux/capability.h" 2
# 32 "include/linux/capability.h"
typedef struct __user_cap_header_struct {
__u32 version;
int pid;
} *cap_user_header_t;
typedef struct __user_cap_data_struct {
__u32 effective;
__u32 permitted;
__u32 inheritable;
} *cap_user_data_t;
# 1 "include/linux/spinlock.h" 1
# 9 "include/linux/spinlock.h"
# 1 "include/linux/preempt.h" 1
# 10 "include/linux/spinlock.h" 2
# 1 "include/linux/linkage.h" 1
# 1 "include/asm/linkage.h" 1
# 6 "include/linux/linkage.h" 2
# 11 "include/linux/spinlock.h" 2
# 1 "include/linux/thread_info.h" 1
# 13 "include/linux/thread_info.h"
struct restart_block {
long (*fn)(struct restart_block *);
unsigned long arg0, arg1, arg2, arg3;
};
extern long do_no_restart_syscall(struct restart_block *parm);
# 1 "include/linux/bitops.h" 1
# 1 "include/asm/bitops.h" 1
# 22 "include/asm/bitops.h"
# 1 "include/asm/system.h" 1
# 47 "include/asm/system.h"
# 1 "include/linux/kernel.h" 1
# 10 "include/linux/kernel.h"
# 1 "/usr/local/arm/gnu/release-2003-q4/bin/../lib/gcc/arm-none-elf/3.4.0/include/stdarg.h" 1 3 4
# 43 "/usr/local/arm/gnu/release-2003-q4/bin/../lib/gcc/arm-none-elf/3.4.0/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 "/usr/local/arm/gnu/release-2003-q4/bin/../lib/gcc/arm-none-elf/3.4.0/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 11 "include/linux/kernel.h" 2
# 1 "include/asm/byteorder.h" 1
# 29 "include/asm/byteorder.h"
# 1 "include/linux/byteorder/little_endian.h" 1
# 11 "include/linux/byteorder/little_endian.h"
# 1 "include/linux/byteorder/swab.h" 1
# 131 "include/linux/byteorder/swab.h"
static __inline__ __attribute__((always_inline)) __const__ __u16 __fswab16(__u16 x)
{
return ({ __u16 __tmp = (x) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
}
static __inline__ __attribute__((always_inline)) __u16 __swab16p(__u16 *x)
{
return ({ __u16 __tmp = (*(x)) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); });
}
static __inline__ __attribute__((always_inline)) void __swab16s(__u16 *addr)
{
do { *(addr) = ({ __u16 __tmp = (*((addr))) ; ({ __u16 __x = (__tmp); ((__u16)( (((__u16)(__x) & (__u16)0x00ffU) << 8) | (((__u16)(__x) & (__u16)0xff00U) >> 8) )); }); }); } while (0);
}
static __inline__ __attribute__((always_inline)) __const__ __u32 __fswab32(__u32 x)
{
return ({ __u32 __tmp = (x) ; ({ __u32 __x = (__tmp); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }); });
}
static __inline__ __attribute__((always_inline)) __u32 __swab32p(__u32 *x)
{
return ({ __u32 __tmp = (*(x)) ; ({ __u32 __x = (__tmp); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }); });
}
static __inline__ __attribute__((always_inline)) void __swab32s(__u32 *addr)
{
do { *(addr) = ({ __u32 __tmp = (*((addr))) ; ({ __u32 __x = (__tmp); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }); }); } while (0);
}
static __inline__ __attribute__((always_inline)) __const__ __u64 __fswab64(__u64 x)
{
__u32 h = x >> 32;
__u32 l = x & ((1ULL<<32)-1);
return (((__u64)(__builtin_constant_p((__u32)(l)) ? ({ __u32 __x = ((l)); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) : __fswab32((l)))) << 32) | ((__u64)((__builtin_constant_p((__u32)(h)) ? ({ __u32 __x = ((h)); ((__u32)( (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); }) : __fswab32((h)))));
}
static __inline__ __attribute__((always_inline)) __u64 __swab64p(__u64 *x)
{
return ({ __u64 __tmp = (*(x)) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); });
}
static __inline__ __attribute__((always_inline)) void __swab64s(__u64 *addr)
{
do { *(addr) = ({ __u64 __tmp = (*((addr))) ; ({ __u64 __x = (__tmp); ((__u64)( (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); }); }); } while (0);
}
# 12 "include/linux/byteorder/little_endian.h" 2
# 66 "include/linux/byteorder/little_endian.h"
# 1 "include/linux/byteorder/generic.h" 1
# 150 "include/linux/byteorder/generic.h"
extern __u32 ntohl(__u32);
extern __u32 htonl(__u32);
extern unsigned short int ntohs(unsigned short int);
extern unsigned short int htons(unsigned short int);
# 67 "include/linux/byteorder/little_endian.h" 2
# 30 "include/asm/byteorder.h" 2
# 16 "include/linux/kernel.h" 2
# 1 "include/asm/bug.h" 1
extern volatile void __bug(const char *file, int line, void *data);
# 17 "include/linux/kernel.h" 2
# 39 "include/linux/kernel.h"
extern int console_printk[];
struct completion;
# 57 "include/linux/kernel.h"
extern struct notifier_block *panic_notifier_list;
void panic(const char * fmt, ...)
__attribute__ ((noreturn, format (printf, 1, 2)));
void do_exit(long error_code)
__attribute__((noreturn));
void complete_and_exit(struct completion *, long)
__attribute__((noreturn));
extern int abs(int);
extern unsigned long simple_strtoul(const char *,char **,unsigned int);
extern long simple_strtol(const char *,char **,unsigned int);
extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
extern long long simple_strtoll(const char *,char **,unsigned int);
extern int sprintf(char * buf, const char * fmt, ...)
__attribute__ ((format (printf, 2, 3)));
extern int vsprintf(char *buf, const char *, va_list);
extern int snprintf(char * buf, size_t size, const char * fmt, ...)
__attribute__ ((format (printf, 3, 4)));
extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
extern int sscanf(const char *, const char *, ...)
__attribute__ ((format (scanf,2,3)));
extern int vsscanf(const char *, const char *, va_list);
extern int get_option(char **str, int *pint);
extern char *get_options(const char *str, int nints, int *ints);
extern unsigned long long memparse(char *ptr, char **retptr);
extern int kernel_text_address(unsigned long addr);
extern int session_of_pgrp(int pgrp);
int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void console_silent(void)
{
(console_printk[0]) = 0;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void console_verbose(void)
{
if ((console_printk[0]))
(console_printk[0]) = 15;
}
extern void bust_spinlocks(int yes);
extern int oops_in_progress;
extern int panic_on_oops;
extern int system_running;
extern int tainted;
extern const char *print_tainted(void);
extern void dump_stack(void);
# 212 "include/linux/kernel.h"
struct sysinfo {
long uptime;
unsigned long loads[3];
unsigned long totalram;
unsigned long freeram;
unsigned long sharedram;
unsigned long bufferram;
unsigned long totalswap;
unsigned long freeswap;
unsigned short procs;
unsigned short pad;
unsigned long totalhigh;
unsigned long freehigh;
unsigned int mem_unit;
char _f[20-2*sizeof(long)-sizeof(int)];
};
extern void BUILD_BUG(void);
# 48 "include/asm/system.h" 2
struct thread_info;
extern unsigned int system_rev;
extern unsigned int system_serial_low;
extern unsigned int system_serial_high;
extern unsigned int mem_fclk_21285;
struct pt_regs;
void die(const char *msg, struct pt_regs *regs, int err)
__attribute__((noreturn));
void die_if_kernel(const char *str, struct pt_regs *regs, int err);
void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
struct pt_regs *),
int sig, const char *name);
# 1 "include/asm/proc-fns.h" 1
# 144 "include/asm/proc-fns.h"
# 1 "include/asm/cpu-single.h" 1
# 35 "include/asm/cpu-single.h"
# 1 "include/asm/memory.h" 1
# 16 "include/asm/memory.h"
# 1 "include/asm/arch/memory.h" 1
# 17 "include/asm/memory.h" 2
# 36 "include/asm/memory.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long virt_to_phys(void *x)
{
return (((unsigned long)(x)) - (0xc0000000UL));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void *phys_to_virt(unsigned long x)
{
return (void *)((((unsigned long)(x)) + (0xc0000000UL)));
}
# 36 "include/asm/cpu-single.h" 2
# 1 "include/asm/page.h" 1
# 27 "include/asm/page.h"
# 1 "include/asm/glue.h" 1
# 28 "include/asm/page.h" 2
# 99 "include/asm/page.h"
struct cpu_user_fns {
void (*cpu_clear_user_page)(void *p, unsigned long user);
void (*cpu_copy_user_page)(void *to, const void *from,
unsigned long user);
};
# 116 "include/asm/page.h"
extern void v6_clear_user_page(void *p, unsigned long user);
extern void v6_copy_user_page(void *to, const void *from,
unsigned long user);
# 136 "include/asm/page.h"
extern void copy_page(void *to, void *from);
# 162 "include/asm/page.h"
typedef unsigned long pte_t;
typedef unsigned long pmd_t;
typedef unsigned long pgd_t[2];
typedef unsigned long pgprot_t;
# 179 "include/asm/page.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int get_order(unsigned long size)
{
int order;
size = (size-1) >> (12 -1);
order = -1;
do {
size >>= 1;
order++;
} while (size);
return order;
}
# 37 "include/asm/cpu-single.h" 2
struct mm_struct;
extern void cpu_v6_proc_init(void);
extern void cpu_v6_proc_fin(void);
extern int cpu_v6_do_idle(void);
extern void cpu_v6_dcache_clean_area(void *, int);
extern void cpu_v6_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
extern void cpu_v6_set_pte(pte_t *ptep, pte_t pte);
extern volatile void cpu_v6_reset(unsigned long addr);
# 145 "include/asm/proc-fns.h" 2
# 69 "include/asm/system.h" 2
extern void __backtrace(void);
extern int cpu_architecture(void);
# 93 "include/asm/system.h"
extern unsigned long cr_no_alignment;
extern unsigned long cr_alignment;
# 117 "include/asm/system.h"
struct thread_info;
struct task_struct;
extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
# 286 "include/asm/system.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
{
extern void __bad_xchg(volatile void *, int);
unsigned long ret;
switch (size) {
# 310 "include/asm/system.h"
case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]"
: "=&r" (ret)
: "r" (x), "r" (ptr)
: "memory", "cc");
break;
case 4: __asm__ __volatile__ ("swp %0, %1, [%2]"
: "=&r" (ret)
: "r" (x), "r" (ptr)
: "memory", "cc");
break;
default: __bad_xchg(ptr, size), ret = 0;
}
return ret;
}
# 23 "include/asm/bitops.h" 2
# 32 "include/asm/bitops.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void ____atomic_set_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
*p |= mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void ____atomic_clear_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
*p &= ~mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void ____atomic_change_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
*p ^= mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int
____atomic_test_and_set_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
res = *p;
*p = res | mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
return res & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int
____atomic_test_and_clear_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
res = *p;
*p = res & ~mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
return res & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int
____atomic_test_and_change_bit(unsigned int bit, unsigned long *p)
{
unsigned long flags;
unsigned int res;
unsigned long mask = 1UL << (bit & 31);
p += bit >> 5;
({ __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" "cpsid i" : "=r" (flags) : : "memory", "cc"); });
res = *p;
*p = res ^ mask;
__asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory", "cc");
return res & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *p)
{
p[nr >> 5] |= (1UL << (nr & 31));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *p)
{
p[nr >> 5] &= ~(1UL << (nr & 31));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *p)
{
p[nr >> 5] ^= (1UL << (nr & 31));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *p)
{
unsigned long oldval, mask = 1UL << (nr & 31);
p += nr >> 5;
oldval = *p;
*p = oldval | mask;
return oldval & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *p)
{
unsigned long oldval, mask = 1UL << (nr & 31);
p += nr >> 5;
oldval = *p;
*p = oldval & ~mask;
return oldval & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int __test_and_change_bit(int nr, volatile unsigned long *p)
{
unsigned long oldval, mask = 1UL << (nr & 31);
p += nr >> 5;
oldval = *p;
*p = oldval ^ mask;
return oldval & mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int __test_bit(int nr, const unsigned long * p)
{
return (p[nr >> 5] >> (nr & 31)) & 1UL;
}
# 207 "include/asm/bitops.h"
extern void _set_bit_le(int nr, unsigned long * p);
extern void _clear_bit_le(int nr, unsigned long * p);
extern void _change_bit_le(int nr, unsigned long * p);
extern int _test_and_set_bit_le(int nr, unsigned long * p);
extern int _test_and_clear_bit_le(int nr, unsigned long * p);
extern int _test_and_change_bit_le(int nr, unsigned long * p);
extern int _find_first_zero_bit_le(void * p, unsigned size);
extern int _find_next_zero_bit_le(void * p, int size, int offset);
extern void _set_bit_be(int nr, unsigned long * p);
extern void _clear_bit_be(int nr, unsigned long * p);
extern void _change_bit_be(int nr, unsigned long * p);
extern int _test_and_set_bit_be(int nr, unsigned long * p);
extern int _test_and_clear_bit_be(int nr, unsigned long * p);
extern int _test_and_change_bit_be(int nr, unsigned long * p);
extern int _find_first_zero_bit_be(void * p, unsigned size);
extern int _find_next_zero_bit_be(void * p, int size, int offset);
# 338 "include/asm/bitops.h"
extern __inline__ __attribute__((always_inline)) int generic_fls(int x);
# 352 "include/asm/bitops.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int sched_find_first_bit(unsigned long *b)
{
unsigned long v;
unsigned int off;
for (off = 0; v = b[off], off < 4; off++) {
if (__builtin_expect(!!(v), 0))
break;
}
return (({ unsigned long __t = (v); ( __builtin_constant_p(__t & -__t) ? generic_fls(__t & -__t) : ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(__t & -__t)); 32-__r; }) ); }) - 1) + off * 32;
}
# 5 "include/linux/bitops.h" 2
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int generic_ffs(int x)
{
int r = 1;
if (!x)
return 0;
if (!(x & 0xffff)) {
x >>= 16;
r += 16;
}
if (!(x & 0xff)) {
x >>= 8;
r += 8;
}
if (!(x & 0xf)) {
x >>= 4;
r += 4;
}
if (!(x & 3)) {
x >>= 2;
r += 2;
}
if (!(x & 1)) {
x >>= 1;
r += 1;
}
return r;
}
extern __inline__ __attribute__((always_inline)) int generic_fls(int x)
{
int r = 32;
if (!x)
return 0;
if (!(x & 0xffff0000u)) {
x <<= 16;
r -= 16;
}
if (!(x & 0xff000000u)) {
x <<= 8;
r -= 8;
}
if (!(x & 0xf0000000u)) {
x <<= 4;
r -= 4;
}
if (!(x & 0xc0000000u)) {
x <<= 2;
r -= 2;
}
if (!(x & 0x80000000u)) {
x <<= 1;
r -= 1;
}
return r;
}
extern __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count)
{
int order;
order = ( __builtin_constant_p(count) ? generic_fls(count) : ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(count)); 32-__r; }) );
return order;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned int generic_hweight32(unsigned int w)
{
unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555);
res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F);
res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF);
return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned int generic_hweight16(unsigned int w)
{
unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555);
res = (res & 0x3333) + ((res >> 2) & 0x3333);
res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F);
return (res & 0x00FF) + ((res >> 8) & 0x00FF);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned int generic_hweight8(unsigned int w)
{
unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
res = (res & 0x33) + ((res >> 2) & 0x33);
return (res & 0x0F) + ((res >> 4) & 0x0F);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long generic_hweight64(__u64 w)
{
return generic_hweight32((unsigned int)(w >> 32)) +
generic_hweight32((unsigned int)w);
# 125 "include/linux/bitops.h"
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long hweight_long(unsigned long w)
{
return sizeof(w) == 4 ? generic_hweight32(w) : generic_hweight64(w);
}
# 21 "include/linux/thread_info.h" 2
# 1 "include/asm/thread_info.h" 1
# 17 "include/asm/thread_info.h"
struct task_struct;
struct exec_domain;
# 1 "include/asm/fpstate.h" 1
# 16 "include/asm/fpstate.h"
struct fp_hard_struct {
unsigned int save[35];
};
struct fp_soft_struct {
unsigned int save[35];
};
union fp_state {
struct fp_hard_struct hard;
struct fp_soft_struct soft;
};
# 21 "include/asm/thread_info.h" 2
# 1 "include/asm/ptrace.h" 1
# 62 "include/asm/ptrace.h"
struct pt_regs {
long uregs[18];
};
# 112 "include/asm/ptrace.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int valid_user_regs(struct pt_regs *regs)
{
if ((((regs)->uregs[16] & 0xf) == 0) &&
(regs->uregs[16] & (0x00000040|0x00000080)) == 0)
return 1;
regs->uregs[16] &= 0xff000000 | 0x00ff0000 | 0x0000ff00 | 0x00000020 | 0x00000010;
return 0;
}
# 135 "include/asm/ptrace.h"
extern void show_regs(struct pt_regs *);
# 22 "include/asm/thread_info.h" 2
# 1 "include/asm/domain.h" 1
# 24 "include/asm/thread_info.h" 2
typedef unsigned long mm_segment_t;
struct cpu_context_save {
__u32 r4;
__u32 r5;
__u32 r6;
__u32 r7;
__u32 r8;
__u32 r9;
__u32 sl;
__u32 fp;
__u32 sp;
__u32 pc;
__u32 extra[2];
};
struct thread_info {
unsigned long flags;
__s32 preempt_count;
mm_segment_t addr_limit;
struct task_struct *task;
struct exec_domain *exec_domain;
__u32 cpu;
__u32 cpu_domain;
struct cpu_context_save cpu_context;
struct restart_block restart_block;
union fp_state fpstate;
};
# 79 "include/asm/thread_info.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct thread_info *current_thread_info(void) __attribute__ (( __const__ ));
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct thread_info *current_thread_info(void)
{
register unsigned long sp asm ("sp");
return (struct thread_info *)(sp & ~0x1fff);
}
extern struct thread_info *alloc_thread_info(struct task_struct *task);
extern void free_thread_info(struct thread_info *);
# 22 "include/linux/thread_info.h" 2
# 30 "include/linux/thread_info.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void set_thread_flag(int flag)
{
(__builtin_constant_p(flag) ? ____atomic_set_bit(flag, ¤t_thread_info()->flags) : _set_bit_le(flag,¤t_thread_info()->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void clear_thread_flag(int flag)
{
(__builtin_constant_p(flag) ? ____atomic_clear_bit(flag, ¤t_thread_info()->flags) : _clear_bit_le(flag,¤t_thread_info()->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_and_set_thread_flag(int flag)
{
return (__builtin_constant_p(flag) ? ____atomic_test_and_set_bit(flag, ¤t_thread_info()->flags) : _test_and_set_bit_le(flag,¤t_thread_info()->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_and_clear_thread_flag(int flag)
{
return (__builtin_constant_p(flag) ? ____atomic_test_and_clear_bit(flag, ¤t_thread_info()->flags) : _test_and_clear_bit_le(flag,¤t_thread_info()->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_thread_flag(int flag)
{
return __test_bit(flag,¤t_thread_info()->flags);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag)
{
(__builtin_constant_p(flag) ? ____atomic_set_bit(flag, &ti->flags) : _set_bit_le(flag,&ti->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag)
{
(__builtin_constant_p(flag) ? ____atomic_clear_bit(flag, &ti->flags) : _clear_bit_le(flag,&ti->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
{
return (__builtin_constant_p(flag) ? ____atomic_test_and_set_bit(flag, &ti->flags) : _test_and_set_bit_le(flag,&ti->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
{
return (__builtin_constant_p(flag) ? ____atomic_test_and_clear_bit(flag, &ti->flags) : _test_and_clear_bit_le(flag,&ti->flags));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag)
{
return __test_bit(flag,&ti->flags);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void set_need_resched(void)
{
set_thread_flag(2);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void clear_need_resched(void)
{
clear_thread_flag(2);
}
# 13 "include/linux/spinlock.h" 2
# 1 "include/linux/stringify.h" 1
# 15 "include/linux/spinlock.h" 2
# 1 "include/asm/processor.h" 1
# 25 "include/asm/processor.h"
# 1 "include/asm/atomic.h" 1
# 16 "include/asm/atomic.h"
typedef struct { volatile int counter; } atomic_t;
# 33 "include/asm/atomic.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void atomic_set(atomic_t *v, int i)
{
unsigned long tmp;
__asm__ __volatile__("@ atomic_set\n"
"1: ldrex %0, [%1]\n"
" strex %0, %2, [%1]\n"
" teq %0, #0\n"
" bne 1b"
: "=&r" (tmp)
: "r" (&v->counter), "r" (i)
: "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void atomic_add(int i, volatile atomic_t *v)
{
unsigned long tmp, tmp2;
__asm__ __volatile__("@ atomic_add\n"
"1: ldrex %0, [%2]\n"
" add %0, %0, %3\n"
" strex %1, %0, [%2]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (&v->counter), "Ir" (i)
: "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void atomic_sub(int i, volatile atomic_t *v)
{
unsigned long tmp, tmp2;
__asm__ __volatile__("@ atomic_sub\n"
"1: ldrex %0, [%2]\n"
" sub %0, %0, %3\n"
" strex %1, %0, [%2]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (&v->counter), "Ir" (i)
: "cc");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int atomic_dec_and_test(volatile atomic_t *v)
{
unsigned long tmp;
int result;
__asm__ __volatile__("@ atomic_dec_and_test\n"
"1: ldrex %0, [%2]\n"
" sub %0, %0, #1\n"
" strex %1, %0, [%2]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (result), "=&r" (tmp)
: "r" (&v->counter)
: "cc");
return result == 0;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int atomic_add_negative(int i, volatile atomic_t *v)
{
unsigned long tmp;
int result;
__asm__ __volatile__("@ atomic_add_negative\n"
"1: ldrex %0, [%2]\n"
" add %0, %0, %3\n"
" strex %1, %0, [%2]\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (result), "=&r" (tmp)
: "r" (&v->counter), "Ir" (i)
: "cc");
return result < 0;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void atomic_clear_mask(unsigned long mask, unsigned long *addr)
{
unsigned long tmp, tmp2;
__asm__ __volatile__("@ atomic_clear_mask\n"
"1: ldrex %0, %2\n"
" bic %0, %0, %3\n"
" strex %1, %0, %2\n"
" teq %1, #0\n"
" bne 1b"
: "=&r" (tmp), "=&r" (tmp2)
: "r" (addr), "Ir" (mask)
: "cc");
}
# 26 "include/asm/processor.h" 2
# 1 "include/asm/procinfo.h" 1
# 15 "include/asm/procinfo.h"
struct cpu_tlb_fns;
struct cpu_user_fns;
struct cpu_cache_fns;
struct processor;
# 29 "include/asm/procinfo.h"
struct proc_info_list {
unsigned int cpu_val;
unsigned int cpu_mask;
unsigned long __cpu_mmu_flags;
unsigned long __cpu_flush;
const char *arch_name;
const char *elf_name;
unsigned int elf_hwcap;
const char *cpu_name;
struct processor *proc;
struct cpu_tlb_fns *tlb;
struct cpu_user_fns *user;
struct cpu_cache_fns *cache;
};
extern unsigned int elf_hwcap;
# 28 "include/asm/processor.h" 2
union debug_insn {
u32 arm;
u16 thumb;
};
struct debug_entry {
u32 address;
union debug_insn insn;
};
struct debug_info {
int nsaved;
struct debug_entry bp[2];
};
struct thread_struct {
unsigned long address;
unsigned long trap_no;
unsigned long error_code;
struct debug_info debug;
};
# 78 "include/asm/processor.h"
struct task_struct;
extern void release_thread(struct task_struct *);
unsigned long get_wchan(struct task_struct *p);
extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
# 17 "include/linux/spinlock.h" 2
# 150 "include/linux/spinlock.h"
typedef struct { } spinlock_t;
# 171 "include/linux/spinlock.h"
typedef struct { } rwlock_t;
# 404 "include/linux/spinlock.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bit_spin_lock(int bitnum, unsigned long *addr)
{
do { } while (0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bit_spin_trylock(int bitnum, unsigned long *addr)
{
# 436 "include/linux/spinlock.h"
do { } while (0);
return 1;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bit_spin_unlock(int bitnum, unsigned long *addr)
{
do { } while (0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bit_spin_is_locked(int bitnum, unsigned long *addr)
{
return 1;
}
# 46 "include/linux/capability.h" 2
extern spinlock_t task_capability_lock;
# 59 "include/linux/capability.h"
typedef __u32 kernel_cap_t;
# 291 "include/linux/capability.h"
extern kernel_cap_t cap_bset;
# 319 "include/linux/capability.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
{
kernel_cap_t dest;
(dest) = (a) | (b);
return dest;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) kernel_cap_t cap_intersect(kernel_cap_t a, kernel_cap_t b)
{
kernel_cap_t dest;
(dest) = (a) & (b);
return dest;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) kernel_cap_t cap_drop(kernel_cap_t a, kernel_cap_t drop)
{
kernel_cap_t dest;
(dest) = (a) & ~(drop);
return dest;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) kernel_cap_t cap_invert(kernel_cap_t c)
{
kernel_cap_t dest;
(dest) = ~(c);
return dest;
}
# 8 "include/linux/sched.h" 2
# 1 "include/linux/threads.h" 1
# 9 "include/linux/sched.h" 2
# 1 "include/linux/timex.h" 1
# 155 "include/linux/timex.h"
# 1 "include/asm/timex.h" 1
# 15 "include/asm/timex.h"
# 1 "include/asm/arch/timex.h" 1
# 16 "include/asm/timex.h" 2
typedef unsigned long cycles_t;
extern cycles_t cacheflush_time;
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) cycles_t get_cycles (void)
{
return 0;
}
# 156 "include/linux/timex.h" 2
# 186 "include/linux/timex.h"
# 1 "include/linux/time.h" 1
# 9 "include/linux/time.h"
struct timespec {
time_t tv_sec;
long tv_nsec;
};
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
# 1 "include/linux/seqlock.h" 1
# 33 "include/linux/seqlock.h"
typedef struct {
unsigned sequence;
spinlock_t lock;
} seqlock_t;
# 50 "include/linux/seqlock.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void write_seqlock(seqlock_t *sl)
{
do { do { } while (0); do { (void)(&sl->lock); } while(0); } while(0);
++sl->sequence;
__asm__ __volatile__("": : :"memory");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl)
{
__asm__ __volatile__("": : :"memory");
sl->sequence++;
do { do { (void)(&sl->lock); } while(0); do { } while (0); } while (0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl)
{
int ret = ({do { } while (0); ((void)(&sl->lock), 1) ? 1 : ({do { } while (0); 0;});});
if (ret) {
++sl->sequence;
__asm__ __volatile__("": : :"memory");
}
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl)
{
unsigned ret = sl->sequence;
__asm__ __volatile__("": : :"memory");
return ret;
}
# 91 "include/linux/seqlock.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned iv)
{
__asm__ __volatile__("": : :"memory");
return (iv & 1) | (sl->sequence ^ iv);
}
# 105 "include/linux/seqlock.h"
typedef struct seqcount {
unsigned sequence;
} seqcount_t;
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s)
{
unsigned ret = s->sequence;
__asm__ __volatile__("": : :"memory");
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned iv)
{
__asm__ __volatile__("": : :"memory");
return (iv & 1) | (s->sequence ^ iv);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s)
{
s->sequence++;
__asm__ __volatile__("": : :"memory");
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s)
{
__asm__ __volatile__("": : :"memory");
s->sequence++;
}
# 29 "include/linux/time.h" 2
# 1 "include/linux/timex.h" 1
# 30 "include/linux/time.h" 2
# 1 "include/asm/div64.h" 1
# 31 "include/linux/time.h" 2
# 191 "include/linux/time.h"
static __inline__ __attribute__((always_inline)) unsigned long
timespec_to_jiffies(struct timespec *value)
{
unsigned long sec = value->tv_sec;
long nsec = value->tv_nsec + (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))))) - 1;
if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))) / (1000000000L))){
sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))) / (1000000000L));
nsec = 0;
}
return (((u64)sec * ((unsigned long)((((u64)(1000000000L) << (32 - 7))) / (u64)(( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))))) +
(((u64)nsec * ((unsigned long)((((u64)1 << ((32 - 7) + 29))) / (u64)(( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))))) >>
(((32 - 7) + 29) - (32 - 7)))) >> (32 - 7);
}
static __inline__ __attribute__((always_inline)) void
jiffies_to_timespec(unsigned long jiffies, struct timespec *value)
{
u64 nsec = (u64)jiffies * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))));
value->tv_sec = ({ u64 result = nsec; *&value->tv_nsec = ({ register unsigned int __base asm("r4") = (1000000000L); register unsigned long long __n asm("r0") = result; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm("bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); result = __res; __rem; }); result; });
}
# 230 "include/linux/time.h"
static __inline__ __attribute__((always_inline)) unsigned long
timeval_to_jiffies(struct timeval *value)
{
unsigned long sec = value->tv_sec;
long usec = value->tv_usec;
if (sec >= (long)((u64)((u64)((~0UL >> 1)-1) * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))) / (1000000000L))){
sec = (long)((u64)((u64)((~0UL >> 1)-1) * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))) / (1000000000L));
usec = 0;
}
return (((u64)sec * ((unsigned long)((((u64)(1000000000L) << (32 - 7))) / (u64)(( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))))))) +
(((u64)usec * ((unsigned long)((((u64)(1000L) << ((32 - 7) + 19))) / (u64)(( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))))))) + (u64)(((u64)1 << ((32 - 7) + 19)) - 1)) >>
(((32 - 7) + 19) - (32 - 7)))) >> (32 - 7);
}
static __inline__ __attribute__((always_inline)) void
jiffies_to_timeval(unsigned long jiffies, struct timeval *value)
{
u64 nsec = (u64)jiffies * (( ((1000000UL * 1000 / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (((1000000UL * 1000 % (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))) << 8) + (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100))) / 2) / (( (((50000000 / 16) / (((50000000 / 16) + 100/2) / 100)) << 8) + ((((50000000 / 16) % (((50000000 / 16) + 100/2) / 100)) << 8) + (((50000000 / 16) + 100/2) / 100) / 2) / (((50000000 / 16) + 100/2) / 100)))));
value->tv_sec = ({ u64 result = nsec; *&value->tv_usec = ({ register unsigned int __base asm("r4") = (1000000000L); register unsigned long long __n asm("r0") = result; register unsigned long long __res asm("r2"); register unsigned int __rem asm("r1"); asm("bl __do_div64" : "=r" (__rem), "=r" (__res) : "r" (__n), "r" (__base) : "ip", "lr", "cc"); result = __res; __rem; }); result; });
value->tv_usec /= (1000L);
}
static __inline__ __attribute__((always_inline)) int timespec_equal(struct timespec *a, struct timespec *b)
{
return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec);
}
# 277 "include/linux/time.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long
mktime (unsigned int year, unsigned int mon,
unsigned int day, unsigned int hour,
unsigned int min, unsigned int sec)
{
if (0 >= (int) (mon -= 2)) {
mon += 12;
year -= 1;
}
return (((
(unsigned long) (year/4 - year/100 + year/400 + 367*mon/12 + day) +
year*365 - 719499
)*24 + hour
)*60 + min
)*60 + sec;
}
extern struct timespec xtime;
extern struct timespec wall_to_monotonic;
extern seqlock_t xtime_lock;
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long get_seconds(void)
{
return xtime.tv_sec;
}
struct timespec current_kernel_time(void);
# 313 "include/linux/time.h"
extern void do_gettimeofday(struct timeval *tv);
extern int do_settimeofday(struct timespec *tv);
extern int do_sys_settimeofday(struct timespec *tv, struct timezone *tz);
extern void clock_was_set(void);
extern int do_posix_clock_monotonic_gettime(struct timespec *tp);
extern long do_nanosleep(struct timespec *t);
extern long do_utimes(char * filename, struct timeval * times);
struct itimerval;
extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
extern int do_getitimer(int which, struct itimerval *value);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void
set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
{
while (nsec > (1000000000L)) {
nsec -= (1000000000L);
++sec;
}
while (nsec < 0) {
nsec += (1000000000L);
--sec;
}
ts->tv_sec = sec;
ts->tv_nsec = nsec;
}
# 354 "include/linux/time.h"
struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
};
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
# 187 "include/linux/timex.h" 2
struct timex {
unsigned int modes;
long offset;
long freq;
long maxerror;
long esterror;
int status;
long constant;
long precision;
long tolerance;
struct timeval time;
long tick;
long ppsfreq;
long jitter;
int shift;
long stabil;
long jitcnt;
long calcnt;
long errcnt;
long stbcnt;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
};
# 283 "include/linux/timex.h"
extern unsigned long tick_usec;
extern unsigned long tick_nsec;
extern int tickadj;
extern int time_state;
extern int time_status;
extern long time_offset;
extern long time_constant;
extern long time_tolerance;
extern long time_precision;
extern long time_maxerror;
extern long time_esterror;
extern long time_phase;
extern long time_freq;
extern long time_adj;
extern long time_reftime;
extern long time_adjust;
extern long time_next_adjust;
extern long pps_offset;
extern long pps_jitter;
extern long pps_freq;
extern long pps_stabil;
extern long pps_valid;
extern int pps_shift;
extern long pps_jitcnt;
extern long pps_calcnt;
extern long pps_errcnt;
extern long pps_stbcnt;
# 402 "include/linux/timex.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void
time_interpolator_update(long delta_nsec)
{
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void
time_interpolator_reset(void)
{
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) unsigned long
time_interpolator_get_offset(void)
{
return 0;
}
# 12 "include/linux/sched.h" 2
# 1 "include/linux/jiffies.h" 1
# 16 "include/linux/jiffies.h"
extern u64 jiffies_64;
extern unsigned long volatile jiffies;
u64 get_jiffies_64(void);
# 13 "include/linux/sched.h" 2
# 1 "include/linux/rbtree.h" 1
# 100 "include/linux/rbtree.h"
struct rb_node
{
struct rb_node *rb_parent;
int rb_color;
struct rb_node *rb_right;
struct rb_node *rb_left;
};
struct rb_root
{
struct rb_node *rb_node;
};
extern void rb_insert_color(struct rb_node *, struct rb_root *);
extern void rb_erase(struct rb_node *, struct rb_root *);
extern struct rb_node *rb_next(struct rb_node *);
extern struct rb_node *rb_prev(struct rb_node *);
extern struct rb_node *rb_first(struct rb_root *);
extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
struct rb_root *root);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent,
struct rb_node ** rb_link)
{
node->rb_parent = parent;
node->rb_color = 0;
node->rb_left = node->rb_right = ((void *)0);
*rb_link = node;
}
# 14 "include/linux/sched.h" 2
# 1 "include/linux/cpumask.h" 1
# 1 "include/linux/bitmap.h" 1
# 11 "include/linux/bitmap.h"
# 1 "include/linux/string.h" 1
# 15 "include/linux/string.h"
extern char * strpbrk(const char *,const char *);
extern char * strsep(char **,const char *);
extern __kernel_size_t strspn(const char *,const char *);
extern __kernel_size_t strcspn(const char *,const char *);
# 1 "include/asm/string.h" 1
# 10 "include/asm/string.h"
extern char * strrchr(const char * s, int c);
extern char * strchr(const char * s, int c);
extern void * memcpy(void *, const void *, __kernel_size_t);
extern void * memmove(void *, const void *, __kernel_size_t);
extern void * memchr(const void *, int, __kernel_size_t);
extern void * memset(void *, int, __kernel_size_t);
extern void __memzero(void *ptr, __kernel_size_t n);
# 24 "include/linux/string.h" 2
extern char * strcpy(char *,const char *);
extern char * strncpy(char *,const char *, __kernel_size_t);
size_t strlcpy(char *, const char *, size_t);
extern char * strcat(char *, const char *);
extern char * strncat(char *, const char *, __kernel_size_t);
extern size_t strlcat(char *, const char *, __kernel_size_t);
extern int strcmp(const char *,const char *);
extern int strncmp(const char *,const char *,__kernel_size_t);
extern int strnicmp(const char *, const char *, __kernel_size_t);
# 59 "include/linux/string.h"
extern char * strstr(const char *,const char *);
extern __kernel_size_t strlen(const char *);
extern __kernel_size_t strnlen(const char *,__kernel_size_t);
# 78 "include/linux/string.h"
extern void * memscan(void *,int,__kernel_size_t);
extern int memcmp(const void *,const void *,__kernel_size_t);
# 12 "include/linux/bitmap.h" 2
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bitmap_empty(const unsigned long *bitmap, int bits)
{
int k, lim = bits/32;
for (k = 0; k < lim; ++k)
if (bitmap[k])
return 0;
if (bits % 32)
if (bitmap[k] & ((1UL << (bits % 32)) - 1))
return 0;
return 1;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bitmap_full(const unsigned long *bitmap, int bits)
{
int k, lim = bits/32;
for (k = 0; k < lim; ++k)
if (~bitmap[k])
return 0;
if (bits % 32)
if (~bitmap[k] & ((1UL << (bits % 32)) - 1))
return 0;
return 1;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bitmap_equal(const unsigned long *bitmap1,
unsigned long *bitmap2, int bits)
{
int k, lim = bits/32;;
for (k = 0; k < lim; ++k)
if (bitmap1[k] != bitmap2[k])
return 0;
if (bits % 32)
if ((bitmap1[k] ^ bitmap2[k]) &
((1UL << (bits % 32)) - 1))
return 0;
return 1;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_complement(unsigned long *bitmap, int bits)
{
int k;
for (k = 0; k < (((bits)+32 -1)/32); ++k)
bitmap[k] = ~bitmap[k];
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_clear(unsigned long *bitmap, int bits)
{
({ if (((((bits)+32 -1)/32)*sizeof(unsigned long)) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero(((unsigned long *)bitmap),((((bits)+32 -1)/32)*sizeof(unsigned long))); else memset(((unsigned long *)bitmap),(0),((((bits)+32 -1)/32)*sizeof(unsigned long))); } ((unsigned long *)bitmap); });
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_fill(unsigned long *bitmap, int bits)
{
({ if (((((bits)+32 -1)/32)*sizeof(unsigned long)) != 0) { if (__builtin_constant_p((0xff)) && (0xff) == 0) __memzero((bitmap),((((bits)+32 -1)/32)*sizeof(unsigned long))); else memset((bitmap),(0xff),((((bits)+32 -1)/32)*sizeof(unsigned long))); } (bitmap); });
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_copy(unsigned long *dst,
const unsigned long *src, int bits)
{
memcpy(dst, src, (((bits)+32 -1)/32)*sizeof(unsigned long));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst,
const unsigned long *src, int shift, int bits)
{
int k;
unsigned long __shr_tmp[(((bits)+32 -1)/32)];
bitmap_clear(__shr_tmp, bits);
for (k = 0; k < bits - shift; ++k)
if (__test_bit(k + shift,src))
(__builtin_constant_p(k) ? ____atomic_set_bit(k, __shr_tmp) : _set_bit_le(k,__shr_tmp));
bitmap_copy(dst, __shr_tmp, bits);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst,
const unsigned long *src, int shift, int bits)
{
int k;
unsigned long __shl_tmp[(((bits)+32 -1)/32)];
bitmap_clear(__shl_tmp, bits);
for (k = bits; k >= shift; --k)
if (__test_bit(k - shift,src))
(__builtin_constant_p(k) ? ____atomic_set_bit(k, __shl_tmp) : _set_bit_le(k,__shl_tmp));
bitmap_copy(dst, __shl_tmp, bits);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_and(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, int bits)
{
int k;
int nr = (((bits)+32 -1)/32);
for (k = 0; k < nr; k++)
dst[k] = bitmap1[k] & bitmap2[k];
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *bitmap1,
const unsigned long *bitmap2, int bits)
{
int k;
int nr = (((bits)+32 -1)/32);
for (k = 0; k < nr; k++)
dst[k] = bitmap1[k] | bitmap2[k];
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int bitmap_weight(const unsigned long *bitmap, int bits)
{
int k, w = 0, lim = bits/32;
for (k = 0; k < lim; k++)
w += generic_hweight32(bitmap[k]);
if (bits % 32)
w += generic_hweight32(bitmap[k] & ((1UL << (bits % 32)) - 1));
return w;
}
# 9 "include/linux/cpumask.h" 2
# 21 "include/linux/cpumask.h"
typedef unsigned long cpumask_t;
# 31 "include/linux/cpumask.h"
# 1 "include/asm-generic/cpumask_up.h" 1
# 32 "include/linux/cpumask.h" 2
# 1 "include/asm-generic/cpumask_const_value.h" 1
typedef const cpumask_t cpumask_const_t;
# 36 "include/linux/cpumask.h" 2
# 53 "include/linux/cpumask.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int next_online_cpu(int cpu, cpumask_t map)
{
do
cpu = 1;
while (cpu < 1 && !({ do { if (__builtin_expect(!!(((cpu) != 0)!=0), 0)) __bug("include/linux/cpumask.h", 57, ((void *)0)); } while(0); 1; }));
return cpu;
}
# 16 "include/linux/sched.h" 2
# 1 "include/asm/semaphore.h" 1
# 9 "include/asm/semaphore.h"
# 1 "include/linux/wait.h" 1
# 14 "include/linux/wait.h"
# 1 "include/linux/list.h" 1
# 1 "include/linux/prefetch.h" 1
# 14 "include/linux/prefetch.h"
# 1 "include/asm/cache.h" 1
# 15 "include/linux/prefetch.h" 2
# 8 "include/linux/list.h" 2
# 28 "include/linux/list.h"
struct list_head {
struct list_head *next, *prev;
};
# 47 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next)
{
next->prev = new;
new->next = next;
new->prev = prev;
prev->next = new;
}
# 65 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}
# 78 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head)
{
__list_add(new, head->prev, head);
}
static __inline__ __attribute__((always_inline)) void __list_add_rcu(struct list_head * new,
struct list_head * prev,
struct list_head * next)
{
new->next = next;
new->prev = prev;
__asm__ __volatile__("": : :"memory");
next->prev = new;
prev->next = new;
}
# 108 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head)
{
__list_add_rcu(new, head, head->next);
}
# 121 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new, struct list_head *head)
{
__list_add_rcu(new, head->prev, head);
}
# 133 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
prev->next = next;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
entry->next = ((void *) 0x00100100);
entry->prev = ((void *) 0x00200200);
}
# 163 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_del_rcu(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
entry->prev = ((void *) 0x00200200);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
do { (entry)->next = (entry); (entry)->prev = (entry); } while (0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head)
{
__list_del(list->prev, list->next);
list_add(list, head);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_move_tail(struct list_head *list,
struct list_head *head)
{
__list_del(list->prev, list->next);
list_add_tail(list, head);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int list_empty(const struct list_head *head)
{
return head->next == head;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int list_empty_careful(const struct list_head *head)
{
struct list_head *next = head->next;
return (next == head) && (next == head->prev);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __list_splice(struct list_head *list,
struct list_head *head)
{
struct list_head *first = list->next;
struct list_head *last = list->prev;
struct list_head *at = head->next;
first->prev = head;
head->next = first;
last->next = at;
at->prev = last;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_splice(struct list_head *list, struct list_head *head)
{
if (!list_empty(list))
__list_splice(list, head);
}
# 255 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void list_splice_init(struct list_head *list,
struct list_head *head)
{
if (!list_empty(list)) {
__list_splice(list, head);
do { (list)->next = (list); (list)->prev = (list); } while (0);
}
}
# 423 "include/linux/list.h"
struct hlist_head {
struct hlist_node *first;
};
struct hlist_node {
struct hlist_node *next, **pprev;
};
static __inline__ __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h)
{
return !h->pprev;
}
static __inline__ __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h)
{
return !h->first;
}
static __inline__ __attribute__((always_inline)) void __hlist_del(struct hlist_node *n)
{
struct hlist_node *next = n->next;
struct hlist_node **pprev = n->pprev;
*pprev = next;
if (next)
next->pprev = pprev;
}
static __inline__ __attribute__((always_inline)) void hlist_del(struct hlist_node *n)
{
__hlist_del(n);
n->next = ((void *) 0x00100100);
n->pprev = ((void *) 0x00200200);
}
# 473 "include/linux/list.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n)
{
__hlist_del(n);
n->pprev = ((void *) 0x00200200);
}
static __inline__ __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n)
{
if (n->pprev) {
__hlist_del(n);
((n)->next = ((void *)0), (n)->pprev = ((void *)0));
}
}
static __inline__ __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h)
{
struct hlist_node *first = h->first;
n->next = first;
if (first)
first->pprev = &n->next;
h->first = n;
n->pprev = &h->first;
}
static __inline__ __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n, struct hlist_head *h)
{
struct hlist_node *first = h->first;
n->next = first;
n->pprev = &h->first;
__asm__ __volatile__("": : :"memory");
if (first)
first->pprev = &n->next;
h->first = n;
}
static __inline__ __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n, struct hlist_node *next)
{
n->pprev = next->pprev;
n->next = next;
next->pprev = &n->next;
*(n->pprev) = n;
}
static __inline__ __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n,
struct hlist_node *next)
{
next->next = n->next;
*(next->pprev) = n;
n->next = next;
}
# 15 "include/linux/wait.h" 2
typedef struct __wait_queue wait_queue_t;
typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int sync);
extern int default_wake_function(wait_queue_t *wait, unsigned mode, int sync);
struct __wait_queue {
unsigned int flags;
struct task_struct * task;
wait_queue_func_t func;
struct list_head task_list;
};
struct __wait_queue_head {
spinlock_t lock;
struct list_head task_list;
};
typedef struct __wait_queue_head wait_queue_head_t;
# 57 "include/linux/wait.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_waitqueue_head(wait_queue_head_t *q)
{
q->lock = (spinlock_t) { };
do { (&q->task_list)->next = (&q->task_list); (&q->task_list)->prev = (&q->task_list); } while (0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p)
{
q->flags = 0;
q->task = p;
q->func = default_wake_function;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q,
wait_queue_func_t func)
{
q->flags = 0;
q->task = ((void *)0);
q->func = func;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q)
{
return !list_empty(&q->task_list);
}
extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new)
{
list_add(&new->task_list, &head->task_list);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head,
wait_queue_t *new)
{
list_add_tail(&new->task_list, &head->task_list);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head,
wait_queue_t *old)
{
list_del(&old->task_list);
}
extern void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr);
extern void __wake_up_locked(wait_queue_head_t *q, unsigned int mode);
extern void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr);
# 207 "include/linux/wait.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void add_wait_queue_exclusive_locked(wait_queue_head_t *q,
wait_queue_t * wait)
{
wait->flags |= 0x01;
__add_wait_queue_tail(q, wait);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void remove_wait_queue_locked(wait_queue_head_t *q,
wait_queue_t * wait)
{
__remove_wait_queue(q, wait);
}
extern void sleep_on(wait_queue_head_t *q);
extern long sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
extern void interruptible_sleep_on(wait_queue_head_t *q);
extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, signed long timeout);
void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state);
void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync);
# 10 "include/asm/semaphore.h" 2
# 1 "include/linux/rwsem.h" 1
# 22 "include/linux/rwsem.h"
struct rw_semaphore;
# 1 "include/linux/rwsem-spinlock.h" 1
# 22 "include/linux/rwsem-spinlock.h"
struct rwsem_waiter;
# 31 "include/linux/rwsem-spinlock.h"
struct rw_semaphore {
__s32 activity;
spinlock_t wait_lock;
struct list_head wait_list;
};
# 55 "include/linux/rwsem-spinlock.h"
extern void init_rwsem(struct rw_semaphore *sem);
extern void __down_read(struct rw_semaphore *sem);
extern int __down_read_trylock(struct rw_semaphore *sem);
extern void __down_write(struct rw_semaphore *sem);
extern int __down_write_trylock(struct rw_semaphore *sem);
extern void __up_read(struct rw_semaphore *sem);
extern void __up_write(struct rw_semaphore *sem);
extern void __downgrade_write(struct rw_semaphore *sem);
# 26 "include/linux/rwsem.h" 2
# 41 "include/linux/rwsem.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void down_read(struct rw_semaphore *sem)
{
do {} while(0);
;
__down_read(sem);
;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int down_read_trylock(struct rw_semaphore *sem)
{
int ret;
;
ret = __down_read_trylock(sem);
;
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void down_write(struct rw_semaphore *sem)
{
do {} while(0);
;
__down_write(sem);
;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int down_write_trylock(struct rw_semaphore *sem)
{
int ret;
;
ret = __down_write_trylock(sem);
;
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void up_read(struct rw_semaphore *sem)
{
;
__up_read(sem);
;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void up_write(struct rw_semaphore *sem)
{
;
__up_write(sem);
;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void downgrade_write(struct rw_semaphore *sem)
{
;
__downgrade_write(sem);
;
}
# 11 "include/asm/semaphore.h" 2
# 1 "include/asm/locks.h" 1
# 14 "include/asm/semaphore.h" 2
struct semaphore {
atomic_t count;
int sleepers;
wait_queue_head_t wait;
};
# 44 "include/asm/semaphore.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val)
{
atomic_set(&sem->count, val);
sem->sleepers = 0;
init_waitqueue_head(&sem->wait);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_MUTEX(struct semaphore *sem)
{
sema_init(sem, 1);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_MUTEX_LOCKED(struct semaphore *sem)
{
sema_init(sem, 0);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int sema_count(struct semaphore *sem)
{
return ((&sem->count)->counter);
}
void __down_failed(void);
int __down_interruptible_failed(void);
int __down_trylock_failed(void);
void __up_wakeup(void);
extern void __down(struct semaphore * sem);
extern int __down_interruptible(struct semaphore * sem);
extern int __down_trylock(struct semaphore * sem);
extern void __up(struct semaphore * sem);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void down(struct semaphore * sem)
{
do {} while(0);
({ __asm__ __volatile__( "@ down_op\n" "1: ldrex lr, [%0]\n" " sub lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %0\n" " blmi " "__down_failed" : : "r" (sem), "I" (1) : "ip", "lr", "cc", "memory"); });
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int down_interruptible (struct semaphore * sem)
{
do {} while(0);
return ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" "1: ldrex lr, [%1]\n" " sub lr, lr, %2\n" " strex ip, lr, [%1]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " "__down_interruptible_failed" "\n" " mov %0, ip" : "=&r" (ret) : "r" (sem), "I" (1) : "ip", "lr", "cc", "memory"); ret; });
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int down_trylock(struct semaphore *sem)
{
return ({ unsigned int ret; __asm__ __volatile__( "@ down_op_ret\n" "1: ldrex lr, [%1]\n" " sub lr, lr, %2\n" " strex ip, lr, [%1]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movmi ip, %1\n" " movpl ip, #0\n" " blmi " "__down_trylock_failed" "\n" " mov %0, ip" : "=&r" (ret) : "r" (sem), "I" (1) : "ip", "lr", "cc", "memory"); ret; });
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void up(struct semaphore * sem)
{
({ __asm__ __volatile__( "@ up_op\n" "1: ldrex lr, [%0]\n" " add lr, lr, %1\n" " strex ip, lr, [%0]\n" " teq ip, #0\n" " bne 1b\n" " teq lr, #0\n" " movle ip, %0\n" " blle " "__up_wakeup" : : "r" (sem), "I" (1) : "ip", "lr", "cc", "memory"); });
}
# 19 "include/linux/sched.h" 2
# 1 "include/asm/mmu.h" 1
typedef struct {
unsigned int id;
} mm_context_t;
# 22 "include/linux/sched.h" 2
# 1 "include/linux/smp.h" 1
# 104 "include/linux/smp.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void smp_send_reschedule(int cpu) { }
# 24 "include/linux/sched.h" 2
# 1 "include/linux/sem.h" 1
# 1 "include/linux/ipc.h" 1
# 9 "include/linux/ipc.h"
struct ipc_perm
{
__kernel_key_t key;
__kernel_uid_t uid;
__kernel_gid_t gid;
__kernel_uid_t cuid;
__kernel_gid_t cgid;
__kernel_mode_t mode;
unsigned short seq;
};
# 1 "include/asm/ipcbuf.h" 1
# 14 "include/asm/ipcbuf.h"
struct ipc64_perm
{
__kernel_key_t key;
__kernel_uid32_t uid;
__kernel_gid32_t gid;
__kernel_uid32_t cuid;
__kernel_gid32_t cgid;
__kernel_mode_t mode;
unsigned short __pad1;
unsigned short seq;
unsigned short __pad2;
unsigned long __unused1;
unsigned long __unused2;
};
# 22 "include/linux/ipc.h" 2
# 57 "include/linux/ipc.h"
struct kern_ipc_perm
{
spinlock_t lock;
int deleted;
key_t key;
uid_t uid;
gid_t gid;
uid_t cuid;
gid_t cgid;
mode_t mode;
unsigned long seq;
void *security;
};
# 5 "include/linux/sem.h" 2
# 24 "include/linux/sem.h"
struct semid_ds {
struct ipc_perm sem_perm;
__kernel_time_t sem_otime;
__kernel_time_t sem_ctime;
struct sem *sem_base;
struct sem_queue *sem_pending;
struct sem_queue **sem_pending_last;
struct sem_undo *undo;
unsigned short sem_nsems;
};
# 1 "include/asm/sembuf.h" 1
# 14 "include/asm/sembuf.h"
struct semid64_ds {
struct ipc64_perm sem_perm;
__kernel_time_t sem_otime;
unsigned long __unused1;
__kernel_time_t sem_ctime;
unsigned long __unused2;
unsigned long sem_nsems;
unsigned long __unused3;
unsigned long __unused4;
};
# 37 "include/linux/sem.h" 2
struct sembuf {
unsigned short sem_num;
short sem_op;
short sem_flg;
};
union semun {
int val;
struct semid_ds *buf;
unsigned short *array;
struct seminfo *__buf;
void *__pad;
};
struct seminfo {
int semmap;
int semmni;
int semmns;
int semmnu;
int semmsl;
int semopm;
int semume;
int semusz;
int semvmx;
int semaem;
};
# 83 "include/linux/sem.h"
struct sem {
int semval;
int sempid;
};
struct sem_array {
struct kern_ipc_perm sem_perm;
time_t sem_otime;
time_t sem_ctime;
struct sem *sem_base;
struct sem_queue *sem_pending;
struct sem_queue **sem_pending_last;
struct sem_undo *undo;
unsigned long sem_nsems;
};
struct sem_queue {
struct sem_queue * next;
struct sem_queue ** prev;
struct task_struct* sleeper;
struct sem_undo * undo;
int pid;
int status;
struct sem_array * sma;
int id;
struct sembuf * sops;
int nsops;
};
struct sem_undo {
struct sem_undo * proc_next;
struct sem_undo * id_next;
int semid;
short * semadj;
};
struct sem_undo_list {
atomic_t refcnt;
spinlock_t lock;
struct sem_undo *proc_list;
};
struct sysv_sem {
struct sem_undo_list *undo_list;
};
long sys_semget (key_t key, int nsems, int semflg);
long sys_semop (int semid, struct sembuf *sops, unsigned nsops);
long sys_semctl (int semid, int semnum, int cmd, union semun arg);
long sys_semtimedop(int semid, struct sembuf *sops,
unsigned nsops, const struct timespec *timeout);
void exit_sem(struct task_struct *p);
# 25 "include/linux/sched.h" 2
# 1 "include/linux/signal.h" 1
# 1 "include/asm/signal.h" 1
struct siginfo;
# 17 "include/asm/signal.h"
typedef unsigned long old_sigset_t;
typedef struct {
unsigned long sig[(64 / 32)];
} sigset_t;
# 136 "include/asm/signal.h"
typedef void (*__sighandler_t)(int);
struct old_sigaction {
__sighandler_t sa_handler;
old_sigset_t sa_mask;
unsigned long sa_flags;
void (*sa_restorer)(void);
};
struct sigaction {
__sighandler_t sa_handler;
unsigned long sa_flags;
void (*sa_restorer)(void);
sigset_t sa_mask;
};
struct k_sigaction {
struct sigaction sa;
};
# 179 "include/asm/signal.h"
typedef struct sigaltstack {
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
# 1 "include/asm/sigcontext.h" 1
# 9 "include/asm/sigcontext.h"
struct sigcontext {
unsigned long trap_no;
unsigned long error_code;
unsigned long oldmask;
unsigned long arm_r0;
unsigned long arm_r1;
unsigned long arm_r2;
unsigned long arm_r3;
unsigned long arm_r4;
unsigned long arm_r5;
unsigned long arm_r6;
unsigned long arm_r7;
unsigned long arm_r8;
unsigned long arm_r9;
unsigned long arm_r10;
unsigned long arm_fp;
unsigned long arm_ip;
unsigned long arm_sp;
unsigned long arm_lr;
unsigned long arm_pc;
unsigned long arm_cpsr;
unsigned long fault_address;
};
# 187 "include/asm/signal.h" 2
# 7 "include/linux/signal.h" 2
# 1 "include/asm/siginfo.h" 1
# 1 "include/asm-generic/siginfo.h" 1
typedef union sigval {
int sival_int;
void *sival_ptr;
} sigval_t;
# 35 "include/asm-generic/siginfo.h"
typedef struct siginfo {
int si_signo;
int si_errno;
int si_code;
union {
int _pad[((128 - (3 * sizeof(int))) / sizeof(int))];
struct {
pid_t _pid;
uid_t _uid;
} _kill;
struct {
timer_t _tid;
int _overrun;
char _pad[sizeof( uid_t) - sizeof(int)];
sigval_t _sigval;
int _sys_private;
} _timer;
struct {
pid_t _pid;
uid_t _uid;
sigval_t _sigval;
} _rt;
struct {
pid_t _pid;
uid_t _uid;
int _status;
clock_t _utime;
clock_t _stime;
} _sigchld;
struct {
void *_addr;
} _sigfault;
struct {
int _band;
int _fd;
} _sigpoll;
} _sifields;
} siginfo_t;
# 242 "include/asm-generic/siginfo.h"
typedef struct sigevent {
sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
union {
int _pad[((64/sizeof(int)) - 3)];
int _tid;
struct {
void (*_function)(sigval_t);
void *_attribute;
} _sigev_thread;
} _sigev_un;
} sigevent_t;
# 265 "include/asm-generic/siginfo.h"
struct siginfo;
void do_schedule_next_timer(struct siginfo *info);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from)
{
if (from->si_code < 0)
memcpy(to, from, sizeof(*to));
else
memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld));
}
extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from);
# 5 "include/asm/siginfo.h" 2
# 8 "include/linux/signal.h" 2
struct sigqueue {
struct list_head list;
spinlock_t *lock;
int flags;
siginfo_t info;
};
struct sigpending {
struct list_head list;
sigset_t signal;
};
# 38 "include/linux/signal.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigaddset(sigset_t *set, int _sig)
{
unsigned long sig = _sig - 1;
if ((64 / 32) == 1)
set->sig[0] |= 1UL << sig;
else
set->sig[sig / 32] |= 1UL << (sig % 32);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigdelset(sigset_t *set, int _sig)
{
unsigned long sig = _sig - 1;
if ((64 / 32) == 1)
set->sig[0] &= ~(1UL << sig);
else
set->sig[sig / 32] &= ~(1UL << (sig % 32));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int sigismember(sigset_t *set, int _sig)
{
unsigned long sig = _sig - 1;
if ((64 / 32) == 1)
return 1 & (set->sig[0] >> sig);
else
return 1 & (set->sig[sig / 32] >> (sig % 32));
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int sigfindinword(unsigned long word)
{
return (({ unsigned long __t = (~(~word)); ( __builtin_constant_p(__t & -__t) ? generic_fls(__t & -__t) : ({ int __r; asm("clz%?\t%0, %1" : "=r"(__r) : "r"(__t & -__t)); 32-__r; }) ); }) - 1);
}
# 102 "include/linux/signal.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void signandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } }
# 132 "include/linux/signal.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } }
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigemptyset(sigset_t *set)
{
switch ((64 / 32)) {
default:
({ if ((sizeof(sigset_t)) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((set),(sizeof(sigset_t))); else memset((set),(0),(sizeof(sigset_t))); } (set); });
break;
case 2: set->sig[1] = 0;
case 1: set->sig[0] = 0;
break;
}
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigfillset(sigset_t *set)
{
switch ((64 / 32)) {
default:
({ if ((sizeof(sigset_t)) != 0) { if (__builtin_constant_p((-1)) && (-1) == 0) __memzero((set),(sizeof(sigset_t))); else memset((set),(-1),(sizeof(sigset_t))); } (set); });
break;
case 2: set->sig[1] = -1;
case 1: set->sig[0] = -1;
break;
}
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask)
{
set->sig[0] |= mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask)
{
set->sig[0] &= ~mask;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask)
{
return (set->sig[0] & mask) != 0;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask)
{
set->sig[0] = mask;
switch ((64 / 32)) {
default:
({ if ((sizeof(long)*((64 / 32)-1)) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((&set->sig[1]),(sizeof(long)*((64 / 32)-1))); else memset((&set->sig[1]),(0),(sizeof(long)*((64 / 32)-1))); } (&set->sig[1]); });
break;
case 2: set->sig[1] = 0;
case 1: ;
}
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask)
{
set->sig[0] = ~mask;
switch ((64 / 32)) {
default:
({ if ((sizeof(long)*((64 / 32)-1)) != 0) { if (__builtin_constant_p((-1)) && (-1) == 0) __memzero((&set->sig[1]),(sizeof(long)*((64 / 32)-1))); else memset((&set->sig[1]),(-1),(sizeof(long)*((64 / 32)-1))); } (&set->sig[1]); });
break;
case 2: set->sig[1] = -1;
case 1: ;
}
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_sigpending(struct sigpending *sig)
{
sigemptyset(&sig->signal);
do { (&sig->list)->next = (&sig->list); (&sig->list)->prev = (&sig->list); } while (0);
}
extern long do_sigpending(void *, unsigned long);
extern int sigprocmask(int, sigset_t *, sigset_t *);
struct pt_regs;
extern int get_signal_to_deliver(siginfo_t *info, struct pt_regs *regs, void *cookie);
# 26 "include/linux/sched.h" 2
# 1 "include/linux/securebits.h" 1
extern unsigned securebits;
# 27 "include/linux/sched.h" 2
# 1 "include/linux/fs_struct.h" 1
struct dentry;
struct vfsmount;
struct fs_struct {
atomic_t count;
rwlock_t lock;
int umask;
struct dentry * root, * pwd, * altroot;
struct vfsmount * rootmnt, * pwdmnt, * altrootmnt;
};
extern void exit_fs(struct task_struct *);
extern void set_fs_altroot(void);
extern void set_fs_root(struct fs_struct *, struct vfsmount *, struct dentry *);
extern void set_fs_pwd(struct fs_struct *, struct vfsmount *, struct dentry *);
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
extern void put_fs_struct(struct fs_struct *);
# 28 "include/linux/sched.h" 2
# 1 "include/linux/completion.h" 1
# 13 "include/linux/completion.h"
struct completion {
unsigned int done;
wait_queue_head_t wait;
};
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_completion(struct completion *x)
{
x->done = 0;
init_waitqueue_head(&x->wait);
}
extern void wait_for_completion(struct completion *);
extern void complete(struct completion *);
extern void complete_all(struct completion *);
# 30 "include/linux/sched.h" 2
# 1 "include/linux/pid.h" 1
enum pid_type
{
PIDTYPE_PID,
PIDTYPE_TGID,
PIDTYPE_PGID,
PIDTYPE_SID,
PIDTYPE_MAX
};
struct pid
{
int nr;
atomic_t count;
struct task_struct *task;
struct list_head task_list;
struct list_head hash_chain;
};
struct pid_link
{
struct list_head pid_chain;
struct pid *pidptr;
struct pid pid;
};
# 36 "include/linux/pid.h"
extern int attach_pid(struct task_struct *task, enum pid_type type, int nr);
extern void link_pid(struct task_struct *task, struct pid_link *link, struct pid *pid);
extern void detach_pid(struct task_struct *task, enum pid_type);
extern struct pid *find_pid(enum pid_type, int);
extern int alloc_pidmap(void);
extern void free_pidmap(int);
extern void switch_exec_pids(struct task_struct *leader, struct task_struct *thread);
# 31 "include/linux/sched.h" 2
# 1 "include/linux/percpu.h" 1
# 1 "include/linux/slab.h" 1
# 12 "include/linux/slab.h"
typedef struct kmem_cache_s kmem_cache_t;
# 1 "include/linux/gfp.h" 1
# 1 "include/linux/mmzone.h" 1
# 11 "include/linux/mmzone.h"
# 1 "include/linux/cache.h" 1
# 12 "include/linux/mmzone.h" 2
# 1 "include/linux/numa.h" 1
# 14 "include/linux/mmzone.h" 2
# 23 "include/linux/mmzone.h"
struct free_area {
struct list_head free_list;
unsigned long *map;
};
struct pglist_data;
# 45 "include/linux/mmzone.h"
struct per_cpu_pages {
int count;
int low;
int high;
int batch;
struct list_head list;
};
struct per_cpu_pageset {
struct per_cpu_pages pcp[2];
} ;
# 66 "include/linux/mmzone.h"
struct zone {
spinlock_t lock;
unsigned long free_pages;
unsigned long pages_min, pages_low, pages_high;
spinlock_t lru_lock;
struct list_head active_list;
struct list_head inactive_list;
atomic_t refill_counter;
unsigned long nr_active;
unsigned long nr_inactive;
int all_unreclaimable;
unsigned long pages_scanned;
# 103 "include/linux/mmzone.h"
int temp_priority;
int prev_priority;
struct free_area free_area[11];
# 135 "include/linux/mmzone.h"
wait_queue_head_t * wait_table;
unsigned long wait_table_size;
unsigned long wait_table_bits;
struct per_cpu_pageset pageset[1];
struct pglist_data *zone_pgdat;
struct page *zone_mem_map;
unsigned long zone_start_pfn;
char *name;
unsigned long spanned_pages;
unsigned long present_pages;
} ;
# 176 "include/linux/mmzone.h"
struct zonelist {
struct zone *zones[(1 << 0) * 3 + 1];
};
# 192 "include/linux/mmzone.h"
struct bootmem_data;
typedef struct pglist_data {
struct zone node_zones[3];
struct zonelist node_zonelists[3];
int nr_zones;
struct page *node_mem_map;
unsigned long *valid_addr_bitmap;
struct bootmem_data *bdata;
unsigned long node_start_pfn;
unsigned long node_present_pages;
unsigned long node_spanned_pages;
int node_id;
struct pglist_data *pgdat_next;
wait_queue_head_t kswapd_wait;
} pg_data_t;
extern int numnodes;
extern struct pglist_data *pgdat_list;
void get_zone_counts(unsigned long *active, unsigned long *inactive,
unsigned long *free);
void build_all_zonelists(void);
void wakeup_kswapd(struct zone *zone);
# 238 "include/linux/mmzone.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct zone *next_zone(struct zone *zone)
{
pg_data_t *pgdat = zone->zone_pgdat;
if (zone - pgdat->node_zones < 3 - 1)
zone++;
else if (pgdat->pgdat_next) {
pgdat = pgdat->pgdat_next;
zone = pgdat->node_zones;
} else
zone = ((void *)0);
return zone;
}
# 277 "include/linux/mmzone.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int is_highmem(struct zone *zone)
{
return (zone - zone->zone_pgdat->node_zones == 2);
}
struct ctl_table;
struct file;
int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *,
void *, size_t *);
extern void setup_per_zone_pages_min(void);
# 296 "include/linux/mmzone.h"
# 1 "include/linux/topology.h" 1
# 32 "include/linux/topology.h"
# 1 "include/linux/mmzone.h" 1
# 33 "include/linux/topology.h" 2
# 1 "include/asm/topology.h" 1
# 1 "include/asm-generic/topology.h" 1
# 5 "include/asm/topology.h" 2
# 36 "include/linux/topology.h" 2
# 46 "include/linux/topology.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int __next_node_with_cpus(int node)
{
do
++node;
while (node < numnodes && !({ cpumask_t __tmp__; __tmp__ = (((void)(0), ({ cpumask_t __tmp__; (__tmp__) = 1; __tmp__; }))); ((__tmp__) ? 1UL : 0UL); }));
return node;
}
# 297 "include/linux/mmzone.h" 2
extern struct pglist_data contig_page_data;
# 330 "include/linux/mmzone.h"
extern unsigned long node_online_map[((((1 << 0))+32 -1)/32)];
extern unsigned long memblk_online_map[(((1)+32 -1)/32)];
# 5 "include/linux/gfp.h" 2
# 66 "include/linux/gfp.h"
extern struct page * __alloc_pages(unsigned int, unsigned int, struct zonelist *);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct page * alloc_pages_node(int nid, unsigned int gfp_mask, unsigned int order)
{
if (__builtin_expect(!!(order >= 11), 0))
return ((void *)0);
return __alloc_pages(gfp_mask, order, (&contig_page_data)->node_zonelists + (gfp_mask & 0x03));
}
extern unsigned long __get_free_pages(unsigned int gfp_mask, unsigned int order);
extern unsigned long get_zeroed_page(unsigned int gfp_mask);
extern void __free_pages(struct page *page, unsigned int order);
extern void free_pages(unsigned long addr, unsigned int order);
extern void free_hot_page(struct page *page);
extern void free_cold_page(struct page *page);
void page_alloc_init(void);
# 16 "include/linux/slab.h" 2
# 56 "include/linux/slab.h"
extern void kmem_cache_init(void);
extern kmem_cache_t *kmem_find_general_cachep(size_t, int gfpflags);
extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned long,
void (*)(void *, kmem_cache_t *, unsigned long),
void (*)(void *, kmem_cache_t *, unsigned long));
extern int kmem_cache_destroy(kmem_cache_t *);
extern int kmem_cache_shrink(kmem_cache_t *);
extern void *kmem_cache_alloc(kmem_cache_t *, int);
extern void kmem_cache_free(kmem_cache_t *, void *);
extern unsigned int kmem_cache_size(kmem_cache_t *);
struct cache_sizes {
size_t cs_size;
kmem_cache_t *cs_cachep;
kmem_cache_t *cs_dmacachep;
};
extern struct cache_sizes malloc_sizes[];
extern void *__kmalloc(size_t, int);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc(size_t size, int flags)
{
if (__builtin_constant_p(size)) {
int i = 0;
# 1 "include/linux/kmalloc_sizes.h" 1
if (size <= 32) goto found; else i++;
if (size <= 64) goto found; else i++;
if (size <= 96) goto found; else i++;
if (size <= 128) goto found; else i++;
if (size <= 192) goto found; else i++;
if (size <= 256) goto found; else i++;
if (size <= 512) goto found; else i++;
if (size <= 1024) goto found; else i++;
if (size <= 2048) goto found; else i++;
if (size <= 4096) goto found; else i++;
if (size <= 8192) goto found; else i++;
if (size <= 16384) goto found; else i++;
if (size <= 32768) goto found; else i++;
if (size <= 65536) goto found; else i++;
if (size <= 131072) goto found; else i++;
# 87 "include/linux/slab.h" 2
{
extern void __you_cannot_kmalloc_that_much(void);
__you_cannot_kmalloc_that_much();
}
found:
return kmem_cache_alloc((flags & 0x01) ?
malloc_sizes[i].cs_dmacachep :
malloc_sizes[i].cs_cachep, flags);
}
return __kmalloc(size, flags);
}
extern void kfree(const void *);
extern unsigned int ksize(const void *);
extern int kmem_cache_reap(int);
extern kmem_cache_t *vm_area_cachep;
extern kmem_cache_t *mm_cachep;
extern kmem_cache_t *names_cachep;
extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *dquot_cachep;
extern kmem_cache_t *fs_cachep;
extern kmem_cache_t *signal_cachep;
extern kmem_cache_t *sighand_cachep;
extern kmem_cache_t *bio_cachep;
void ptrinfo(unsigned long addr);
extern atomic_t slab_reclaim_pages;
# 5 "include/linux/percpu.h" 2
# 1 "include/asm/percpu.h" 1
# 1 "include/asm-generic/percpu.h" 1
# 5 "include/asm/percpu.h" 2
# 8 "include/linux/percpu.h" 2
# 44 "include/linux/percpu.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void *__alloc_percpu(size_t size, size_t align)
{
void *ret = kmalloc(size, (0x10 | 0x40 | 0x80));
if (ret)
({ if ((size) != 0) { if (__builtin_constant_p((0)) && (0) == 0) __memzero((ret),(size)); else memset((ret),(0),(size)); } (ret); });
return ret;
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void free_percpu(const void *ptr)
{
kfree(ptr);
}
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void kmalloc_percpu_init(void) { }
# 32 "include/linux/sched.h" 2
struct exec_domain;
# 74 "include/linux/sched.h"
extern unsigned long avenrun[];
# 91 "include/linux/sched.h"
extern int nr_threads;
extern int last_pid;
extern __typeof__(unsigned long) per_cpu__process_counts;
extern int nr_processes(void);
extern unsigned long nr_running(void);
extern unsigned long nr_uninterruptible(void);
extern unsigned long nr_iowait(void);
# 1 "include/linux/param.h" 1
# 101 "include/linux/sched.h" 2
# 1 "include/linux/resource.h" 1
# 21 "include/linux/resource.h"
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;
};
struct rlimit {
unsigned long rlim_cur;
unsigned long rlim_max;
};
# 62 "include/linux/resource.h"
# 1 "include/asm/resource.h" 1
# 63 "include/linux/resource.h" 2
# 102 "include/linux/sched.h" 2
# 1 "include/linux/timer.h" 1
struct tvec_t_base_s;
struct timer_list {
struct list_head entry;
unsigned long expires;
spinlock_t lock;
unsigned long magic;
void (*function)(unsigned long);
unsigned long data;
struct tvec_t_base_s *base;
};
# 41 "include/linux/timer.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void init_timer(struct timer_list * timer)
{
timer->base = ((void *)0);
timer->magic = 0x4b87ad6e;
do { (void)(&timer->lock); } while(0);
}
# 58 "include/linux/timer.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int timer_pending(const struct timer_list * timer)
{
return timer->base != ((void *)0);
}
extern void add_timer_on(struct timer_list *timer, int cpu);
extern int del_timer(struct timer_list * timer);
extern int __mod_timer(struct timer_list *timer, unsigned long expires);
extern int mod_timer(struct timer_list *timer, unsigned long expires);
# 82 "include/linux/timer.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) void add_timer(struct timer_list * timer)
{
__mod_timer(timer, timer->expires);
}
extern void init_timers(void);
extern void run_local_timers(void);
extern void it_real_fn(unsigned long);
# 103 "include/linux/sched.h" 2
# 130 "include/linux/sched.h"
struct sched_param {
int sched_priority;
};
# 144 "include/linux/sched.h"
extern rwlock_t tasklist_lock;
extern spinlock_t mmlist_lock;
typedef struct task_struct task_t;
extern void sched_init(void);
extern void init_idle(task_t *idle, int cpu);
extern void show_state(void);
extern void show_regs(struct pt_regs *);
extern void show_stack(struct task_struct *task, unsigned long *sp);
void io_schedule(void);
long io_schedule_timeout(long timeout);
extern void cpu_init (void);
extern void trap_init(void);
extern void update_process_times(int user);
extern void update_one_process(struct task_struct *p, unsigned long user,
unsigned long system, int cpu);
extern void scheduler_tick(int user_tick, int system);
extern unsigned long cache_decay_ticks;
extern signed long schedule_timeout(signed long timeout);
void schedule(void);
struct namespace;
# 1 "include/linux/aio.h" 1
# 1 "include/linux/workqueue.h" 1
# 11 "include/linux/workqueue.h"
struct workqueue_struct;
struct work_struct {
unsigned long pending;
struct list_head entry;
void (*func)(void *);
void *data;
void *wq_data;
struct timer_list timer;
};
# 52 "include/linux/workqueue.h"
extern struct workqueue_struct *create_workqueue(const char *name);
extern void destroy_workqueue(struct workqueue_struct *wq);
extern int queue_work(struct workqueue_struct *wq, struct work_struct *work);
extern int queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay);
extern void flush_workqueue(struct workqueue_struct *wq);
extern int schedule_work(struct work_struct *work);
extern int schedule_delayed_work(struct work_struct *work, unsigned long delay);
extern void flush_scheduled_work(void);
extern int current_is_keventd(void);
extern void init_workqueues(void);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int cancel_delayed_work(struct work_struct *work)
{
return del_timer(&work->timer);
}
# 6 "include/linux/aio.h" 2
# 1 "include/linux/aio_abi.h" 1
# 32 "include/linux/aio_abi.h"
typedef unsigned long aio_context_t;
enum {
IOCB_CMD_PREAD = 0,
IOCB_CMD_PWRITE = 1,
IOCB_CMD_FSYNC = 2,
IOCB_CMD_FDSYNC = 3,
IOCB_CMD_NOOP = 6,
};
struct io_event {
__u64 data;
__u64 obj;
__s64 res;
__s64 res2;
};
# 68 "include/linux/aio_abi.h"
struct iocb {
__u64 aio_data;
__u32 aio_key, aio_reserved1;
__u16 aio_lio_opcode;
__s16 aio_reqprio;
__u32 aio_fildes;
__u64 aio_buf;
__u64 aio_nbytes;
__s64 aio_offset;
__u64 aio_reserved2;
__u64 aio_reserved3;
};
# 7 "include/linux/aio.h" 2
struct kioctx;
# 48 "include/linux/aio.h"
struct kiocb {
struct list_head ki_run_list;
long ki_flags;
int ki_users;
unsigned ki_key;
struct file *ki_filp;
struct kioctx *ki_ctx;
int (*ki_cancel)(struct kiocb *, struct io_event *);
long (*ki_retry)(struct kiocb *);
struct list_head ki_list;
void *ki_user_obj;
__u64 ki_user_data;
loff_t ki_pos;
char private[(24 * sizeof(long))];
};
# 85 "include/linux/aio.h"
struct aio_ring {
unsigned id;
unsigned nr;
unsigned head;
unsigned tail;
unsigned magic;
unsigned compat_features;
unsigned incompat_features;
unsigned header_length;
struct io_event io_events[0];
};
struct aio_ring_info {
unsigned long mmap_base;
unsigned long mmap_size;
struct page **ring_pages;
spinlock_t ring_lock;
long nr_pages;
unsigned nr, tail;
struct page *internal_pages[8];
};
struct kioctx {
atomic_t users;
int dead;
struct mm_struct *mm;
unsigned long user_id;
struct kioctx *next;
wait_queue_head_t wait;
spinlock_t ctx_lock;
int reqs_active;
struct list_head active_reqs;
struct list_head run_list;
unsigned max_reqs;
struct aio_ring_info ring_info;
struct work_struct wq;
};
extern unsigned aio_max_size;
extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
extern int aio_put_req(struct kiocb *iocb);
extern void kick_iocb(struct kiocb *iocb);
extern int aio_complete(struct kiocb *iocb, long res, long res2);
extern void __put_ioctx(struct kioctx *ctx);
struct mm_struct;
extern void exit_aio(struct mm_struct *mm);
extern struct kioctx *lookup_ioctx(unsigned long ctx_id);
extern int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
struct kioctx *lookup_ioctx(unsigned long ctx_id);
int io_submit_one(struct kioctx *ctx, struct iocb *user_iocb, struct iocb *iocb);
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h)
{
return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - ((size_t) &((struct kiocb *)0)->ki_list) );});
}
extern unsigned aio_max_nr, aio_max_size, aio_max_pinned;
# 184 "include/linux/sched.h" 2
struct mm_struct {
struct vm_area_struct * mmap;
struct rb_root mm_rb;
struct vm_area_struct * mmap_cache;
unsigned long free_area_cache;
pgd_t * pgd;
atomic_t mm_users;
atomic_t mm_count;
int map_count;
struct rw_semaphore mmap_sem;
spinlock_t page_table_lock;
struct list_head mmlist;
unsigned long start_code, end_code, start_data, end_data;
unsigned long start_brk, brk, start_stack;
unsigned long arg_start, arg_end, env_start, env_end;
unsigned long rss, total_vm, locked_vm;
unsigned long def_flags;
cpumask_t cpu_vm_mask;
unsigned long swap_address;
unsigned long saved_auxv[40];
unsigned dumpable:1;
mm_context_t context;
int core_waiters;
struct completion *core_startup_done, core_done;
rwlock_t ioctx_list_lock;
struct kioctx *ioctx_list;
struct kioctx default_kioctx;
};
extern int mmlist_nr;
struct sighand_struct {
atomic_t count;
struct k_sigaction action[64];
spinlock_t siglock;
};
# 245 "include/linux/sched.h"
struct signal_struct {
atomic_t count;
task_t *curr_target;
struct sigpending shared_pending;
int group_exit;
int group_exit_code;
struct task_struct *group_exit_task;
int notify_count;
int group_stop_count;
};
# 292 "include/linux/sched.h"
struct user_struct {
atomic_t __count;
atomic_t processes;
atomic_t files;
struct list_head uidhash_list;
uid_t uid;
};
extern struct user_struct *find_user(uid_t);
extern struct user_struct root_user;
typedef struct prio_array prio_array_t;
struct backing_dev_info;
struct reclaim_state;
struct k_itimer {
struct list_head list;
spinlock_t it_lock;
clockid_t it_clock;
timer_t it_id;
int it_overrun;
int it_overrun_last;
int it_requeue_pending;
int it_sigev_notify;
int it_sigev_signo;
sigval_t it_sigev_value;
unsigned long it_incr;
struct task_struct *it_process;
struct timer_list it_timer;
struct sigqueue *sigq;
};
struct io_context;
void exit_io_context(void);
struct task_struct {
volatile long state;
struct thread_info *thread_info;
atomic_t usage;
unsigned long flags;
unsigned long ptrace;
int lock_depth;
int prio, static_prio;
struct list_head run_list;
prio_array_t *array;
unsigned long sleep_avg;
long interactive_credit;
unsigned long long timestamp;
int activated;
unsigned long policy;
cpumask_t cpus_allowed;
unsigned int time_slice, first_time_slice;
struct list_head tasks;
struct list_head ptrace_children;
struct list_head ptrace_list;
struct mm_struct *mm, *active_mm;
struct linux_binfmt *binfmt;
int exit_code, exit_signal;
int pdeath_signal;
unsigned long personality;
int did_exec:1;
pid_t pid;
pid_t __pgrp;
pid_t tty_old_pgrp;
pid_t session;
pid_t tgid;
int leader;
struct task_struct *real_parent;
struct task_struct *parent;
struct list_head children;
struct list_head sibling;
struct task_struct *group_leader;
struct pid_link pids[PIDTYPE_MAX];
wait_queue_head_t wait_chldexit;
struct completion *vfork_done;
int *set_child_tid;
int *clear_child_tid;
unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
unsigned long it_real_incr, it_prof_incr, it_virt_incr;
struct timer_list real_timer;
struct list_head posix_timers;
unsigned long utime, stime, cutime, cstime;
unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw;
u64 start_time;
unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
uid_t uid,euid,suid,fsuid;
gid_t gid,egid,sgid,fsgid;
int ngroups;
gid_t groups[32];
kernel_cap_t cap_effective, cap_inheritable, cap_permitted;
int keep_capabilities:1;
struct user_struct *user;
struct rlimit rlim[11];
unsigned short used_math;
char comm[16];
int link_count, total_link_count;
struct tty_struct *tty;
struct sysv_sem sysvsem;
struct thread_struct thread;
struct fs_struct *fs;
struct files_struct *files;
struct namespace *namespace;
struct signal_struct *signal;
struct sighand_struct *sighand;
sigset_t blocked, real_blocked;
struct sigpending pending;
unsigned long sas_ss_sp;
size_t sas_ss_size;
int (*notifier)(void *priv);
void *notifier_data;
sigset_t *notifier_mask;
void *security;
u32 parent_exec_id;
u32 self_exec_id;
spinlock_t alloc_lock;
spinlock_t proc_lock;
spinlock_t switch_lock;
void *journal_info;
struct reclaim_state *reclaim_state;
struct dentry *proc_dentry;
struct backing_dev_info *backing_dev_info;
struct io_context *io_context;
unsigned long ptrace_message;
siginfo_t *last_siginfo;
};
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) pid_t process_group(struct task_struct *tsk)
{
return tsk->group_leader->__pgrp;
}
extern void __put_task_struct(struct task_struct *tsk);
# 507 "include/linux/sched.h"
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int set_cpus_allowed(task_t *p, cpumask_t new_mask)
{
return 0;
}
extern unsigned long long sched_clock(void);
# 523 "include/linux/sched.h"
extern void set_user_nice(task_t *p, long nice);
extern int task_prio(task_t *p);
extern int task_nice(task_t *p);
extern int task_curr(task_t *p);
extern int idle_cpu(int cpu);
void yield(void);
extern struct exec_domain default_exec_domain;
union thread_union {
struct thread_info thread_info;
unsigned long stack[2048*sizeof(long)/sizeof(long)];
};
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) int kstack_end(void *addr)
{
return !(((unsigned long)addr+sizeof(void*)-1) & ((8192)-sizeof(void*)));
}
extern union thread_union init_thread_union;
extern struct task_struct init_task;
extern struct mm_struct init_mm;
extern struct task_struct *find_task_by_pid(int pid);
extern void set_special_pids(pid_t session, pid_t pgrp);
extern void __set_special_pids(pid_t session, pid_t pgrp);
extern struct user_struct * alloc_uid(uid_t);
extern void free_uid(struct user_struct *);
extern void switch_uid(struct user_struct *);
# 1 "include/asm/current.h" 1
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct task_struct *get_current(void) __attribute__ (( __const__ ));
static __inline__ __attribute__((always_inline)) __attribute__((always_inline)) struct task_struct *get_current(void)
{
return current_thread_info()->task;
}
# 570 "include/linux/sched.h" 2
extern unsigned long itimer_ticks;
extern unsigned long itimer_next;
extern void do_timer(struct pt_regs *);
extern int wake_up_state(struct task_struct * tsk, unsigned int state);
extern int wake_up_process(struct task_struct * tsk);
static __inline__ __attribute__((always_inline)) __attrib