Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Oct 2006 15:59:37 -0400
From:      Justin Smith <justin.richard.smith@drexel.edu>
To:        Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Cc:        freebsd-current@freebsd.org
Subject:   Re: linux_rt_sigpending
Message-ID:  <45201E29.70109@drexel.edu>
In-Reply-To: <20061001193755.GA47392@stud.fit.vutbr.cz>
References:  <451FBCF1.9030505@drexel.edu> <20061001193755.GA47392@stud.fit.vutbr.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------000705000802030006060505
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Divacky Roman wrote:
> On Sun, Oct 01, 2006 at 09:04:49AM -0400, Justin Smith wrote:
>   
>> Is this patch in current? It was developed some time ago to enable Maple
>> to run under linux emulation but it certainly hasn't been put into
>> 6-STABLE yet because the patch still applies cleanly (and Maple now
>> runs, while it didn't before).
>>     
>
> what patch?
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>
>   
I've attached it, although I downloaded it from the web (I don't recall
where --- it was a FreeBSD developer's site.

--------------000705000802030006060505
Content-Type: text/plain;
 name="linsyscall.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="linsyscall.diff"

--- compat/linux/linux_signal.c	Sun Feb 13 21:50:57 2005
+++ compat/linux/linux_signal.c	Tue Jan  3 10:43:51 2006
@@ -406,6 +406,34 @@
 	mask = lset.__bits[0];
 	return (copyout(&mask, args->mask, sizeof(mask)));
 }
+
+/*
+ * MPSAFE
+ */
+int
+linux_rt_sigpending(struct thread *td, struct linux_rt_sigpending_args *args)
+{
+	struct proc *p = td->td_proc;
+	sigset_t bset;
+	l_sigset_t lset;
+
+	if (args->sigsetsize > sizeof(lset))
+		return EINVAL;
+		/* NOT REACHED */
+
+#ifdef DEBUG
+	if (ldebug(rt_sigpending))
+		printf(ARGS(rt_sigpending, "*"));
+#endif
+
+	PROC_LOCK(p);
+	bset = p->p_siglist;
+	SIGSETOR(bset, td->td_siglist);
+	SIGSETAND(bset, td->td_sigmask);
+	PROC_UNLOCK(p);
+	bsd_to_linux_sigset(&bset, &lset);
+	return (copyout(&lset, args->set, args->sigsetsize));
+}
 #endif	/*!__alpha__*/
 
 int
--- amd64/linux32/linux32_dummy.c	Mon Aug 16 10:55:06 2004
+++ amd64/linux32/linux32_dummy.c	Tue Jan  3 10:44:33 2006
@@ -54,7 +54,6 @@
 DUMMY(query_module);
 DUMMY(nfsservctl);
 DUMMY(prctl);
-DUMMY(rt_sigpending);
 DUMMY(rt_sigtimedwait);
 DUMMY(rt_sigqueueinfo);
 DUMMY(capget);
--- amd64/linux32/syscalls.master	Wed Jul 20 20:42:14 2005
+++ amd64/linux32/syscalls.master	Tue Jan  3 10:44:21 2006
@@ -310,7 +310,8 @@
 175	AUE_NULL	MSTD	{ int linux_rt_sigprocmask(l_int how, \
 				    l_sigset_t *mask, l_sigset_t *omask, \
 				    l_size_t sigsetsize); }
-176	AUE_NULL	MSTD	{ int linux_rt_sigpending(void); }
+176	AUE_NULL	MSTD	{ int linux_rt_sigpending(l_sigset_t *set, \
+				    l_size_t sigsetsize); }
 177	AUE_NULL	MSTD	{ int linux_rt_sigtimedwait(void); }
 178	AUE_NULL	MSTD	{ int linux_rt_sigqueueinfo(void); }
 179	AUE_NULL	MSTD	{ int linux_rt_sigsuspend( \
--- amd64/linux32/linux32_proto.h	Wed Feb  1 09:36:43 2006
+++ amd64/linux32/linux32_proto.h	Wed Feb  1 09:37:09 2006
@@ -2,7 +2,7 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.5.2.1 2005/07/20 17:43:52 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.1 2005/07/20 17:42:14 jhb Exp 
  */
 
@@ -518,7 +518,8 @@
 	char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)];
 };
 struct linux_rt_sigpending_args {
-	register_t dummy;
+	char set_l_[PADL_(l_sigset_t *)]; l_sigset_t * set; char set_r_[PADR_(l_sigset_t *)];
+	char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)];
 };
 struct linux_rt_sigtimedwait_args {
 	register_t dummy;
--- amd64/linux32/linux32_syscall.h	Wed Feb  1 09:36:43 2006
+++ amd64/linux32/linux32_syscall.h	Wed Feb  1 09:37:09 2006
@@ -2,7 +2,7 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.5.2.1 2005/07/20 17:43:52 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.1 2005/07/20 17:42:14 jhb Exp 
  */
 
--- amd64/linux32/linux32_sysent.c	Wed Feb  1 09:36:43 2006
+++ amd64/linux32/linux32_sysent.c	Wed Feb  1 09:37:09 2006
@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.5.2.1 2005/07/20 17:43:52 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.1 2005/07/20 17:42:14 jhb Exp 
  */
 
@@ -196,7 +196,7 @@
 	{ SYF_MPSAFE | AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL },	/* 173 = linux_rt_sigreturn */
 	{ SYF_MPSAFE | AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL },	/* 174 = linux_rt_sigaction */
 	{ SYF_MPSAFE | AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL },	/* 175 = linux_rt_sigprocmask */
-	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigpending, AUE_NULL },	/* 176 = linux_rt_sigpending */
+	{ SYF_MPSAFE | AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL },	/* 176 = linux_rt_sigpending */
 	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL },	/* 177 = linux_rt_sigtimedwait */
 	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL },	/* 178 = linux_rt_sigqueueinfo */
 	{ SYF_MPSAFE | AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL },	/* 179 = linux_rt_sigsuspend */
