MCPcopy Create free account
hub / github.com/F-Stack/f-stack / its_cmd_queue_full

Function its_cmd_queue_full

freebsd/arm64/arm64/gicv3_its.c:1551–1567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1549}
1550
1551static inline bool
1552its_cmd_queue_full(struct gicv3_its_softc *sc)
1553{
1554 size_t read_idx, next_write_idx;
1555
1556 /* Get the index of the next command */
1557 next_write_idx = (sc->sc_its_cmd_next_idx + 1) %
1558 (ITS_CMDQ_SIZE / sizeof(struct its_cmd));
1559 /* And the index of the current command being read */
1560 read_idx = gic_its_read_4(sc, GITS_CREADR) / sizeof(struct its_cmd);
1561
1562 /*
1563 * The queue is full when the write offset points
1564 * at the command before the current read offset.
1565 */
1566 return (next_write_idx == read_idx);
1567}
1568
1569static inline void
1570its_cmd_sync(struct gicv3_its_softc *sc, struct its_cmd *cmd)

Callers 1

its_cmd_alloc_lockedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected