/*
 * $Id: sched.h,v 1.3 2000/09/22 22:05:17 k-abe Exp $
 *
 * This file is part of PTL, Portable Thread Library.
 *
 * Copyright (C) 1997-2000 Kota Abe
 */

#ifndef __PTL_SCHED_H__
#define __PTL_SCHED_H__

#include <sys/pthread-init.h>
#include <sys/pthread-cdecl.h>
#include <sys/types.h>
#include <time.h>

/* Scheduling policies */
#define SCHED_FIFO	1	/* First in-first out (FIFO) */
				/* scheduling policy */
#define SCHED_RR	2	/* Round robin scheduling policy */
#define SCHED_OTHER	3	/* Another scheduling policy */


__PTL_BEGIN_DECLS

/****************************************************************
 *
 *	13.3.5  Yield Processor
 *
 ****************************************************************/
extern int sched_yield __PTL_NOARGS;


/****************************************************************
 *
 *	13.3.6  Get Scheduling Parameter Limits
 *
 ****************************************************************/
extern int sched_get_priority_max __PTL_P((int));
extern int sched_get_priority_min __PTL_P((int));
extern int sched_rr_get_interval __PTL_P((pid_t, struct timespec *));

__PTL_END_DECLS

#endif /* __PTL_SCHED_H__ */
