Hi Ola,
 I'm trying to get the linux-generic timer implementation running on my
32-bit platform and I have the following issue:
 _ODP_STATIC_ASSERT(sizeof(tick_buf_t) == 16, "sizeof(tick_buf_t) == 16");
fails because sizeof(tick_buf_t) is actually larger because of the size of
odp_atomic_u64_t (already 16 bytes due to lock and alignment):

/**
 * Atomic 64-bit unsigned integer
 */
typedef struct {
        uint64_t v; /**< Actual storage for the atomic variable */
#if __GCC_ATOMIC_LLONG_LOCK_FREE < 2
        /* Some architectures do not support lock-free operations on 64-bit
         * data types. We use a spin lock to ensure atomicity. */
        char lock; /**< Spin lock (if needed) used to ensure atomic access
*/
#endif
} odp_atomic_u64_t
ODP_ALIGNED(sizeof(uint64_t)); /* Enforce alignement! */

Should size of 16 bytes be enforced for lockless implementation only or it
is required also for lock-based implementation ()?

Thanks,
Alex
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to