summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_ipc.c')
-rw-r--r--sys/compat/linux/linux_ipc.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index de9b47a..9053efc 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -149,7 +149,7 @@ bsd_to_linux_shmid_ds(struct shmid_ds *bsp, struct l_shmid_ds *lsp)
}
int
-linux_semop(struct proc *p, struct linux_semop_args *args)
+linux_semop(struct thread *td, struct linux_semop_args *args)
{
struct semop_args /* {
int semid;
@@ -160,11 +160,11 @@ linux_semop(struct proc *p, struct linux_semop_args *args)
bsd_args.semid = args->semid;
bsd_args.sops = (struct sembuf *)args->tsops;
bsd_args.nsops = args->nsops;
- return semop(p, &bsd_args);
+ return semop(td, &bsd_args);
}
int
-linux_semget(struct proc *p, struct linux_semget_args *args)
+linux_semget(struct thread *td, struct linux_semget_args *args)
{
struct semget_args /* {
key_t key;
@@ -175,11 +175,11 @@ linux_semget(struct proc *p, struct linux_semget_args *args)
bsd_args.key = args->key;
bsd_args.nsems = args->nsems;
bsd_args.semflg = args->semflg;
- return semget(p, &bsd_args);
+ return semget(td, &bsd_args);
}
int
-linux_semctl(struct proc *p, struct linux_semctl_args *args)
+linux_semctl(struct thread *td, struct linux_semctl_args *args)
{
struct l_semid_ds linux_semid;
struct __semctl_args /* {
@@ -226,13 +226,13 @@ linux_semctl(struct proc *p, struct linux_semctl_args *args)
unptr->buf = stackgap_alloc(&sg, sizeof(struct semid_ds));
linux_to_bsd_semid_ds(&linux_semid, unptr->buf);
bsd_args.arg = unptr;
- return __semctl(p, &bsd_args);
+ return __semctl(td, &bsd_args);
case LINUX_IPC_STAT:
bsd_args.cmd = IPC_STAT;
unptr = stackgap_alloc(&sg, sizeof(union semun));
unptr->buf = stackgap_alloc(&sg, sizeof(struct semid_ds));
bsd_args.arg = unptr;
- error = __semctl(p, &bsd_args);
+ error = __semctl(td, &bsd_args);
if (error)
return error;
bsd_to_linux_semid_ds(unptr->buf, &linux_semid);
@@ -246,11 +246,11 @@ linux_semctl(struct proc *p, struct linux_semctl_args *args)
uprintf("linux: 'ipc' typ=%d not implemented\n", args->cmd);
return EINVAL;
}
- return __semctl(p, &bsd_args);
+ return __semctl(td, &bsd_args);
}
int
-linux_msgsnd(struct proc *p, struct linux_msgsnd_args *args)
+linux_msgsnd(struct thread *td, struct linux_msgsnd_args *args)
{
struct msgsnd_args /* {
int msqid;
@@ -263,11 +263,11 @@ linux_msgsnd(struct proc *p, struct linux_msgsnd_args *args)
bsd_args.msgp = args->msgp;
bsd_args.msgsz = args->msgsz;
bsd_args.msgflg = args->msgflg;
- return msgsnd(p, &bsd_args);
+ return msgsnd(td, &bsd_args);
}
int
-linux_msgrcv(struct proc *p, struct linux_msgrcv_args *args)
+linux_msgrcv(struct thread *td, struct linux_msgrcv_args *args)
{
struct msgrcv_args /* {
int msqid;
@@ -282,11 +282,11 @@ linux_msgrcv(struct proc *p, struct linux_msgrcv_args *args)
bsd_args.msgsz = args->msgsz;
bsd_args.msgtyp = 0; /* XXX - args->msgtyp; */
bsd_args.msgflg = args->msgflg;
- return msgrcv(p, &bsd_args);
+ return msgrcv(td, &bsd_args);
}
int
-linux_msgget(struct proc *p, struct linux_msgget_args *args)
+linux_msgget(struct thread *td, struct linux_msgget_args *args)
{
struct msgget_args /* {
key_t key;
@@ -295,11 +295,11 @@ linux_msgget(struct proc *p, struct linux_msgget_args *args)
bsd_args.key = args->key;
bsd_args.msgflg = args->msgflg;
- return msgget(p, &bsd_args);
+ return msgget(td, &bsd_args);
}
int
-linux_msgctl(struct proc *p, struct linux_msgctl_args *args)
+linux_msgctl(struct thread *td, struct linux_msgctl_args *args)
{
struct msgctl_args /* {
int msqid;
@@ -311,12 +311,12 @@ linux_msgctl(struct proc *p, struct linux_msgctl_args *args)
bsd_args.msqid = args->msqid;
bsd_args.cmd = args->cmd;
bsd_args.buf = (struct msqid_ds *)args->buf;
- error = msgctl(p, &bsd_args);
+ error = msgctl(td, &bsd_args);
return ((args->cmd == LINUX_IPC_RMID && error == EINVAL) ? 0 : error);
}
int
-linux_shmat(struct proc *p, struct linux_shmat_args *args)
+linux_shmat(struct thread *td, struct linux_shmat_args *args)
{
struct shmat_args /* {
int shmid;
@@ -328,29 +328,29 @@ linux_shmat(struct proc *p, struct linux_shmat_args *args)
bsd_args.shmid = args->shmid;
bsd_args.shmaddr = args->shmaddr;
bsd_args.shmflg = args->shmflg;
- if ((error = shmat(p, &bsd_args)))
+ if ((error = shmat(td, &bsd_args)))
return error;
#ifdef __i386__
- if ((error = copyout(p->p_retval, (caddr_t)args->raddr, sizeof(l_ulong))))
+ if ((error = copyout(td->td_retval, (caddr_t)args->raddr, sizeof(l_ulong))))
return error;
- p->p_retval[0] = 0;
+ td->td_retval[0] = 0;
#endif
return 0;
}
int
-linux_shmdt(struct proc *p, struct linux_shmdt_args *args)
+linux_shmdt(struct thread *td, struct linux_shmdt_args *args)
{
struct shmdt_args /* {
void *shmaddr;
} */ bsd_args;
bsd_args.shmaddr = args->shmaddr;
- return shmdt(p, &bsd_args);
+ return shmdt(td, &bsd_args);
}
int
-linux_shmget(struct proc *p, struct linux_shmget_args *args)
+linux_shmget(struct thread *td, struct linux_shmget_args *args)
{
struct shmget_args /* {
key_t key;
@@ -361,11 +361,11 @@ linux_shmget(struct proc *p, struct linux_shmget_args *args)
bsd_args.key = args->key;
bsd_args.size = args->size;
bsd_args.shmflg = args->shmflg;
- return shmget(p, &bsd_args);
+ return shmget(td, &bsd_args);
}
int
-linux_shmctl(struct proc *p, struct linux_shmctl_args *args)
+linux_shmctl(struct thread *td, struct linux_shmctl_args *args)
{
struct l_shmid_ds linux_shmid;
struct shmctl_args /* {
@@ -381,7 +381,7 @@ linux_shmctl(struct proc *p, struct linux_shmctl_args *args)
bsd_args.shmid = args->shmid;
bsd_args.cmd = IPC_STAT;
bsd_args.buf = (struct shmid_ds*)stackgap_alloc(&sg, sizeof(struct shmid_ds));
- if ((error = shmctl(p, &bsd_args)))
+ if ((error = shmctl(td, &bsd_args)))
return error;
bsd_to_linux_shmid_ds(bsd_args.buf, &linux_shmid);
return copyout(&linux_shmid, (caddr_t)args->buf, sizeof(linux_shmid));
@@ -394,7 +394,7 @@ linux_shmctl(struct proc *p, struct linux_shmctl_args *args)
linux_to_bsd_shmid_ds(&linux_shmid, bsd_args.buf);
bsd_args.shmid = args->shmid;
bsd_args.cmd = IPC_SET;
- return shmctl(p, &bsd_args);
+ return shmctl(td, &bsd_args);
case LINUX_IPC_RMID:
bsd_args.shmid = args->shmid;
@@ -408,7 +408,7 @@ linux_shmctl(struct proc *p, struct linux_shmctl_args *args)
bsd_args.buf = (struct shmid_ds*)stackgap_alloc(&sg, sizeof(struct shmid_ds));
linux_to_bsd_shmid_ds(&linux_shmid, bsd_args.buf);
}
- return shmctl(p, &bsd_args);
+ return shmctl(td, &bsd_args);
case LINUX_IPC_INFO:
case LINUX_SHM_STAT:
OpenPOWER on IntegriCloud