fixed wrong macros - hawk_tio_getxtn(), hawk_pio_getxtn(), hawk_sio_getxtn(), etc

This commit is contained in:
hyung-hwan 2020-04-13 06:15:03 +00:00
parent 6664621a45
commit f5da432bb4
10 changed files with 12 additions and 12 deletions

View File

@ -202,7 +202,7 @@ HAWK_EXPORT void hawk_arr_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_arr_getxtn (hawk_arr_t* arr) { return (void*)(arr + 1); }
#else
#define hawk_arr_getxtn(awk) ((void*)((hawk_arr_t*)(arr) + 1))
#define hawk_arr_getxtn(arr) ((void*)((hawk_arr_t*)(arr) + 1))
#endif
/**

View File

@ -158,7 +158,7 @@ HAWK_EXPORT void hawk_becs_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_becs_getxtn (hawk_becs_t* becs) { return (void*)(becs + 1); }
#else
#define hawk_becs_getxtn(awk) ((void*)((hawk_becs_t*)(becs) + 1))
#define hawk_becs_getxtn(becs) ((void*)((hawk_becs_t*)(becs) + 1))
#endif
/**
@ -372,7 +372,7 @@ HAWK_EXPORT void hawk_uecs_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_uecs_getxtn (hawk_uecs_t* uecs) { return (void*)(uecs + 1); }
#else
#define hawk_uecs_getxtn(awk) ((void*)((hawk_uecs_t*)(uecs) + 1))
#define hawk_uecs_getxtn(uecs) ((void*)((hawk_uecs_t*)(uecs) + 1))
#endif
/**

View File

@ -201,7 +201,7 @@ HAWK_EXPORT void hawk_fio_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_fio_getxtn (hawk_fio_t* fio) { return (void*)(fio + 1); }
#else
#define hawk_fio_getxtn(awk) ((void*)((hawk_fio_t*)(fio) + 1))
#define hawk_fio_getxtn(fio) ((void*)((hawk_fio_t*)(fio) + 1))
#endif
/**

View File

@ -111,7 +111,7 @@ HAWK_EXPORT void hawk_mtx_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_mtx_getxtn (hawk_mtx_t* mtx) { return (void*)(mtx + 1); }
#else
#define hawk_mtx_getxtn(awk) ((void*)((hawk_mtx_t*)(mtx) + 1))
#define hawk_mtx_getxtn(mtx) ((void*)((hawk_mtx_t*)(mtx) + 1))
#endif
HAWK_EXPORT int hawk_mtx_lock (

View File

@ -246,7 +246,7 @@ HAWK_EXPORT void hawk_pio_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_pio_getxtn (hawk_pio_t* pio) { return (void*)(pio + 1); }
#else
#define hawk_pio_getxtn(awk) ((void*)((hawk_pio_t*)(pio) + 1))
#define hawk_pio_getxtn(pio) ((void*)((hawk_pio_t*)(pio) + 1))
#endif
/**

View File

@ -158,7 +158,7 @@ HAWK_EXPORT void hawk_sio_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_sio_getxtn (hawk_sio_t* sio) { return (void*)(sio + 1); }
#else
#define hawk_sio_getxtn(awk) ((void*)((hawk_sio_t*)(sio) + 1))
#define hawk_sio_getxtn(sio) ((void*)((hawk_sio_t*)(sio) + 1))
#endif
HAWK_EXPORT hawk_cmgr_t* hawk_sio_getcmgr (

View File

@ -138,7 +138,7 @@ HAWK_EXPORT int hawk_tio_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_tio_getxtn (hawk_tio_t* tio) { return (void*)(tio + 1); }
#else
#define hawk_tio_getxtn(awk) ((void*)((hawk_tio_t*)(tio) + 1))
#define hawk_tio_getxtn(tio) ((void*)((hawk_tio_t*)(tio) + 1))
#endif
/**

View File

@ -100,7 +100,7 @@ HAWK_EXPORT void hawk_tre_fini (
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE void* hawk_tre_getxtn (hawk_tre_t* tre) { return (void*)(tre + 1); }
#else
#define hawk_tre_getxtn(awk) ((void*)((hawk_tre_t*)(tre) + 1))
#define hawk_tre_getxtn(tre) ((void*)((hawk_tre_t*)(tre) + 1))
#endif
HAWK_EXPORT int hawk_tre_compx (

View File

@ -1791,7 +1791,7 @@ create_process:
int r;
tio[i] = hawk_tio_open(pio->gem, HAWK_SIZEOF(&pio->pin[i]), topt);
if (tio[i] == HAWK_NULL) goto oops;
if (HAWK_UNLIKELY(!tio[i])) goto oops;
*(hawk_pio_pin_t**)hawk_tio_getxtn(tio[i]) = &pio->pin[i];

View File

@ -190,10 +190,10 @@ typedef struct ioattr_t
} ioattr_t;
#if defined(HAWK_HAVE_INLINE)
static HAWK_INLINE xtn_t* GET_XTN(hawk_t* awk) { return (xtn_t*)((hawk_uint8_t*)hawk_getxtn(awk) - HAWK_SIZEOF(xtn_t)); }
static HAWK_INLINE xtn_t* GET_XTN(hawk_t* hawk) { return (xtn_t*)((hawk_uint8_t*)hawk_getxtn(hawk) - HAWK_SIZEOF(xtn_t)); }
static HAWK_INLINE rxtn_t* GET_RXTN(hawk_rtx_t* rtx) { return (rxtn_t*)((hawk_uint8_t*)hawk_rtx_getxtn(rtx) - HAWK_SIZEOF(rxtn_t)); }
#else
#define GET_XTN(awk) ((xtn_t*)((hawk_uint8_t*)hawk_getxtn(awk) - HAWK_SIZEOF(xtn_t)))
#define GET_XTN(hawk) ((xtn_t*)((hawk_uint8_t*)hawk_getxtn(hawk) - HAWK_SIZEOF(xtn_t)))
#define GET_RXTN(rtx) ((rxtn_t*)((hawk_uint8_t*)hawk_rtx_getxtn(rtx) - HAWK_SIZEOF(rxtn_t)))
#endif