In reply to desperadorocks:
Yes, like a UART port or something simpler.
You need to understand the difference between C code running on the CPU in the DUT in simulation versus C code running on the host CPU executing the simulation. The CPU on the DUT is basically a giant state machine and the C code gets compiled into a binary memory image. That’s completely disconnnected from the CPU running the simulation. So there is no ability to make calls to the OS.