1. A multithreaded microcontroller comprising: a set of special-purpose multithreading registers including a set of thread state registers storing a plurality of thread states for a corresponding plurality of threads; thread control logic connected to the set of multithreading registers, comprising: thread state transition logic connected to the set of thread state registers and configured to control thread state transitions for the plurality of threads; and thread instructions execution logic connected to the set of thread state registers and configured to execute a set of multithreading system call machine code instructions.