Home
last modified time | relevance | path

Searched refs:sq (Results 1 – 2 of 2) sorted by relevance

/device/google/contexthub/firmware/src/
DsimpleQ.c39 static inline struct SimpleQueueEntry *simpleQueueGetNth(struct SimpleQueue* sq, uint32_t n) in simpleQueueGetNth() argument
41 return (struct SimpleQueueEntry*)(sq->data + n * sq->entrySz); in simpleQueueGetNth()
44 static inline uint32_t simpleQueueGetIdx(struct SimpleQueue* sq, const struct SimpleQueueEntry *e) in simpleQueueGetIdx() argument
46 return (((const uint8_t*)e) - sq->data) / sq->entrySz; in simpleQueueGetIdx()
52 struct SimpleQueue *sq; in simpleQueueAlloc() local
57 sq = heapAlloc(sz); in simpleQueueAlloc()
58 if (!sq) in simpleQueueAlloc()
61 memset(sq, 0, sz); in simpleQueueAlloc()
63 sq->discardCbk = forceDiscardCbk; in simpleQueueAlloc()
64 sq->head = SIMPLE_QUEUE_IDX_NONE; in simpleQueueAlloc()
[all …]
/device/google/contexthub/firmware/inc/
DsimpleQ.h32 void simpleQueueDestroy(struct SimpleQueue* sq); //will call discard, but in no particular order!
33 bool simpleQueueEnqueue(struct SimpleQueue* sq, const void *data, int length, bool possiblyDiscarda…
34 bool simpleQueueDequeue(struct SimpleQueue* sq, void *dataVal);