THC_POINTER_MASK
if ((*read_ptr & THC_POINTER_MASK) == (*write_ptr & THC_POINTER_MASK))
prd_table_index = write_ptr & THC_POINTER_MASK;