summaryrefslogtreecommitdiff
path: root/os_posix/os_yield.c
blob: a13b407150d8fae650492d3eceed9a33998d2f96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 2008-2011 WiredTiger, Inc.
 *	All rights reserved.
 *
 * $Id$
 */

#include "wt_internal.h"

/*
 * __wt_yield --
 *	Yield the thread of control.
 */
void
__wt_yield(void)
{
#ifdef HAVE_PTHREAD_YIELD
	pthread_yield();
#else
	sched_yield();
#endif
}