mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
HV:change the return type of sbuf_get and sbuf_put
Because of the return type inconsistent,change the sbuf return type to uint32_t to fix it,and make the pre-condition to check the parameter whether is NULL. V1->V2: 1.add () to bool expression 2.add pre-assumption to sbuf_get and sbuf_put Tracked-On: #861 Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -74,8 +74,16 @@ static inline void sbuf_add_flags(struct shared_buf *sbuf, uint64_t flags)
|
||||
|
||||
struct shared_buf *sbuf_allocate(uint32_t ele_num, uint32_t ele_size);
|
||||
void sbuf_free(struct shared_buf *sbuf);
|
||||
int sbuf_get(struct shared_buf *sbuf, uint8_t *data);
|
||||
int sbuf_put(struct shared_buf *sbuf, uint8_t *data);
|
||||
/**
|
||||
*@pre sbuf != NULL
|
||||
*@pre data != NULL
|
||||
*/
|
||||
uint32_t sbuf_get(struct shared_buf *sbuf, uint8_t *data);
|
||||
/**
|
||||
*@pre sbuf != NULL
|
||||
*@pre data != NULL
|
||||
*/
|
||||
uint32_t sbuf_put(struct shared_buf *sbuf, uint8_t *data);
|
||||
int sbuf_share_setup(uint16_t pcpu_id, uint32_t sbuf_id, uint64_t *hva);
|
||||
|
||||
#else /* HV_DEBUG */
|
||||
|
||||
Reference in New Issue
Block a user