Re: assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/08/2016, Matt Benjamin wrote:
> Mark Nelson called attention to this topic again yesterday in #ceph-devel.
>
> We favor retaining the ability to re-declare specific asserts such that they are, as with assert in general historically, compiled out.  I think it's reasonable if this is a marked case.
>
> That seems to imply that if ceph_assert is the unmarked case, it won't be compiled out, so is essentially ceph_assert_always, as below (or else that form should be used...it's a little long).

If we want to go for brevity, we could have ceph_assert() be the
unmarked case that functions just like assert macro.

Then we could use something like ceph_demand() (ceph_ultimatum?
ceph_blackmail?) to indicate the case that isn't compiled out.

Personally, I would just like to get rid of Ceph's assert.h and its
unending war with every other header file in the world. At one point
killed off the header and linked in an object that overrode
__assert_fail. This worked very well, though it would require handling
every C library implementation we're compiled against.

-- 
Senior Software Engineer           Red Hat Storage, Ann Arbor, MI, US
IRC: Aemerson@{RedHat, OFTC, Freenode}
0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C  7C12 80F7 544B 90ED BFB9
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux