Mine
public text v1 · immutableint mbox_stat(int q, int *count, int *space)
{
mbox_t *box = &Q[q];
lock_acquire(&box->l);
*count = box->count;
*space = space_available(box);
lock_release(&box->l);
return 1; /*whatever - not a single caller checks the return value*/
}