From root@hunahpu.sics.se  Sun Mar 26 19:34:57 2000
Return-Path: <root@hunahpu.sics.se>
Received: from hunahpu.sics.se (hunahpu.sics.se [193.10.66.220])
	by hub.freebsd.org (Postfix) with ESMTP id 8E4D337BAED
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Mar 2000 19:34:54 -0800 (PST)
	(envelope-from root@hunahpu.sics.se)
Received: (from root@localhost)
	by hunahpu.sics.se (8.9.3/8.9.3) id FAA15545;
	Mon, 27 Mar 2000 05:34:46 +0200 (CEST)
	(envelope-from root)
Message-Id: <200003270334.FAA15545@hunahpu.sics.se>
Date: Mon, 27 Mar 2000 05:34:46 +0200 (CEST)
From: assar@stacken.kth.se
Sender: root@hunahpu.sics.se
To: FreeBSD-gnats-submit@freebsd.org
Cc: assar@stacken.kth.se
Subject: impossible to CURSIG when compiling with optimization
X-Send-Pr-Version: 3.2

>Number:         17614
>Category:       kern
>Synopsis:       impossible to CURSIG when compiling with optimization
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    marcel
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 26 19:40:01 PST 2000
>Closed-Date:    Sat Jul 15 15:51:11 PDT 2000
>Last-Modified:  Sat Jul 15 15:52:51 PDT 2000
>Originator:     Assar
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
none
>Environment:

5.0-current with sys/signalvar.h 1.34

>Description:

It's not possible to build a KLD without optimization if it uses the
CURSIG macro since this expand to a call to an `extern inline' function.

>How-To-Repeat:

write code that calls CURSIG
compile it without -O
kldload it

>Fix:

make the function `static __inline' instead of `extern __inline'

--- signalvar.h.orig	Mon Mar 27 05:30:33 2000
+++ signalvar.h	Mon Mar 27 05:33:50 2000
@@ -209,7 +209,6 @@
 void	sigexit __P((struct proc *p, int signum));
 void	siginit __P((struct proc *p));
 void	trapsignal __P((struct proc *p, int sig, u_long code));
-int	__cursig __P((struct proc *p));
 
 /*
  * Machine-dependent functions:
@@ -226,7 +225,7 @@
  * process, 0 if none.  If there is a pending stop signal with default
  * action, the process stops in issignal().
  */
-extern __inline int __cursig(struct proc *p)
+static __inline int __cursig(struct proc *p)
 {
 	sigset_t tmpset;
 

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->marcel 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Wed Mar 29 02:35:16 PST 2000 
Responsible-Changed-Why:  
This looks like Marcel's stuff.  Please be patient, as Marcel 
doesn't have easy Internet access at the moment. 

From: Assar Westerlund <assar@stacken.kth.se>
To: freebsd-gnats-submit@FreeBSD.org, jasone@FreeBSD.org,
	luoqi@FreeBSD.org, peter@FreeBSD.org
Cc:  
Subject: Re: kern/17614: impossible to CURSIG when compiling with optimization
Date: 30 Mar 2000 12:45:11 +0200

 > This looks like Marcel's stuff.  Please be patient, as Marcel 
 > doesn't have easy Internet access at the moment. 
 
 I don't really think so.  He wrote that code but this is just the same
 problem that was handled in revisions 1.33 and 1.34 and could probably
 be reviewed by any of the folks involved in those changes.
 
 /assar
 
State-Changed-From-To: open->closed 
State-Changed-By: marcel 
State-Changed-When: Sat Jul 15 15:51:11 PDT 2000 
State-Changed-Why:  
Already fixed in rev 1.37. Thanks... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=17614 
>Unformatted:
