1. A method, comprising: a processor device executing program code in one or more threads, the processor device detecting a call of a function in one of the threads; the processor device executing the function in a further thread; and the processor device performing a selection between saving a state of the processor device when starting execution of the function in the further thread and not saving the state of the processor device when starting execution of the function in the further thread.