smt_pause(3C) Standard C Library Functions smt_pause(3C)NAMEsmt_pause - busy wait idle function
SYNOPSIS
#include <synch.h>
void smt_pause(void);
DESCRIPTION
The smt_pause() function delays for a short implementation-dependent
period before returning to the caller, consuming as few processor
resources as possible. This primitive is recommended for use in busy
wait loops to lessen the impact the loop has on the rest of the system.
For example, on CMT systems it enables other hardware strands sharing
the core to go faster during the busy wait.
USAGE
Typical usage is as follows:
volatile int *wait;
while (*wait == 1)
smt_pause();
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
┌─────────────────────────────┬─────────────────────────────┐
│ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
├─────────────────────────────┼─────────────────────────────┤
│Interface Stability │Committed │
├─────────────────────────────┼─────────────────────────────┤
│MT-Level │MT-Safe │
└─────────────────────────────┴─────────────────────────────┘
SEE ALSOattributes(5)SunOS 5.10 20 Jul 2010 smt_pause(3C)