diff options
author | gallatin <gallatin@FreeBSD.org> | 2000-11-01 23:17:31 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2000-11-01 23:17:31 +0000 |
commit | cf4f3816fdb38049598c53e62b6c94b42629f2b7 (patch) | |
tree | 0f503a7e4817ea73f8fb70ddbe424a106a848a54 /sys/compat/linux | |
parent | b8fdbf65c5514fbd472bc75315c7d69dd84619ed (diff) | |
download | FreeBSD-src-cf4f3816fdb38049598c53e62b6c94b42629f2b7.zip FreeBSD-src-cf4f3816fdb38049598c53e62b6c94b42629f2b7.tar.gz |
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
Diffstat (limited to 'sys/compat/linux')
-rw-r--r-- | sys/compat/linux/linux_ipc.c | 28 | ||||
-rw-r--r-- | sys/compat/linux/linux_ipc.h | 43 |
2 files changed, 44 insertions, 27 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index b5e5381..37b5ed5 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -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; } } diff --git a/sys/compat/linux/linux_ipc.h b/sys/compat/linux/linux_ipc.h index b5c1255..d78a6e3 100644 --- a/sys/compat/linux/linux_ipc.h +++ b/sys/compat/linux/linux_ipc.h @@ -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 *)); - -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_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 + +#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_ */ |