summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ipc.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2001-09-08 19:07:04 +0000
committermarcel <marcel@FreeBSD.org>2001-09-08 19:07:04 +0000
commitdf61d9eb64550a7afc1b41ccc9e0261af45c98c1 (patch)
tree684b7cfa2a29ef6b8c2244d13f69d58e1e89c819 /sys/compat/linux/linux_ipc.h
parentbc484946ce384f7bb29f0d6da97f0d3eb7084574 (diff)
downloadFreeBSD-src-df61d9eb64550a7afc1b41ccc9e0261af45c98c1.zip
FreeBSD-src-df61d9eb64550a7afc1b41ccc9e0261af45c98c1.tar.gz
Round of cleanups and enhancements. These include (in random order):
o Introduce private types for use in linux syscalls for two reasons: 1. establish type independence for ease in porting and, 2. provide a visual queue as to which syscalls have proper prototypes to further cleanup the i386/alpha split. Linuxulator types are prefixed by 'l_'. void and char have not been "virtualized". o Provide dummy functions for all syscalls and remove dummy functions or implementations of truely obsolete syscalls. o Sanitize the shm*, sem* and msg* syscalls. o Make a first attempt to implement the linux_sysctl syscall. At this time it only returns one MIB (KERN_VERSION), but most importantly, it tells us when we need to add additional sysctls :-) o Bump the kenel version up to 2.4.2 (this is not the same as the KERN_VERSION MIB, BTW). o Implement new syscalls, of which most are specific to i386. Our syscall table is now up to date with Linux 2.4.2. Some highlights: - Implement the 32-bit uid_t and gid_t bases syscalls. - Implement a couple of 64-bit file size/offset bases syscalls. o Fix or improve numerous syscalls and prototypes. o Reduce style(9) violations while I'm here. Especially indentation inconsistencies within the same file are addressed. Re-indenting did not obfuscate actual changes to the extend that it could not be combined. NOTE: I spend some time testing these changes and found that if there were regressions, they were not caused by these changes AFAICT. It was observed that installing a RH 7.1 runtime environment did make matters worse. Hangs and/or reboots have been observed with and without these changes, so when it failed to make life better in cases it doesn't look like it made it worse.
Diffstat (limited to 'sys/compat/linux/linux_ipc.h')
-rw-r--r--sys/compat/linux/linux_ipc.h92
1 files changed, 79 insertions, 13 deletions
diff --git a/sys/compat/linux/linux_ipc.h b/sys/compat/linux/linux_ipc.h
index 946d963..d0db461 100644
--- a/sys/compat/linux/linux_ipc.h
+++ b/sys/compat/linux/linux_ipc.h
@@ -31,21 +31,86 @@
#ifndef _LINUX_IPC_H_
#define _LINUX_IPC_H_
-#ifndef __alpha__
+#ifdef __i386__
-#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
+struct linux_msgctl_args
+{
+ l_int msqid;
+ l_int cmd;
+ struct l_msqid_ds *buf;
+};
-#define linux_semctl_args linux_ipc_args
-#define linux_semget_args linux_ipc_args
-#define linux_semop_args linux_ipc_args
+struct linux_msgget_args
+{
+ l_key_t key;
+ l_int msgflg;
+};
-#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
+struct linux_msgrcv_args
+{
+ l_int msqid;
+ struct l_msgbuf *msgp;
+ l_size_t msgsz;
+ l_long msgtyp;
+ l_int msgflg;
+};
+
+struct linux_msgsnd_args
+{
+ l_int msqid;
+ struct l_msgbuf *msgp;
+ l_size_t msgsz;
+ l_int msgflg;
+};
+
+struct linux_semctl_args
+{
+ l_int semid;
+ l_int semnum;
+ l_int cmd;
+ union l_semun arg;
+};
+
+struct linux_semget_args
+{
+ l_key_t key;
+ l_int nsems;
+ l_int semflg;
+};
+
+struct linux_semop_args
+{
+ l_int semid;
+ struct l_sembuf *tsops;
+ l_uint nsops;
+};
+
+struct linux_shmat_args
+{
+ l_int shmid;
+ char *shmaddr;
+ l_int shmflg;
+ l_ulong *raddr;
+};
+
+struct linux_shmctl_args
+{
+ l_int shmid;
+ l_int cmd;
+ struct l_shmid_ds *buf;
+};
+
+struct linux_shmdt_args
+{
+ char *shmaddr;
+};
+
+struct linux_shmget_args
+{
+ l_key_t key;
+ l_size_t size;
+ l_int shmflg;
+};
int linux_msgctl __P((struct proc *, struct linux_msgctl_args *));
int linux_msgget __P((struct proc *, struct linux_msgget_args *));
@@ -60,6 +125,7 @@ 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 /* __i386__ */
#endif /* _LINUX_IPC_H_ */
OpenPOWER on IntegriCloud