2012-02-05 11:35:58 -05:00
|
|
|
/****************************************************************
|
|
|
|
* *
|
2012-03-24 14:06:46 -04:00
|
|
|
* Copyright 2001, 2012 Fidelity Information Services, Inc *
|
2012-02-05 11:35:58 -05:00
|
|
|
* *
|
|
|
|
* This source code contains the intellectual property *
|
|
|
|
* of its copyright holder(s), and is made available *
|
|
|
|
* under a license. If you do not know the terms of *
|
|
|
|
* the license, please stop and do not read further. *
|
|
|
|
* *
|
|
|
|
****************************************************************/
|
|
|
|
|
2012-03-24 14:06:46 -04:00
|
|
|
#include "mdef.h"
|
|
|
|
|
2012-02-05 11:35:58 -05:00
|
|
|
#include <sched.h>
|
2012-03-24 14:06:46 -04:00
|
|
|
#include "gtm_unistd.h"
|
|
|
|
|
2012-02-05 11:35:58 -05:00
|
|
|
#include "rel_quant.h"
|
|
|
|
|
|
|
|
/* relinquish the processor to the next process in the scheduling queue */
|
|
|
|
void rel_quant(void)
|
|
|
|
{
|
2012-03-24 14:06:46 -04:00
|
|
|
# if defined(_AIX) || (defined(sparc))
|
|
|
|
/* For pSeries and SPARC, the "yield" system call seems a better match with what we want to do (yields to ALL
|
|
|
|
* processes instead of just those on the local processor queue.
|
|
|
|
*/
|
|
|
|
yield();
|
|
|
|
# else
|
2012-02-05 11:35:58 -05:00
|
|
|
sched_yield(); /* we do not need to link with libpthreads, so the usage of pthread_yield() is avoided where possible */
|
2012-03-24 14:06:46 -04:00
|
|
|
# endif
|
2012-02-05 11:35:58 -05:00
|
|
|
}
|