summaryrefslogtreecommitdiff
path: root/src/include/assert.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation -Wmismatched-tags warningsChristophe Courtaut2013-08-091-2/+2
| | | | | | Keep consistency in the code to not generate warnings of this type. Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
* deliberately break encoding macros when wrong assert is presentSage Weil2012-06-071-6/+11
| | | | Signed-off-by: Sage Weil <sage@inktank.com>
* assert: detect when /usr/include/assert.h clobbers usSage Weil2012-06-061-1/+6
| | | | | | | | | | | | | | | | | The normal assert.h is very rude in that it clobbers any existing assert define and replaces it with its own. An sadly, lots of things we include include the generic version. Be extra rude in response. Clobber any existing assert #define, and also #define _ASSERT_H to be a magic value that our commonly-used dendl #define depends on. This way we get a compile error if the system version replaces out own. This is imperfect, since we will only detect their rudeness when we use the debug macros. I'm not coming up with something that is more widely used that would work better, however. Signed-off-by: Sage Weil <sage@inktank.com>
* First cut of FreeBSD support. This patch allowes ceph to compile successfullyStanislav Sedov2011-10-041-0/+5
| | | | | | under FreeBSD. Signed-off-by: Stanislav Sedov <stas@FreeBSD.org>
* assert: work around libatomic_ops vs assert in a less lame waySage Weil2011-08-311-10/+0
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* assert: use our assertSage Weil2011-08-311-1/+3
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* assert: de-globalizeColin Patrick McCabe2011-06-201-1/+3
| | | | | | | | | Implement a simple registration system so that assert output can still show up non-interleaved in daemons and utilities. Library code will just use dout_emergency, which is simple and deadlock-free, but might be interleaved with ongoing messages sometimes. Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* assert: make our assert clobber any others tooSage Weil2011-05-061-10/+9
| | | | | | Two can play this game, /usr/include/assert.h! Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
* debug.h: cleanup includesColin Patrick McCabe2011-02-181-0/+3
| | | | | | | | Shouldn't need to include DoutStreambuf.h; that's all implementation. Don't include Mutex.h, since we don't use it. *Do* include config.h, since we need it. Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* os: FileJournal::do_write: fix error handlingColin Patrick McCabe2011-02-041-1/+1
| | | | Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* assert.h: Add ceph_abortColin Patrick McCabe2011-02-041-0/+8
| | | | Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
* assert: only include acconfig.h ifdef __CEPH__Sage Weil2010-08-031-1/+3
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* Bug #98: Unique names for include guardsMarkus Elfring2010-06-171-2/+2
| | | | | | | A couple of preprocessor symbols for include guards tampered with the reserved namespace. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sage Weil <sage@newdream.net>
* libatomic: fix assert.h compilationYehuda Sadeh2010-06-031-0/+4
|
* assert: fix assert vs atomic_ops.h breakageSage Weil2010-06-031-0/+17
| | | | This was causing us to use the system assert, not the ceph one.
* spinlock: clean up #include depsSage Weil2010-04-091-1/+0
|
* assert: use ceph namespaceSage Weil2010-04-081-0/+6
|
* assert: throw FailedAssertion exception instead of inducing segfaultSage Weil2009-06-261-9/+24
| | | | | This will allow callers to catch failed assertions, if they so choose.
* assert: turn off tls in assert macroSage Weil2009-04-281-2/+4
| | | | About 3% cpu time
* assert: some more assert_warnYehuda Sadeh2009-02-121-0/+3
|
* cosd: change some assert to assert_warn and clean exitYehuda Sadeh2009-02-121-0/+5
|
* assert: warn on assertion if requested for current threadYehuda Sadeh2009-02-091-1/+17
|
* custom assertion handlerSage Weil2008-10-131-0/+35
Print assertion error to log file, if it is open.