This function will replace rtems_record_drain() which turned out to be unreliable in SMP configurations.