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

Boaz Harrosh bharrosh at panasas.com
Mon Mar 2 15:48:03 CET 2009


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?

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.

Thanks
Boaz

--
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