sq
i = sq(dist2(sx, sy, doors[sh].x, doors[sh].y));
static int sq(int);
pp = mp->sq[i]->desc;
printf("%s (H):\n", mp->sq[i]->name);
mp->sq[i]->name, pp->houses);
mp->sq[i]->desc->houses = result[i];
pp = mp->sq[i]->desc;
printf("%s (0):\n", mp->sq[i]->name);
mp->sq[i]->name,pp->houses);
mp->sq[i]->name);
mp->sq[i]->desc->houses = temp[i];
sqp = mp->sq[i];
if (mp->sq[i]->desc->houses < 4)
mp->sq[i]->desc->monop = TRUE;
mp->sq[i]->desc->monop = FALSE;
mp->sq[i] = &board[mp->sqnums[i]];
SQUARE *sq[3]; /* list of squares in monop */
sendbp(sp, sq, crew[0]*100, 0);
sendbp(sp, sq, crew[1]*10, 0);
sendbp(sp, sq, crew[0]*100+crew[1]*10,
sendbp(sp, sq, crew[0]*100+crew[1]*10,
sendbp(sp, sq, crew[0]*100+crew[1]*10+crew[2],
struct ship *sp, *sq;
for (sq = sp + 1; sq < ls; sq++)
if (sq->file->dir && meleeing(sp, sq) &&
meleeing(sq, sp))
fightitout(sp, sq, 0);
foreachship(sq) {
if (sq->file->dir && meleeing(sq, sp))
thwart = fightitout(sp, sq, 1);
foreachship(sq) {
if (sq->file->dir && meleeing(sq, sp))
unboard(sq, sp, 0);
unboard(sp, sq, 0);
struct ship *sp, *sq;
foreachship(sq) {
if (!Xsnagged2(sp, sq))
if (meleeing(sp, sq))
if (!sq->file->dir
|| sp->nationality == capship(sq)->nationality)
switch (sp->specs->class - sq->specs->class) {
foreachship(sq)
cleansnag(sp, sq, 1);
foreachship(sq) {
if (sp != sq && sq->file->dir &&
range(sp, sq) < 4)
table(sp, sq, RIGGING, L_EXPLODE,
struct ship *sp, *sq;
foreachship(sq) {
friendly = sp->nationality == capship(sq)->nationality;
if (range(sp, sq) != 1)
if (grappled2(sp, sq)) {
if (is_toughmelee(sp, sq, 0, 0))
ungrap(sp, sq);
grap(sp, sq);
} else if (couldwin(sp, sq)) {
grap(sp, sq);
ungrap(sp, sq);
struct ship *sp, *sq;
foreachship(sq) {
if (sp == sq)
if (sq->file->dir == 0)
if (!push(sp, sq))
if (snagged2(sp, sq) && range(sp, sq) > 1)
if (!range(sp, sq) && !fouled2(sp, sq)) {
makesignal(sp, "collision with $$", sq);
sq);
send_foul(sq, n);
sq->file->movebuf[k + 1] = 0;
sq->file->row = sp->file->row - 1;
sq->file->col =
sq->file->col = sp->file->col;
sq->file->dir = sp->file->dir;
struct ship *sp, *sq;
struct ena_admin_sq sq;
struct ena_com_admin_sq *sq = &queue->sq;
ENA_MEM_ALLOC_COHERENT(queue->q_dmadev, size, sq->entries, sq->dma_addr,
sq->mem_handle);
if (!sq->entries) {
sq->head = 0;
sq->tail = 0;
sq->phase = 1;
sq->db_addr = NULL;
struct ena_com_admin_sq *sq = &admin_queue->sq;
if (sq->entries)
ENA_MEM_FREE_COHERENT(ena_dev->dmadev, size, sq->entries,
sq->dma_addr, sq->mem_handle);
sq->entries = NULL;
admin_queue->sq.db_addr = (u32 __iomem *)((uintptr_t)ena_dev->reg_bar +
addr_low = ENA_DMA_ADDR_TO_UINT32_LOW(admin_queue->sq.dma_addr);
addr_high = ENA_DMA_ADDR_TO_UINT32_HIGH(admin_queue->sq.dma_addr);
tail_masked = admin_queue->sq.tail & queue_size_mask;
cmd->aq_common_descriptor.flags |= admin_queue->sq.phase &
memcpy(&admin_queue->sq.entries[tail_masked], cmd, cmd_size_in_bytes);
admin_queue->sq.tail++;
if (unlikely((admin_queue->sq.tail & queue_size_mask) == 0))
admin_queue->sq.phase = !admin_queue->sq.phase;
ENA_DB_SYNC(&admin_queue->sq.mem_handle);
ENA_REG_WRITE32(admin_queue->bus, admin_queue->sq.tail,
admin_queue->sq.db_addr);
admin_queue->sq.head += comp_num;
destroy_cmd.sq.sq_identity |= (direction <<
destroy_cmd.sq.sq_idx = io_sq->idx;
struct ena_com_admin_sq sq;
struct ena_admin_sq sq;
ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq,
KASSERT(sq->head != NULL, ("stageq empty"));
head = sq->head;
while ((m = sq->head) != NULL && M_AGE_GET(m) < quanta) {
sq->head = m->m_nextpkt;
sq->depth--;
sq->tail = NULL;
stageq_add(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *m)
if (sq->tail != NULL) {
sq->tail->m_nextpkt = m;
age -= M_AGE_GET(sq->head);
sq->head = m;
sq->tail = m;
sq->depth++;
stageq_remove(struct ieee80211com *ic, struct ieee80211_stageq *sq, struct mbuf *mstaged)
for (m = sq->head; m != NULL; m = m->m_nextpkt) {
sq->head = m->m_nextpkt;
if (sq->tail == m)
sq->tail = mprev;
sq->depth--;
struct ieee80211_stageq *sq;
sq = &sg->ff_stageq[pri];
stageq_remove(ic, sq, mstaged);
stageq_remove(ic, sq, mstaged);
stageq_add(ic, sq, m);
"%s: stage frame, %u queued", __func__, sq->depth);
int sleepq_remove_matching(struct sleepqueue *sq, int queue,
void sleepq_free(struct sleepqueue *sq);
int oldc, tc, oldl, sq;
sq = isqrt(n);
bound = MAXIMUM(256, sq);