It is better to create two threads for this purpose, use block read mode for each uart, and write data to other uart once one thread get data from one uart, vice versa.