1 2 #ifndef __SGA_H__ 3 #define __SGA_H__ 4 5 #define SGARRAY_MAX_ENTRIES 32 6 7 typedef struct SGEntry 8 { 9 uint64_t offset; 10 uint64_t length; 11 } SGEntry; 12 13 typedef struct SGArray 14 { 15 uint32_t len; 16 SGEntry entries[SGARRAY_MAX_ENTRIES]; 17 } SGArray; 18 19 void SGArray_Init(SGArray *sga); 20 int SGArray_Append(SGArray *sga, uint64_t off, uint64_t len); 21 void SGArray_Dump(SGArray *sga); 22 23 #endif /* __SGA_H__ */ 24 25