lkml.org 
[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix shmat
On Mon, 23 Feb 2004 19:15:04 +0100 Manfred Spraul <manfred@colorfullife.com> wrote:

| From the bitkeeper commit message queue:
|
| >
| > sys_shmat() need to be declared asmlinkage. This causes breakage when we
| > actually get the proper prototypes into caller's scope.
| >
| >
| Why? sys_shmat is not a system call. Or at least there is a comment just
| before the implementation that this is not a syscall.
| I think either the asmlinkage or the comment are wrong:
| /*
| * Fix shmaddr, allocate descriptor, map shm, add attach descriptor to
| lists.
| *
| * NOTE! Despite the name, this is NOT a direct system call entrypoint. The
|
| > * "raddr" thing points to kernel space, and there has to be a wrapper around
| > * this.
| > */
| >-long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
| >+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
| > {
| > struct shmid_kernel *shp;
| > unsigned long addr;
| >
|
| I'd propose to remove the asmlinkage and to move the prototype (without
| asmlinkage) back from syscalls.h to shm.h - what do you think?

It's not a syscall AFAICT.
It's not listed in any .S files, like most syscalls are.
However, it is listed in kernel/sys.c as a "cond_syscall",
which I'm guessing is incorrect.

I'd like to rename it so that it doesn't begin with "sys_".

--
~Randy
-
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 14:01    [W:0.039 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site