--- i386/linux/linux_dummy.c	Wed Feb  1 09:41:23 2006
+++ i386/linux/linux_dummy.c	Wed Feb  1 09:42:33 2006
@@ -58,7 +58,6 @@
 DUMMY(query_module);
 DUMMY(nfsservctl);
 DUMMY(prctl);
-DUMMY(rt_sigpending);
 DUMMY(rt_sigtimedwait);
 DUMMY(rt_sigqueueinfo);
 DUMMY(capget);
--- i386/linux/linux_proto.h	Wed Feb  1 09:41:23 2006
+++ i386/linux/linux_proto.h	Wed Feb  1 09:42:37 2006
@@ -2,7 +2,7 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.64.2.1 2005/07/20 17:43:53 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.1 2005/07/20 17:42:15 jhb Exp 
  */
 
@@ -513,7 +513,8 @@
 	char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)];
 };
 struct linux_rt_sigpending_args {
-	register_t dummy;
+	char set_l_[PADL_(l_sigset_t *)]; l_sigset_t * set; char set_r_[PADR_(l_sigset_t *)];
+	char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)];
 };
 struct linux_rt_sigtimedwait_args {
 	register_t dummy;
--- i386/linux/linux_syscall.h	Wed Feb  1 09:41:23 2006
+++ i386/linux/linux_syscall.h	Wed Feb  1 09:42:37 2006
@@ -2,7 +2,7 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.58.2.1 2005/07/20 17:43:53 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.1 2005/07/20 17:42:15 jhb Exp 
  */
 
--- i386/linux/linux_sysent.c	Wed Feb  1 09:41:23 2006
+++ i386/linux/linux_sysent.c	Wed Feb  1 09:42:37 2006
@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.65.2.1 2005/07/20 17:43:53 jhb Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.1 2005/07/20 17:42:15 jhb Exp 
  */
 
@@ -196,7 +196,7 @@
 	{ SYF_MPSAFE | AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn, AUE_NULL },	/* 173 = linux_rt_sigreturn */
 	{ SYF_MPSAFE | AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL },	/* 174 = linux_rt_sigaction */
 	{ SYF_MPSAFE | AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL },	/* 175 = linux_rt_sigprocmask */
-	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigpending, AUE_NULL },	/* 176 = linux_rt_sigpending */
+	{ SYF_MPSAFE | AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL },	/* 176 = linux_rt_sigpending */
 	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL },	/* 177 = linux_rt_sigtimedwait */
 	{ SYF_MPSAFE | 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL },	/* 178 = linux_rt_sigqueueinfo */
 	{ SYF_MPSAFE | AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL },	/* 179 = linux_rt_sigsuspend */
--- i386/linux/syscalls.master	Wed Feb  1 09:41:23 2006
+++ i386/linux/syscalls.master	Wed Feb  1 09:42:16 2006
@@ -308,7 +308,8 @@
 175	AUE_NULL	MSTD	{ int linux_rt_sigprocmask(l_int how, \
 				    l_sigset_t *mask, l_sigset_t *omask, \
 				    l_size_t sigsetsize); }
-176	AUE_NULL	MSTD	{ int linux_rt_sigpending(void); }
+176	AUE_NULL	MSTD	{ int linux_rt_sigpending(l_sigset_t *set, \
+				    l_size_t sigsetsize); }
 177	AUE_NULL	MSTD	{ int linux_rt_sigtimedwait(void); }
 178	AUE_NULL	MSTD	{ int linux_rt_sigqueueinfo(void); }
 179	AUE_NULL	MSTD	{ int linux_rt_sigsuspend( \

--------------000705000802030006060505--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45201E29.70109>