-- Dave
At 12:18 PM 2/19/2004, Eugene LiS User wrote:
Hello,
I looked through recent optimizations done by Matt
and it seems like it can be improved a little bit further
with regard to *file, line processing.
In relevant top header file[s] add:
#ifdef FL_DEBUG
#define FnLnPar , char* file, int line
#define FnLnVal , __FILE__, __LINE__
#else
#define FnLnPar
#define FnLnVal
#endif
Then in function definitions we can do like this:
my_spinlock(lock FnLnPar)
{
...
#ifdef FL_DEBUG
save(file); <--- whatever is already there
save(line); for file and line
#endif
..
}
In function calls or in #define's
we can do like this:
#define spinlock(lock) my_spinlock(lock FnLnVal)
or
my_spinlock(lock FnLnVal); <--- function call
This would allow to avoid multiple #ifdef'ing in the *.c source
files, thus improving readability of the source and maintenance ease.
--
Eugene
__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.591 / Virus Database: 374 - Release Date: 2/17/2004
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.591 / Virus Database: 374 - Release Date: 2/17/2004
