lkml.org 
[lkml]   [2004]   [Feb]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 1 Feb 2004 22:43:44 -0800
FromAndrew Morton <>
SubjectRe: [PATCH] add syscalls.h
"Randy.Dunlap" <rddunlap@osdl.org> wrote:
>
> | Date: Tue, 27 Jan 2004 16:46:15 -0800
>  | From: Andrew Morton <akpm@osdl.org>
>  | Subject: Re: NGROUPS 2.6.2rc2
>  | 
>  | 
>  [snip]
>  | rant.  We have soooo many syscalls declared in .c files.  We had a bug due
>  | to this a while back.  Problem is, we have no anointed header in which to
>  | place them.  include/linux/syscalls.h would suit.  And unistd.h for
>  | arch-specific syscalls.  But that's not appropriate to this patch.
> 
> 
>  I am working on this.  Is anyone else?
> 
>  I have parts 2.6.1-non-arch* ready for testing, I believe,
>  except that it will likely require more changes/additions.
> 
>  I have begun on 2.6.1-arch* but still have a ways to go.
> 
>  Caveats:
>  I have only patched 2.6.1.  I will update patches for 2.6.2-rc-current.
>  I have only tested by building allmodconfig on P4.
>  Have not test-booted yet.
> 
>  Patch files for 2.6.1 are here:

Looks sane to me.

+ * syscalls.h - Linux syscall interfaces (non-arch-specific)
...
+#include <linux/aio_abi.h>
+#include <linux/sched.h>
+#include <linux/socket.h>
+#include <linux/sysctl.h>
+#include <linux/time.h>
+#include <linux/posix-timers.h>
+#include <linux/uio.h>
+
+#include <asm/signal.h>
+#include <asm/stat.h>

I'd be inclined to lose the includes and just add forward decls for
structs.  Of course, you'll need the includes for typedefs.  

+extern asmlinkage long sys_unlink(const char __user *pathname);
+extern asmlinkage long sys_chmod(const char __user *filename, mode_t mode);
+extern asmlinkage long sys_fchmod(unsigned int fd, mode_t mode);

Maybe lose the `extern' too.  It's just a waste of space.  I normally put
it in for consistency if the surrounding code is done that way, but for a
new header file, why bother?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:00    [from the cache]
©2003-2008