Date: Tue, 10 Jul 2007 10:14:34 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 123267 for review Message-ID: <200707101014.l6AAEYbC044527@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123267 Change 123267 by rdivacky@rdivacky_witten on 2007/07/10 10:14:31 Dummy epoll_ctl and epoll_wait syscalls. Affected files ... .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_dummy.c#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_proto.h#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_syscall.h#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_sysent.c#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/syscalls.master#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.c#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.h#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_dummy.c#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_proto.h#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_syscall.h#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_sysent.c#3 edit .. //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/syscalls.master#3 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_dummy.c#3 (text+ko) ==== @@ -65,8 +65,6 @@ DUMMY(fadvise64); DUMMY(ptrace); DUMMY(lookup_dcookie); -DUMMY(epoll_ctl); -DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(timer_create); DUMMY(timer_settime); ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_proto.h#3 (text+ko) ==== @@ -747,13 +747,19 @@ register_t dummy; }; struct linux_epoll_create_args { - char size_l_[PADL_(int)]; int size; char size_r_[PADR_(int)]; + char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; }; struct linux_epoll_ctl_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; }; struct linux_epoll_wait_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; }; struct linux_remap_file_pages_args { register_t dummy; ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_syscall.h#3 (text+ko) ==== ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/linux32_sysent.c#3 (text+ko) ==== @@ -275,8 +275,8 @@ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0 }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0 }, /* 253 = linux_lookup_dcookie */ { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0 }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0 }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0 }, /* 256 = linux_epoll_wait */ + { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0 }, /* 255 = linux_epoll_ctl */ + { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0 }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0 }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0 }, /* 258 = linux_set_tid_address */ { 0, (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0 }, /* 259 = linux_timer_create */ ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/amd64/linux32/syscalls.master#3 (text+ko) ==== @@ -420,9 +420,11 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(int size); } -255 AUE_NULL STD { int linux_epoll_ctl(void); } -256 AUE_NULL STD { int linux_epoll_wait(void); } +254 AUE_NULL STD { int linux_epoll_create(l_int size); } +255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ + struct linux_epoll_event *event); } +256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ + l_int maxevents, l_int timeout); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(void); } ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.c#3 (text+ko) ==== @@ -27,7 +27,17 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + +#include <linux_epoll.h> +#ifdef COMPAT_LINUX32 +#include <machine/../linux32/linux.h> +#else +#include <machine/../linux/linux.h> +#endif + + int linux_epoll_create(struct thread *td, struct linux_epoll_create_args *args) { @@ -37,3 +47,15 @@ return kqueue(td, args); } + +int +linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args) +{ + return (ENOSYS); +} + +int +linux_epoll_wait(struct thread *td, struct linux_epoll_wait_args *args) +{ + return (ENOSYS); +} ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/compat/linux/linux_epoll.h#3 (text+ko) ==== @@ -29,4 +29,15 @@ #ifndef _LINUX_EPOLL_H_ #define _LINUX_EPOLL_H_ +#ifdef __amd64__ +#define EPOLL_PACKED __packed +#else +#define EPOLL_PACKED +#endif + +struct linux_epoll_event { + uint32_t events; + uint64_t data; +} EPOLL_PACKED; + #endif /* !_LINUX_EPOLL_H_ */ ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_dummy.c#3 (text+ko) ==== @@ -67,8 +67,6 @@ DUMMY(mincore); DUMMY(fadvise64); DUMMY(lookup_dcookie); -DUMMY(epoll_ctl); -DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(fstatfs64); DUMMY(fadvise64_64); ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_proto.h#3 (text+ko) ==== @@ -747,13 +747,19 @@ register_t dummy; }; struct linux_epoll_create_args { - char size_l_[PADL_(int)]; int size; char size_r_[PADR_(int)]; + char size_l_[PADL_(l_int)]; l_int size; char size_r_[PADR_(l_int)]; }; struct linux_epoll_ctl_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char op_l_[PADL_(l_int)]; l_int op; char op_r_[PADR_(l_int)]; + char fd_l_[PADL_(l_int)]; l_int fd; char fd_r_[PADR_(l_int)]; + char event_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * event; char event_r_[PADR_(struct linux_epoll_event *)]; }; struct linux_epoll_wait_args { - register_t dummy; + char epfd_l_[PADL_(l_int)]; l_int epfd; char epfd_r_[PADR_(l_int)]; + char events_l_[PADL_(struct linux_epoll_event *)]; struct linux_epoll_event * events; char events_r_[PADR_(struct linux_epoll_event *)]; + char maxevents_l_[PADL_(l_int)]; l_int maxevents; char maxevents_r_[PADR_(l_int)]; + char timeout_l_[PADL_(l_int)]; l_int timeout; char timeout_r_[PADR_(l_int)]; }; struct linux_remap_file_pages_args { register_t dummy; ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_syscall.h#3 (text+ko) ==== ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/linux_sysent.c#3 (text+ko) ==== @@ -274,8 +274,8 @@ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0 }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0 }, /* 253 = linux_lookup_dcookie */ { AS(linux_epoll_create_args), (sy_call_t *)linux_epoll_create, AUE_NULL, NULL, 0, 0 }, /* 254 = linux_epoll_create */ - { 0, (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0 }, /* 255 = linux_epoll_ctl */ - { 0, (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0 }, /* 256 = linux_epoll_wait */ + { AS(linux_epoll_ctl_args), (sy_call_t *)linux_epoll_ctl, AUE_NULL, NULL, 0, 0 }, /* 255 = linux_epoll_ctl */ + { AS(linux_epoll_wait_args), (sy_call_t *)linux_epoll_wait, AUE_NULL, NULL, 0, 0 }, /* 256 = linux_epoll_wait */ { 0, (sy_call_t *)linux_remap_file_pages, AUE_NULL, NULL, 0, 0 }, /* 257 = linux_remap_file_pages */ { AS(linux_set_tid_address_args), (sy_call_t *)linux_set_tid_address, AUE_NULL, NULL, 0, 0 }, /* 258 = linux_set_tid_address */ { AS(linux_timer_create_args), (sy_call_t *)linux_timer_create, AUE_NULL, NULL, 0, 0 }, /* 259 = linux_timer_create */ ==== //depot/projects/soc2007/rdivacky/linux_epoll/sys/i386/linux/syscalls.master#3 (text+ko) ==== @@ -422,9 +422,11 @@ 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } -254 AUE_NULL STD { int linux_epoll_create(int size); } -255 AUE_NULL STD { int linux_epoll_ctl(void); } -256 AUE_NULL STD { int linux_epoll_wait(void); } +254 AUE_NULL STD { int linux_epoll_create(l_int size); } +255 AUE_NULL STD { int linux_epoll_ctl(l_int epfd, l_int op, l_int fd, \ + struct linux_epoll_event *event); } +256 AUE_NULL STD { int linux_epoll_wait(l_int epfd, struct linux_epoll_event *events, \ + l_int maxevents, l_int timeout); } 257 AUE_NULL STD { int linux_remap_file_pages(void); } 258 AUE_NULL STD { int linux_set_tid_address(int *tidptr); } 259 AUE_NULL STD { int linux_timer_create(clockid_t clock_id, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707101014.l6AAEYbC044527>