lkml.org 
[lkml]   [1997]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: patch for 2.1.55 pre-1 minix/sysv/affs
Date
From

Bill Hawes wrote:
> + if (minix_set_bit(j,bh->b_data))
> + goto complain_and_out;
[...]
> +complain_and_out:
> + printk("new_inode: bit already set");
> +iput_and_out:
> + iput(inode);
> +out:
> + return NULL;

I hate this type of code, but for better cache-use, it is the faster way
to write the code.....

Would someone be interested in implementing

#pragma rarely_used

which would go inside an "if" statement, and cause gcc to do exactly
what Bill is doing up there by hand....

The new code would be:

if (minix_set_bit(j,bh->b_data)) {
#pragma rarely_used
printk("new_inode: bit already set");
iput(inode);
return NULL;
}

gcc currently generates

if not condition goto behind_if
[code for the if clause]
behind_if:

which in case of the pragma should become

if condition goto behind_everything_else
[rest of function]
ret
behind_everything_else:
[code for the if clause]

I'd hope that this isn't too hard to implement.... :-)


Roger.

--
** R.E.Wolff@BitWizard.nl ** +31-15-2137555 ** http://www.BitWizard.nl/ **
Florida -- A 39 year old construction worker woke up this morning when a
109-car freigt train drove over him. According to the police the man was
drunk. The man himself claims he slipped while walking the dog. 080897

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.091 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site