Support for the linux ipc syscalls on the alpha, where each one has

its own syscall rather than going through a demux function like
linux_ipc() on i386
This commit is contained in:
Andrew Gallatin 2000-11-01 23:17:31 +00:00
parent d0ce99c874
commit f11610e091
4 changed files with 63 additions and 38 deletions

View File

@ -269,19 +269,27 @@
197 UNIMPL LINUX
198 UNIMPL LINUX
199 UNIMPL LINUX
200 UNIMPL LINUX msgctl
201 UNIMPL LINUX msgget
202 UNIMPL LINUX msgrcv
203 UNIMPL LINUX msgsnd
204 UNIMPL LINUX semctl
205 UNIMPL LINUX semget
206 UNIMPL LINUX semop
200 STD LINUX { int linux_msgctl(int arg1, int arg2, \
caddr_t ptr); }
201 STD LINUX { int linux_msgget(int arg1, int arg2); }
202 STD LINUX { int linux_msgrcv(int arg1, caddr_t ptr, \
size_t arg2, long arg3, int arg4); }
203 STD LINUX { int linux_msgsnd(int arg1, caddr_t ptr, \
size_t arg2, long arg3, int arg4); }
204 STD LINUX { int linux_semctl(int arg1, int arg2, \
int arg3, caddr_t ptr); }
205 STD LINUX { int linux_semget(int arg1, int arg2, int arg3); }
206 STD LINUX { int linux_semop(int arg1, caddr_t ptr, \
int arg2); }
207 UNIMPL LINUX
208 STD LINUX { int linux_lchown(char *path, int uid, int gid); }
209 UNIMPL LINUX shmat
210 UNIMPL LINUX shmctl
211 UNIMPL LINUX shmdt
212 UNIMPL LINUX shmget
209 STD LINUX { int linux_shmat(int arg1, caddr_t ptr, \
int arg2, caddr_t arg3); }
210 STD LINUX { int linux_shmctl(int arg1, int arg2, \
caddr_t ptr); }
211 STD LINUX { int linux_shmdt(caddr_t ptr); }
212 STD LINUX { int linux_shmget(int arg1, size_t arg2, \
int arg3); }
213 UNIMPL LINUX
214 UNIMPL LINUX
215 UNIMPL LINUX

View File

