Skip to contentSkip to conversation

make arch-independent syscalls <long>

PATCH/RFC Randy.Dunlap 1 participant 1 message Feb 14, 2003

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Hi,

Based on a thread with Jamie Lokier[1,2], this patch converts several syscalls from <int> to <long>.

Jamie's list included sys_epoll calls, but Davide has already modified those.

The rest of Jamie's list was:
sys_set_tid_address
sys_futex
sys_sched_setaffinity
sys_sched_getaffinity
sys_remap_file_pages
sys_lookup_dcookie
sys_pause
and my searching has only added
old_readdir

Comments?

Thanks,
~Randy

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=104379012431181&w=2
or (same message)
[2] http://www.lkml.org/archive/2003/1/28/231/index.html

patch_name: syscalls-long-2560.patch
patch_version: 2003-02-13.22:58:43
author: Randy.Dunlap <[email protected]>
description: _
product: Linux
product_versions: linux-2560
changelog: _
URL: _
requires: _
conflicts: _
diffstat: =

 arch/x86_64/ia32/sys_ia32.c |    8 ++++----
 fs/dcookies.c               |    2 +-
 fs/readdir.c                |    2 +-
 include/linux/futex.h       |    2 +-
 include/linux/mm.h          |    2 +-
 kernel/fork.c               |    2 +-
 kernel/futex.c              |    2 +-
 kernel/sched.c              |    4 ++--
 kernel/signal.c             |    2 +-
 mm/fremap.c                 |    2 +-
 10 files changed, 14 insertions(+), 14 deletions(-)
arch/x86_64/ia32/sys_ia32.c renamed from arch/x86_64/ia32/sys_ia32.c%LONG +4 -4
diff -Naur ./arch/x86_64/ia32/sys_ia32.c%LONG ./arch/x86_64/ia32/sys_ia32.c
@@ -2205,8 +2205,8 @@
 	return -ENOSYS ;
 } 
 
-int sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); 
-int sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); 
+long sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); 
+long sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); 
 
 /* only works on LE */
 long sys32_sched_setaffinity(pid_t pid, unsigned int len,
@@ -2239,14 +2239,14 @@
 	return err;
 }
 
-extern int sys_futex(unsigned long uaddr, int op, int val, struct timespec *t); 
+extern long sys_futex(unsigned long uaddr, int op, int val, struct timespec *t); 
 
 asmlinkage long
 sys32_futex(unsigned long uaddr, int op, int val, struct compat_timespec *utime32)
 {
 	struct timespec t;
 	mm_segment_t oldfs = get_fs(); 
-	int err;
+	long err;
 
 	if (utime32) {
 		if (verify_area(VERIFY_READ, utime32, sizeof(*utime32)))
include/linux/futex.h renamed from include/linux/futex.h%LONG +1 -1
diff -Naur ./include/linux/futex.h%LONG ./include/linux/futex.h
@@ -6,6 +6,6 @@
 #define FUTEX_WAKE (1)
 #define FUTEX_FD (2)
 
-extern asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime);
+extern asmlinkage long sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime);
 
 #endif
include/linux/mm.h renamed from include/linux/mm.h%LONG +1 -1
diff -Naur ./include/linux/mm.h%LONG ./include/linux/mm.h
@@ -419,7 +419,7 @@
 extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access);
 extern int make_pages_present(unsigned long addr, unsigned long end);
 extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
-extern int sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock);
+extern long sys_remap_file_pages(unsigned long start, unsigned long size, unsigned long prot, unsigned long pgoff, unsigned long nonblock);
 
 
 extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write);
fs/dcookies.c renamed from fs/dcookies.c%LONG +1 -1
diff -Naur ./fs/dcookies.c%LONG ./fs/dcookies.c
@@ -142,7 +142,7 @@
 /* And here is where the userspace process can look up the cookie value
  * to retrieve the path.
  */
-asmlinkage int sys_lookup_dcookie(u64 cookie64, char * buf, size_t len)
+asmlinkage long sys_lookup_dcookie(u64 cookie64, char * buf, size_t len)
 {
 	unsigned long cookie = (unsigned long)cookie64;
 	int err = -EINVAL;
fs/readdir.c renamed from fs/readdir.c%LONG +1 -1
diff -Naur ./fs/readdir.c%LONG ./fs/readdir.c
@@ -80,7 +80,7 @@
 	return 0;
 }
 
-asmlinkage int old_readdir(unsigned int fd, void * dirent, unsigned int count)
+asmlinkage long old_readdir(unsigned int fd, void * dirent, unsigned int count)
 {
 	int error;
 	struct file * file;
kernel/fork.c renamed from kernel/fork.c%LONG +1 -1
diff -Naur ./kernel/fork.c%LONG ./kernel/fork.c
@@ -715,7 +715,7 @@
 	p->flags = new_flags;
 }
 
-asmlinkage int sys_set_tid_address(int *tidptr)
+asmlinkage long sys_set_tid_address(int *tidptr)
 {
 	current->clear_child_tid = tidptr;
 
kernel/futex.c renamed from kernel/futex.c%LONG +1 -1
diff -Naur ./kernel/futex.c%LONG ./kernel/futex.c
@@ -437,7 +437,7 @@
 	return ret;
 }
 
-asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime)
+asmlinkage long sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime)
 {
 	unsigned long pos_in_page;
 	int ret;
kernel/sched.c renamed from kernel/sched.c%LONG +2 -2
diff -Naur ./kernel/sched.c%LONG ./kernel/sched.c
@@ -1773,7 +1773,7 @@
  * @len: length in bytes of the bitmask pointed to by user_mask_ptr
  * @user_mask_ptr: user-space pointer to the new cpu mask
  */
-asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
+asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len,
 				      unsigned long *user_mask_ptr)
 {
 	unsigned long new_mask;
@@ -1825,7 +1825,7 @@
  * @len: length in bytes of the bitmask pointed to by user_mask_ptr
  * @user_mask_ptr: user-space pointer to hold the current cpu mask
  */
-asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len,
+asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
 				      unsigned long *user_mask_ptr)
 {
 	unsigned int real_len;
kernel/signal.c renamed from kernel/signal.c%LONG +1 -1
diff -Naur ./kernel/signal.c%LONG ./kernel/signal.c
@@ -2168,7 +2168,7 @@
 
 #ifndef HAVE_ARCH_SYS_PAUSE
 
-asmlinkage int
+asmlinkage long
 sys_pause(void)
 {
 	current->state = TASK_INTERRUPTIBLE;
mm/fremap.c renamed from mm/fremap.c%LONG +1 -1
diff -Naur ./mm/fremap.c%LONG ./mm/fremap.c
@@ -110,7 +110,7 @@
  * or use PROT_NONE in the original linear mapping and add a special
  * SIGBUS pagefault handler to reinstall zapped mappings.
  */
-int sys_remap_file_pages(unsigned long start, unsigned long size,
+long sys_remap_file_pages(unsigned long start, unsigned long size,
 	unsigned long prot, unsigned long pgoff, unsigned long flags)
 {
 	struct mm_struct *mm = current->mm;