[stgt] [PATCH 14/15] tgt: os.h: semtimedop for BSD

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Mon Mar 2 16:05:54 CET 2009

On Mon, 02 Mar 2009 16:48:03 +0200
Boaz Harrosh <bharrosh at panasas.com> wrote:

> FUJITA Tomonori wrote:
> > 
> > BSDes don't have semtimedop? We can't sleep so we use semtimedop. This
> > emulation is broken, but it's fine by me for now.
> > 
> This is all actually dead code, for me. I'm not using logger, I'm
> using redirect IO of stderr/stdout. Both on BSD and on Linux.
> Can I put an __CONFIG_IF_USE_LOGGER or something in log.c that will
> not include all this logger code, And set this in Makefile to default
> on but user can change if he wants to?

Adding ifdef is acceptable to me only if you have a very good
reason. "I don't use this" is not a good reason for me.

And why we want to disable logging feature for all the bsd users?

> This will also make it easier for the patches I have out-of-tree
> in the osd branch.
> > But I don't like ifdef. Why not be consistent with other portability
> > code, just creating do_semtimedop or something.
> I think that #ifdef are OK in an os.h header. It is the only place they
> are acceptable. I agree with Or, that for performance cases we can leave
> with #ifdefs at the os.h level. Though there is no such use case currently
> and everything is in the slow path and are in the .c file.
> If you OK my problem with the use of logger I can get rid of that
> completely.

This is a slow path. I can't find any good reason to use ifdef here.
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

More information about the stgt mailing list