From owner-p4-projects@FreeBSD.ORG Tue Jul 10 10:14:35 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F3EA416A46B; Tue, 10 Jul 2007 10:14:34 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C90DD16A468 for ; Tue, 10 Jul 2007 10:14:34 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id B74E013C46E for ; Tue, 10 Jul 2007 10:14:34 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l6AAEYAV044530 for ; Tue, 10 Jul 2007 10:14:34 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l6AAEYbC044527 for perforce@freebsd.org; Tue, 10 Jul 2007 10:14:34 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 10 Jul 2007 10:14:34 GMT Message-Id: <200707101014.l6AAEYbC044527@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 123267 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2007 10:14:35 -0000 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 __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + +#include +#ifdef COMPAT_LINUX32 +#include +#else +#include +#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, \