Re: (void)foo or __unused foo ?

2012-07-27 Thread Tim Kientzle
On Jul 27, 2012, at 2:38 AM, Luigi Rizzo wrote: > > The alternative way to avoid an 'unused' warning from the compiler > is an empty statement > > (void)foo; > > that the compiler hopefully optimizes away. I learned the void-cast convention many years ago. I used it throughout the libarch

Re: panic: _mtx_lock_sleep: recursed on non-recursive mutex em0 @ /usr/src/sys/dev/e1000/if_lem.c:881

2012-07-27 Thread Adrian Chadd
It looks like a case of "lock held during call up the stack". This is bad for so many reasons. It also makes writing correctly locked drivers a pain in the ass as the moment you unlock the driver before calling ether_input() / ieee80211_input(), you allow things to change state. So no, although yo

Re: make release recursion

2012-07-27 Thread Glen Barber
Hello, On Fri, Jul 27, 2012 at 09:35:13AM +0400, Alexander Pyhalov wrote: > Hello. > I've tried to do "make cdrom" on recent 10-current (svn revision 238763) > and got after day of work: > [...] Could you please retry the cdrom build with NOSRC=yes set? If this does not succeed, could you ple

Re: panic: _mtx_lock_sleep: recursed on non-recursive mutex em0 @ /usr/src/sys/dev/e1000/if_lem.c:881

2012-07-27 Thread Dimitry Andric
On 2012-07-26 17:46, David Wolfskill wrote: > This is at r238795; cut/paste of backtrace: > > KDB: enter: panic > [ thread pid 12 tid 100026 ] > Stopped at kdb_enter+0x3d: movl$0,kdb_why > db> bt > Tracing pid 12 tid 100026 td 0xc6755000 > kdb_enter(c0f93c5f,c0f93c5f,c0f91e21,f08398f0,c18

Re: (void)foo or __unused foo ?

2012-07-27 Thread Poul-Henning Kamp
In message <20120727125134.ga58...@onelab2.iet.unipi.it>, Luigi Rizzo writes: >A comment might be used to explain the intention in even more detail: > > (void)foo; /* unused on XyBSD and Babbage-OS */ Comments are noise which compilers and static checkers cannot and should not examine.

Re: RFC: use EM_LEGACY_IRQ in if_lem.c ?

2012-07-27 Thread Adrian Chadd
Hm. Ok, I wonder whether it's a general case of "touching the hardware too much" versus a more specific case of "all that taskqueue scheduling overhead is killing us in virtualised environments." Adrian ___ freebsd-current@freebsd.org mailing list ht

Re: (void)foo or __unused foo ?

2012-07-27 Thread Adrian Chadd
I'd rather see a compiler-interpretable "way" of doing this. You could always just use your own for now, until something comes along (like how many #define N(a) there are in the tree, until nitems showed up.) Ie: #define A_UNUSED_Tvoid (A_UNUSED_T) foo; That way (a) it's easy to change wit

Re: make release recursion

2012-07-27 Thread Garrett Cooper
On Fri, Jul 27, 2012 at 8:37 AM, Garrett Cooper wrote: > On Fri, Jul 27, 2012 at 7:26 AM, Oliver Brandmueller wrote: >> Hi, >> >> On Fri, Jul 27, 2012 at 09:35:13AM +0400, Alexander Pyhalov wrote: >>> Hello. >>> I've tried to do "make cdrom" on recent 10-current (svn revision 238763) >>> and got

Re: make release recursion

2012-07-27 Thread Garrett Cooper
On Fri, Jul 27, 2012 at 7:26 AM, Oliver Brandmueller wrote: > Hi, > > On Fri, Jul 27, 2012 at 09:35:13AM +0400, Alexander Pyhalov wrote: >> Hello. >> I've tried to do "make cdrom" on recent 10-current (svn revision 238763) >> and got after day of work: > [...] >> It seems, it continued to add file

Re: make release recursion

2012-07-27 Thread Oliver Brandmueller
Hi, On Fri, Jul 27, 2012 at 09:35:13AM +0400, Alexander Pyhalov wrote: > Hello. > I've tried to do "make cdrom" on recent 10-current (svn revision 238763) > and got after day of work: [...] > It seems, it continued to add files to some archive recursively... Is it > a bug or maybe I just can't c

Re: (void)foo or __unused foo ?

2012-07-27 Thread Luigi Rizzo
On Fri, Jul 27, 2012 at 11:20:48AM +, Poul-Henning Kamp wrote: > In message <20120727093824.gb56...@onelab2.iet.unipi.it>, Luigi Rizzo writes: > > >The alternative way to avoid an 'unused' warning from the compiler > >is an empty statement > > > > (void)foo; > > The thing I don't like abo

Re: (void)foo or __unused foo ?

2012-07-27 Thread Poul-Henning Kamp
In message <20120727093824.gb56...@onelab2.iet.unipi.it>, Luigi Rizzo writes: >The alternative way to avoid an 'unused' warning from the compiler >is an empty statement > > (void)foo; The thing I don't like about this form, is that it doesn't communicate your intention, only your action. S

about netmap num_rx_desc.

2012-07-27 Thread r...@9du.org
in netmap_kern.h struct netmap_adapter { .. u_int num_rx_desc; //u_int buff_size; // XXX deprecate, use NETMAP_BUF_SIZE but in netmap.c int netmap_attach(struct netmap_adapter *na, int num_queues) { na->num_rx_rings = num_queues; ixgbe_netmap.h static void ixgbe_netmap_attach(struct

Re: (void)foo or __unused foo ?

2012-07-27 Thread Dimitry Andric
On 2012-07-27 11:38, Luigi Rizzo wrote: > In writing cross platform code I often have to deal with function > arguments or variables that are not used on certain platforms. > In FreeBSD:sys/cdefs.h we have > > #define __unused__attribute__((__unused__)) > > and in the kernel we tend

Re: (void)foo or __unused foo ?

2012-07-27 Thread Erich Dollansky
Hi, On Fri, 27 Jul 2012 11:38:24 +0200 Luigi Rizzo wrote: > In writing cross platform code I often have to deal with function > arguments or variables that are not used on certain platforms. > In FreeBSD:sys/cdefs.h we have > if I understand you right here, it is you own code that has to run on

Re: Change default for periodic/weekly/400.status-pkg ?

2012-07-27 Thread Oliver Fromme
Miroslav Lachman wrote: > I think it should be user configurable in /etc/periodic.conf if > somebody want to use INDEX or not. It already is user configurable. My point is to change the default, because the current default is useless. It should also be noted that change is "safe", because the

(void)foo or __unused foo ?

2012-07-27 Thread Luigi Rizzo
In writing cross platform code I often have to deal with function arguments or variables that are not used on certain platforms. In FreeBSD:sys/cdefs.h we have #define __unused__attribute__((__unused__)) and in the kernel we tend to annotate with "__unused" such arguments

Re: Change default for periodic/weekly/400.status-pkg ?

2012-07-27 Thread Miroslav Lachman
Oliver Fromme wrote: Hi, Currently, the periodic/weekly/400.status-pkg script uses the ports' INDEX file if it exists. On my machines, the INDEX file exists, and the periodic script produces output like this: $ /etc/periodic/weekly/400.status-pkg Check for out of date packages:

Change default for periodic/weekly/400.status-pkg ?

2012-07-27 Thread Oliver Fromme
Hi, Currently, the periodic/weekly/400.status-pkg script uses the ports' INDEX file if it exists. On my machines, the INDEX file exists, and the periodic script produces output like this: $ /etc/periodic/weekly/400.status-pkg Check for out of date packages: $ That is, apparent