Hardware multi-threaded processor for real-time