/* Note: the tidaw-list is assumed to be contiguous with no ttics. The caller must ensure that there is enough space for the new tidaw. The last-tidaw flag for the last tidaw in the list will be set by tcw_finalize.  */
struct tidaw* tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags, void *addr, u32 count)
/* Note: the tidaw-list is assumed to be contiguous with no ttics. The caller must ensure that there is enough space for the new tidaw. The last-tidaw flag for the last tidaw in the list will be set by tcw_finalize.  */
struct tidaw* tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags, void *addr, u32 count)
{
	struct tidaw *tidaw;
	tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws;
	memset(tidaw, 0, sizeof(struct tidaw));
	tidaw->flags = flags;
	tidaw->count = count;
	tidaw->addr = (u64) ((addr_t) addr);
	return tidaw;
}