Revision 8fcd3692 linux-user/syscall.c

b/linux-user/syscall.c
105 105
#undef _syscall6
106 106

  
107 107
#define _syscall0(type,name)		\
108
type name (void)			\
108
static type name (void)			\
109 109
{					\
110 110
	return syscall(__NR_##name);	\
111 111
}
112 112

  
113 113
#define _syscall1(type,name,type1,arg1)		\
114
type name (type1 arg1)				\
114
static type name (type1 arg1)			\
115 115
{						\
116 116
	return syscall(__NR_##name, arg1);	\
117 117
}
118 118

  
119 119
#define _syscall2(type,name,type1,arg1,type2,arg2)	\
120
type name (type1 arg1,type2 arg2)			\
120
static type name (type1 arg1,type2 arg2)		\
121 121
{							\
122 122
	return syscall(__NR_##name, arg1, arg2);	\
123 123
}
124 124

  
125 125
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)	\
126
type name (type1 arg1,type2 arg2,type3 arg3)			\
126
static type name (type1 arg1,type2 arg2,type3 arg3)		\
127 127
{								\
128 128
	return syscall(__NR_##name, arg1, arg2, arg3);		\
129 129
}
130 130

  
131 131
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4)	\
132
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4)				\
132
static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4)			\
133 133
{										\
134 134
	return syscall(__NR_##name, arg1, arg2, arg3, arg4);			\
135 135
}
136 136

  
137 137
#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,	\
138 138
		  type5,arg5)							\
139
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5)		\
139
static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5)	\
140 140
{										\
141 141
	return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5);		\
142 142
}
......
144 144

  
145 145
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,	\
146 146
		  type5,arg5,type6,arg6)					\
147
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6)	\
147
static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,	\
148
                  type6 arg6)							\
148 149
{										\
149 150
	return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6);	\
150 151
}
......
204 205
_syscall3(int, sys_getdents64, uint, fd, struct dirent64 *, dirp, uint, count);
205 206
#endif
206 207
_syscall2(int, sys_getpriority, int, which, int, who);
208
#if !defined (__x86_64__)
207 209
_syscall5(int, _llseek,  uint,  fd, ulong, hi, ulong, lo,
208 210
          loff_t *, res, uint, wh);
211
#endif
209 212
#if defined(TARGET_NR_linkat) && defined(__NR_linkat)
210 213
_syscall5(int,sys_linkat,int,olddirfd,const char *,oldpath,
211 214
	  int,newdirfd,const char *,newpath,int,flags)
......
253 256
_syscall4(int,sys_utimensat,int,dirfd,const char *,pathname,
254 257
          const struct timespec *,tsp,int,flags)
255 258
#endif
259
#if defined(USE_NPTL)
256 260
#if defined(TARGET_NR_futex) && defined(__NR_futex)
257 261
_syscall6(int,sys_futex,int *,uaddr,int,op,int,val,
258 262
          const struct timespec *,timeout,int *,uaddr2,int,val3)
259
          
263
#endif
260 264
#endif
261 265

  
262 266
extern int personality(int);
......
2522 2526
}
2523 2527

  
2524 2528
/* specific and weird i386 syscalls */
2525
abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr, 
2526
                       unsigned long bytecount)
2529
static abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr,
2530
                              unsigned long bytecount)
2527 2531
{
2528 2532
    abi_long ret;
2529 2533

  
......
2544 2548
    return ret;
2545 2549
}
2546 2550

  
2547
abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr)
2551
static abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr)
2548 2552
{
2549 2553
    uint64_t *gdt_table = g2h(env->gdt.base);
2550 2554
    struct target_modify_ldt_ldt_s ldt_info;
......
2629 2633
    return 0;
2630 2634
}
2631 2635

  
2632
abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr)
2636
static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr)
2633 2637
{
2634 2638
    struct target_modify_ldt_ldt_s *target_ldt_info;
2635 2639
    uint64_t *gdt_table = g2h(env->gdt.base);
......
2677 2681
}
2678 2682

  
2679 2683
#ifndef TARGET_ABI32
2680
abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
2684
static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr)
2681 2685
{
2682 2686
    abi_long ret;
2683 2687
    abi_ulong val;
......
3150 3154
   futexes locally would make futexes shared between multiple processes
3151 3155
   tricky.  However they're probably useless because guest atomic
3152 3156
   operations won't work either.  */
3153
int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout,
3154
             target_ulong uaddr2, int val3)
3157
static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout,
3158
                    target_ulong uaddr2, int val3)
3155 3159
{
3156 3160
    struct timespec ts, *pts;
3157 3161

  

Also available in: Unified diff