2006-09-22 Paul Brook <paul@codesourcery.com>
* libc/include/sys/reent.h: Define and use __reent_assert.
This commit is contained in:
parent
70f1ec33cb
commit
e83c3d0ae5
@ -1,3 +1,7 @@
|
|||||||
|
2006-09-22 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* libc/include/sys/reent.h: Define and use __reent_assert.
|
||||||
|
|
||||||
2006-09-13 Joel Sherrill <joel@oarcorp.com>
|
2006-09-13 Joel Sherrill <joel@oarcorp.com>
|
||||||
|
|
||||||
* libc/include/pthread.h: Add pthread barriers,
|
* libc/include/pthread.h: Add pthread barriers,
|
||||||
|
@ -459,8 +459,9 @@ struct _reent
|
|||||||
/* Only built the assert() calls if we are built with debugging. */
|
/* Only built the assert() calls if we are built with debugging. */
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#define __reent_assert(x) assert(x)
|
||||||
#else
|
#else
|
||||||
#define assert(x) ((void)0)
|
#define __reent_assert(x) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generic _REENT check macro. */
|
/* Generic _REENT check macro. */
|
||||||
@ -468,7 +469,7 @@ struct _reent
|
|||||||
struct _reent *_r = (var); \
|
struct _reent *_r = (var); \
|
||||||
if (_r->what == NULL) { \
|
if (_r->what == NULL) { \
|
||||||
_r->what = (type)malloc(size); \
|
_r->what = (type)malloc(size); \
|
||||||
assert(_r->what); \
|
__reent_assert(_r->what); \
|
||||||
init; \
|
init; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user