Unix to Windows Porting Dictionary for HPC

Links

Function List

pthread_yield


Table of Contents

Unix
Windows
Purpose
Discussion

Unix

header file: pthread.h

void pthread_yield ();

Windows

header file: Windows.h

BOOL WINAPI SwitchToThread(void);
      

Purpose

The pthread_yield function will cause the calling thread to relinquish its use of the processor and be placed back on the run queue. If there are no other threads on the run queue the thread will immediately be rescheduled.

Discussion

The Windows SwitchToThread function will also cause the calling thread to relinquish the processor. If there are no other threads in the run queue, the call will have no effect and the thread will continue execution.

blog comments powered by Disqus