@ -153,7 +153,7 @@ bsd_to_linux_shmid_ds(struct shmid_ds *bsp, struct linux_shmid_ds *lsp)
}
int
linux_semop(struct proc *p, struct linux_ipc_args *args)
linux_semop(struct proc *p, struct linux_semop_args *args)
{
struct semop_args /* {
int semid;
@ -168,7 +168,7 @@ linux_semop(struct proc *p, struct linux_ipc_args *args)
}
int
linux_semget(struct proc *p, struct linux_ipc_args *args)
linux_semget(struct proc *p, struct linux_semget_args *args)
{
struct semget_args /* {
key_t key;
@ -183,7 +183,7 @@ linux_semget(struct proc *p, struct linux_ipc_args *args)
}
int
linux_semctl(struct proc *p, struct linux_ipc_args *args)
linux_semctl(struct proc *p, struct linux_semctl_args *args)
{
struct linux_semid_ds linux_semid;
struct semid_ds bsd_semid;
@ -264,14 +264,14 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args)
case LINUX_SETALL:
/* FALLTHROUGH */
default:
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->arg3);
return EINVAL;
}
return __semctl(p, &bsd_args);
}
int
linux_msgsnd(struct proc *p, struct linux_ipc_args *args)
linux_msgsnd(struct proc *p, struct linux_msgsnd_args *args)
{
struct msgsnd_args /* {
int msqid;
@ -288,7 +288,7 @@ linux_msgsnd(struct proc *p, struct linux_ipc_args *args)
}
int
linux_msgrcv(struct proc *p, struct linux_ipc_args *args)
linux_msgrcv(struct proc *p, struct linux_msgrcv_args *args)
{
struct msgrcv_args /* {
int msqid;
@ -307,7 +307,7 @@ linux_msgrcv(struct proc *p, struct linux_ipc_args *args)
}
int
linux_msgget(struct proc *p, struct linux_ipc_args *args)
linux_msgget(struct proc *p, struct linux_msgget_args *args)
{
struct msgget_args /* {
key_t key;
@ -320,7 +320,7 @@ linux_msgget(struct proc *p, struct linux_ipc_args *args)
}
int
linux_msgctl(struct proc *p, struct linux_ipc_args *args)
linux_msgctl(struct proc *p, struct linux_msgctl_args *args)
{
struct msgctl_args /* {
int msqid;
@ -337,7 +337,7 @@ linux_msgctl(struct proc *p, struct linux_ipc_args *args)
}
int
linux_shmat(struct proc *p, struct linux_ipc_args *args)
linux_shmat(struct proc *p, struct linux_shmat_args *args)
{
struct shmat_args /* {
int shmid;
@ -351,14 +351,16 @@ linux_shmat(struct proc *p, struct linux_ipc_args *args)
bsd_args.shmflg = args->arg2;
if ((error = shmat(p, &bsd_args)))
return error;
#ifdef __i386__
if ((error = copyout(p->p_retval, (caddr_t)args->arg3, sizeof(int))))
return error;
p->p_retval[0] = 0;
#endif
return 0;
}
int
linux_shmdt(struct proc *p, struct linux_ipc_args *args)
linux_shmdt(struct proc *p, struct linux_shmdt_args *args)
{
struct shmdt_args /* {
void *shmaddr;
@ -369,7 +371,7 @@ linux_shmdt(struct proc *p, struct linux_ipc_args *args)
}
int
linux_shmget(struct proc *p, struct linux_ipc_args *args)
linux_shmget(struct proc *p, struct linux_shmget_args *args)
{
struct shmget_args /* {
key_t key;
@ -384,7 +386,7 @@ linux_shmget(struct proc *p, struct linux_ipc_args *args)
}
int
linux_shmctl(struct proc *p, struct linux_ipc_args *args)
linux_shmctl(struct proc *p, struct linux_shmctl_args *args)
{
struct shmid_ds bsd_shmid;
struct linux_shmid_ds linux_shmid;
@ -445,7 +447,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args)
case LINUX_SHM_LOCK:
case LINUX_SHM_UNLOCK:
default:
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->arg2);
return EINVAL;
}
}

View File

@ -32,19 +32,34 @@
#define _LINUX_IPC_H_
#ifndef __alpha__
int linux_msgctl __P((struct proc *, struct linux_ipc_args *));
int linux_msgget __P((struct proc *, struct linux_ipc_args *));
int linux_msgrcv __P((struct proc *, struct linux_ipc_args *));
int linux_msgsnd __P((struct proc *, struct linux_ipc_args *));
int linux_semctl __P((struct proc *, struct linux_ipc_args *));
int linux_semget __P((struct proc *, struct linux_ipc_args *));
int linux_semop __P((struct proc *, struct linux_ipc_args *));
#define linux_msgctl_args linux_ipc_args
#define linux_msgget_args linux_ipc_args
#define linux_msgrcv_args linux_ipc_args
#define linux_msgsnd_args linux_ipc_args
int linux_shmat __P((struct proc *, struct linux_ipc_args *));
int linux_shmctl __P((struct proc *, struct linux_ipc_args *));
int linux_shmdt __P((struct proc *, struct linux_ipc_args *));
int linux_shmget __P((struct proc *, struct linux_ipc_args *));
#endif /*!__alpha__*/
#define linux_semctl_args linux_ipc_args
#define linux_semget_args linux_ipc_args
#define linux_semop_args linux_ipc_args
#define linux_shmat_args linux_ipc_args
#define linux_shmctl_args linux_ipc_args
#define linux_shmdt_args linux_ipc_args
#define linux_shmget_args linux_ipc_args
int linux_msgctl __P((struct proc *, struct linux_msgctl_args *));
int linux_msgget __P((struct proc *, struct linux_msgget_args *));
int linux_msgrcv __P((struct proc *, struct linux_msgrcv_args *));
int linux_msgsnd __P((struct proc *, struct linux_msgsnd_args *));
int linux_semctl __P((struct proc *, struct linux_semctl_args *));
int linux_semget __P((struct proc *, struct linux_semget_args *));
int linux_semop __P((struct proc *, struct linux_semop_args *));
int linux_shmat __P((struct proc *, struct linux_shmat_args *));
int linux_shmctl __P((struct proc *, struct linux_shmctl_args *));
int linux_shmdt __P((struct proc *, struct linux_shmdt_args *));
int linux_shmget __P((struct proc *, struct linux_shmget_args *));
#endif /*__alpha__*/
#endif /* _LINUX_IPC_H_ */

View File

@ -5,14 +5,14 @@
MAINTAINER= marcel@FreeBSD.org
KMOD= linux
SRCS= linux_file.c linux_ioctl.c linux_machdep.c linux_misc.c \
SRCS= linux_file.c linux_ioctl.c linux_ipc.c linux_machdep.c linux_misc.c \
linux_signal.c linux_socket.c linux_stats.c linux_mib.c \
linux_dummy.c linux_sysvec.c linux_util.c \
opt_compat.h opt_linux.h opt_vmpage.h vnode_if.h
OBJS= linux_locore.o
.if ${MACHINE_ARCH} != "alpha"
SRCS+= imgact_linux.c linux_ipc.c
SRCS+= imgact_linux.c
.endif
EXPORT_SYMS=_linux_mod