PERFORCE change 103761 for review
Roman Divacky
rdivacky at FreeBSD.org
Sun Aug 13 13:28:09 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=103761
Change 103761 by rdivacky at rdivacky_witten on 2006/08/13 13:27:15
Move mq* syscalls to MD, it uses timespec.
Affected files ...
.. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_ipc.c#5 edit
.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#45 edit
Differences ...
==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_ipc.c#5 (text+ko) ====
@@ -40,7 +40,6 @@
#include <sys/shm.h>
#include "opt_compat.h"
-#include "opt_posix.h"
#ifdef COMPAT_LINUX32
#include <machine/../linux32/linux.h>
@@ -806,66 +805,6 @@
}
}
-int
-linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_open(td, (struct kmq_open_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_unlink(td, (struct kmq_unlink_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_timedsend(td, (struct kmq_timedsend_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_notify(td, (struct kmq_notify_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
-int
-linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
-{
-#ifdef P1003_1B_MQUEUE
- return kmq_setattr(td, (struct kmq_setattr_args *) args);
-#else
- return (ENOSYS);
-#endif
-}
-
MODULE_DEPEND(linux, sysvmsg, 1, 1, 1);
MODULE_DEPEND(linux, sysvsem, 1, 1, 1);
MODULE_DEPEND(linux, sysvshm, 1, 1, 1);
==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#45 (text+ko) ====
@@ -65,6 +65,8 @@
#include <i386/include/pcb.h> /* needed for pcb definition in linux_set_thread_area */
+#include "opt_posix.h"
+
extern struct sx emul_shared_lock;
extern struct sx emul_lock;
@@ -1129,3 +1131,65 @@
{
return ktimer_delete(td, (struct ktimer_delete_args *) args);
}
+
+/* XXX: this wont work with module - convert it */
+int
+linux_mq_open(struct thread *td, struct linux_mq_open_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_open(td, (struct kmq_open_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
+int
+linux_mq_unlink(struct thread *td, struct linux_mq_unlink_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_unlink(td, (struct kmq_unlink_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
+int
+linux_mq_timedsend(struct thread *td, struct linux_mq_timedsend_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_timedsend(td, (struct kmq_timedsend_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
+int
+linux_mq_timedreceive(struct thread *td, struct linux_mq_timedreceive_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_timedreceive(td, (struct kmq_timedreceive_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
+int
+linux_mq_notify(struct thread *td, struct linux_mq_notify_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_notify(td, (struct kmq_notify_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
+int
+linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args)
+{
+#ifdef P1003_1B_MQUEUE
+ return kmq_setattr(td, (struct kmq_setattr_args *) args);
+#else
+ return (ENOSYS);
+#endif
+}
+
More information about the p4-projects
mailing list