svn commit: r254125 - in stable/9/sys: compat/freebsd32 kern
Konstantin Belousov
kib at FreeBSD.org
Fri Aug 9 06:01:53 UTC 2013
Author: kib
Date: Fri Aug 9 06:01:52 2013
New Revision: 254125
URL: http://svnweb.freebsd.org/changeset/base/254125
Log:
MFC r253527:
Move the convert_sigevent32() utility function into freebsd32_misc.c
for consumption outside the vfs_aio.c.
For SIGEV_THREAD_ID and SIGEV_SIGNAL notification delivery methods,
also copy in the sigev_value, since librt event pumping loop compares
note generation number with the value passed through sigev_value.
Modified:
stable/9/sys/compat/freebsd32/freebsd32_misc.c
stable/9/sys/compat/freebsd32/freebsd32_signal.h
stable/9/sys/kern/vfs_aio.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- stable/9/sys/compat/freebsd32/freebsd32_misc.c Fri Aug 9 05:27:38 2013 (r254124)
+++ stable/9/sys/compat/freebsd32/freebsd32_misc.c Fri Aug 9 06:01:52 2013 (r254125)
@@ -2885,3 +2885,29 @@ freebsd32_posix_fadvise(struct thread *t
return (kern_posix_fadvise(td, uap->fd, PAIR32TO64(off_t, uap->offset),
PAIR32TO64(off_t, uap->len), uap->advice));
}
+
+int
+convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig)
+{
+
+ CP(*sig32, *sig, sigev_notify);
+ switch (sig->sigev_notify) {
+ case SIGEV_NONE:
+ break;
+ case SIGEV_THREAD_ID:
+ CP(*sig32, *sig, sigev_notify_thread_id);
+ /* FALLTHROUGH */
+ case SIGEV_SIGNAL:
+ CP(*sig32, *sig, sigev_signo);
+ PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr);
+ break;
+ case SIGEV_KEVENT:
+ CP(*sig32, *sig, sigev_notify_kqueue);
+ CP(*sig32, *sig, sigev_notify_kevent_flags);
+ PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr);
+ break;
+ default:
+ return (EINVAL);
+ }
+ return (0);
+}
Modified: stable/9/sys/compat/freebsd32/freebsd32_signal.h
==============================================================================
--- stable/9/sys/compat/freebsd32/freebsd32_signal.h Fri Aug 9 05:27:38 2013 (r254124)
+++ stable/9/sys/compat/freebsd32/freebsd32_signal.h Fri Aug 9 06:01:52 2013 (r254125)
@@ -97,6 +97,8 @@ struct sigevent32 {
} _sigev_un;
};
+struct sigevent;
+int convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig);
void siginfo_to_siginfo32(const siginfo_t *src, struct siginfo32 *dst);
#endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */
Modified: stable/9/sys/kern/vfs_aio.c
==============================================================================
--- stable/9/sys/kern/vfs_aio.c Fri Aug 9 05:27:38 2013 (r254124)
+++ stable/9/sys/kern/vfs_aio.c Fri Aug 9 06:01:52 2013 (r254125)
@@ -2696,31 +2696,6 @@ aiocb32_copyin_old_sigevent(struct aiocb
}
static int
-convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig)
-{
-
- CP(*sig32, *sig, sigev_notify);
- switch (sig->sigev_notify) {
- case SIGEV_NONE:
- break;
- case SIGEV_THREAD_ID:
- CP(*sig32, *sig, sigev_notify_thread_id);
- /* FALLTHROUGH */
- case SIGEV_SIGNAL:
- CP(*sig32, *sig, sigev_signo);
- break;
- case SIGEV_KEVENT:
- CP(*sig32, *sig, sigev_notify_kqueue);
- CP(*sig32, *sig, sigev_notify_kevent_flags);
- PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr);
- break;
- default:
- return (EINVAL);
- }
- return (0);
-}
-
-static int
aiocb32_copyin(struct aiocb *ujob, struct aiocb *kjob)
{
struct aiocb32 job32;
More information about the svn-src-stable-9
mailing list