static void munmap_t(void *a, int len)
{
- vir_bytes av = (vir_bytes) a;
assert(a);
assert(a != MAP_FAILED);
+ assert(!((vir_bytes)a % PAGE_SIZE));
assert(len > 0);
- assert(!(av % PAGE_SIZE));
len = roundup(len, PAGE_SIZE);
static iovec_t iovec[NR_IOREQS];
off_t pos;
unsigned int i, iov_per_block;
+#if !defined(NDEBUG)
unsigned int start_in_use = bufs_in_use, start_bufqsize = bufqsize;
+#endif /* !defined(NDEBUG) */
if(bufqsize == 0) return;
+#if !defined(NDEBUG)
/* for READING, check all buffers on the list are obtained and held
* (count > 0)
*/
assert(dev != NO_DEV);
assert(fs_block_size > 0);
assert(howmany(fs_block_size, PAGE_SIZE) <= NR_IOREQS);
-
+#endif /* !defined(NDEBUG) */
+
/* For WRITING, (Shell) sort buffers on lmfs_blocknr.
* For READING, the buffers are already sorted.
*/
}
}
+#if !defined(NDEBUG)
if(rw_flag == READING) {
assert(start_in_use >= start_bufqsize);
/* READING callers assume all bufs are released. */
assert(start_in_use - start_bufqsize == bufs_in_use);
}
+#endif /* !defined(NDEBUG) */
}
/*===========================================================================*
/*===========================================================================*
* pipe_suspend *
*===========================================================================*/
-void pipe_suspend(struct filp * __unused filp, vir_bytes buf, size_t size)
+void pipe_suspend(struct filp * filp __unused, vir_bytes buf, size_t size)
{
/* Take measures to suspend the processing of the present system call.
* Store the parameters to be used upon resuming in the process table.