Lines Matching refs:sensors_event_t
27 mData((sensors_event_t *)malloc(sizeof(sensors_event_t) * mSize)), in RingBuffer()
37 ssize_t RingBuffer::write(const sensors_event_t *ev, size_t size) { in write()
54 memcpy(&mData[writePos], ev, copy * sizeof(sensors_event_t)); in write()
57 memcpy(mData, &ev[copy], (size - copy) * sizeof(sensors_event_t)); in write()
69 ssize_t RingBuffer::read(sensors_event_t *ev, size_t size) { in read()
93 memcpy(ev, &mData[readPos], copy * sizeof(sensors_event_t)); in read()
96 memcpy(&ev[copy], mData, (size - copy) * sizeof(sensors_event_t)); in read()
105 : mData((sensors_event_t *)buf), mSize(size/sizeof(sensors_event_t)), in LockfreeBuffer()
111 memset(mData, 0, mSize*sizeof(sensors_event_t)); in ~LockfreeBuffer()
114 void LockfreeBuffer::write(const sensors_event_t *ev, size_t size) { in write()
121 memcpy(&mData[mWritePos], ev, offsetof(sensors_event_t, reserved0)); in write()
123 memcpy(reinterpret_cast<char *>(&mData[mWritePos]) + offsetof(sensors_event_t, timestamp), in write()
124 reinterpret_cast<const char *>(ev) + offsetof(sensors_event_t, timestamp), in write()
125 sizeof(sensors_event_t) - offsetof(sensors_event_t, timestamp)); in write()