mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-26 00:29:27 +00:00
Expose macro globally
This commit is contained in:
parent
f4fa5670b4
commit
51f5bc64ba
|
@ -22,19 +22,6 @@ enum {
|
|||
|
||||
#include <jni.h>
|
||||
|
||||
// cribbed from AOSP and modified with usleep() and to also ignore EAGAIN (should this be a different errno than EINTR)
|
||||
#define TEMP_FAILURE_RETRY_FOPEN(exp) ({ \
|
||||
typeof (exp) _rc; \
|
||||
do { \
|
||||
_rc = (exp); \
|
||||
if (_rc == NULL && (errno == EINTR || errno == EAGAIN) ) { \
|
||||
usleep(10); \
|
||||
} else { \
|
||||
break; \
|
||||
} \
|
||||
} while (1); \
|
||||
_rc; })
|
||||
|
||||
static volatile int __attribute__((noinline)) _crash_null_deref(void) {
|
||||
static volatile uintptr_t *ptr = NULL;
|
||||
while ((ptr+1)) {
|
||||
|
|
14
src/common.h
14
src/common.h
|
@ -133,6 +133,20 @@ static inline GLenum safeGLGetError(void) {
|
|||
__sync_add_and_fetch((x), 1);
|
||||
|
||||
|
||||
// cribbed from AOSP and modified with usleep() and to also ignore EAGAIN (should this be a different errno than EINTR)
|
||||
#define TEMP_FAILURE_RETRY_FOPEN(exp) ({ \
|
||||
typeof (exp) _rc; \
|
||||
do { \
|
||||
_rc = (exp); \
|
||||
if (_rc == NULL && (errno == EINTR || errno == EAGAIN) ) { \
|
||||
usleep(10); \
|
||||
} else { \
|
||||
break; \
|
||||
} \
|
||||
} while (1); \
|
||||
_rc; })
|
||||
|
||||
|
||||
extern bool do_logging;
|
||||
|
||||
#ifdef ANDROID
|
||||
|
|
Loading…
Reference in New Issue
Block a user