mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 07:58:07 +02:00
Cell: move ASSERT macro into common.h
This commit is contained in:
parent
65df024146
commit
7f4bec264e
2 changed files with 11 additions and 9 deletions
|
|
@ -38,6 +38,17 @@
|
|||
#include "pipe/p_format.h"
|
||||
|
||||
|
||||
/** The standard assert macro doesn't seem to work reliably */
|
||||
#define ASSERT(x) \
|
||||
if (!(x)) { \
|
||||
ubyte *p = NULL; \
|
||||
fprintf(stderr, "%s:%d: %s(): assertion %s failed.\n", \
|
||||
__FILE__, __LINE__, __FUNCTION__, #x); \
|
||||
*p = 0; \
|
||||
exit(1); \
|
||||
}
|
||||
|
||||
|
||||
/** for sanity checking */
|
||||
#define ASSERT_ALIGN16(ptr) \
|
||||
assert((((unsigned long) (ptr)) & 0xf) == 0);
|
||||
|
|
|
|||
|
|
@ -86,15 +86,6 @@ extern struct spu_global spu;
|
|||
#define TAG_MISC 18
|
||||
|
||||
|
||||
/** The standard assert macro doesn't seem to work on SPUs */
|
||||
#define ASSERT(x) \
|
||||
if (!(x)) { \
|
||||
fprintf(stderr, "SPU %d: %s:%d: %s(): assertion %s failed.\n", \
|
||||
spu.init.id, __FILE__, __LINE__, __FUNCTION__, #x); \
|
||||
exit(1); \
|
||||
}
|
||||
|
||||
|
||||
extern void
|
||||
wait_on_mask(unsigned tag);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue