svn commit: r265326 - in user/dchagin/lemul/sys: kern sys

Dmitry Chagin dchagin at FreeBSD.org
Sun May 4 15:50:33 UTC 2014


Author: dchagin
Date: Sun May  4 15:50:32 2014
New Revision: 265326
URL: http://svnweb.freebsd.org/changeset/base/265326

Log:
  For future use in the Linuxulator add a kern_kqueue counterpart
  for kqueue with a flags parameter.

Modified:
  user/dchagin/lemul/sys/kern/kern_event.c
  user/dchagin/lemul/sys/sys/syscallsubr.h

Modified: user/dchagin/lemul/sys/kern/kern_event.c
==============================================================================
--- user/dchagin/lemul/sys/kern/kern_event.c	Sun May  4 15:49:26 2014	(r265325)
+++ user/dchagin/lemul/sys/kern/kern_event.c	Sun May  4 15:50:32 2014	(r265326)
@@ -701,6 +701,13 @@ filt_usertouch(struct knote *kn, struct 
 int
 sys_kqueue(struct thread *td, struct kqueue_args *uap)
 {
+
+	return (kern_kqueue(td, 0));
+}
+
+int
+kern_kqueue(struct thread *td, int flags)
+{
 	struct filedesc *fdp;
 	struct kqueue *kq;
 	struct file *fp;
@@ -721,7 +728,7 @@ sys_kqueue(struct thread *td, struct kqu
 	PROC_UNLOCK(p);
 
 	fdp = p->p_fd;
-	error = falloc(td, &fp, &fd, 0);
+	error = falloc(td, &fp, &fd, flags);
 	if (error)
 		goto done2;
 

Modified: user/dchagin/lemul/sys/sys/syscallsubr.h
==============================================================================
--- user/dchagin/lemul/sys/sys/syscallsubr.h	Sun May  4 15:49:26 2014	(r265325)
+++ user/dchagin/lemul/sys/sys/syscallsubr.h	Sun May  4 15:50:32 2014	(r265326)
@@ -124,6 +124,7 @@ int	kern_jail_get(struct thread *td, str
 int	kern_jail_set(struct thread *td, struct uio *options, int flags);
 int	kern_kevent(struct thread *td, int fd, int nchanges, int nevents,
 	    struct kevent_copyops *k_ops, const struct timespec *timeout);
+int	kern_kqueue(struct thread *td, int flags);
 int	kern_kldload(struct thread *td, const char *file, int *fileid);
 int	kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat);
 int	kern_kldunload(struct thread *td, int fileid, int flags);


More information about the svn-src-user mailing list