From 8fb3796385eb2416d05567a5996cc60f251d0021 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 12 Dec 2000 01:24:09 +0000 Subject: 2000-12-11 Joel Sherrill * Merge RTEMS specific .h files into main libc/include. * libc/sys/rtems/include/signal.h: Removed. * libc/sys/rtems/include/time.h: Removed. * libc/sys/rtems/sys/features.h: Removed. * libc/sys/rtems/sys/sched.h: Removed. * libc/sys/rtems/sys/siginfo.h: Removed. * libc/sys/rtems/sys/signal.h: Removed. * libc/sys/rtems/sys/time.h: Removed. * libc/sys/rtems/sys/times.h: Removed. definitions for time_t and clock_t since these are no longer in time.h. * libc/include/pthread.h: New file. * libc/include/sys/sched.h: New file. * libc/include/sys/features.h: New file. * libc/include/time.h: Removed duplicate definition of clock_t and time_t, get them from instead. Add prototypes for POSIX clock and timer functionality. * libc/sys/linux/sys/types.h: Changed to include * libc/include/machine/types.h: Add _CLOCKID_T_ and _TIMER_T_. * libc/include/sys/signal.h: Add more complete set of POSIX signal functionality including real-time and threaded signals. * libc/include/sys/types.h: Add clock_t, time_t, struct timespec, and struct itimerspec. Centralizing these makes things cleaner. RTEMS uses 64-bit dev_t. Added numerous primitive definitions for pthreads including macros, pthread_attr_t, pthread_mutexattr_t, pthread_condattr_t, pthread_key_t, pthread_once_t, and pthread_t. * libc/include/sys/unistd.h: Added getlogin_r() prototype. If RTEMS follow POSIX on read(), write() and sbrk() prototype. Feature flags removed and moved to new file . Full set of POSIX sysconf() constants --- newlib/libc/include/sys/sched.h | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 newlib/libc/include/sys/sched.h (limited to 'newlib/libc/include/sys/sched.h') diff --git a/newlib/libc/include/sys/sched.h b/newlib/libc/include/sys/sched.h new file mode 100644 index 000000000..540552199 --- /dev/null +++ b/newlib/libc/include/sys/sched.h @@ -0,0 +1,65 @@ +/* + * Written by Joel Sherrill . + * + * COPYRIGHT (c) 1989-2000. + * On-Line Applications Research Corporation (OAR). + * + * Permission to use, copy, modify, and distribute this software for any + * purpose without fee is hereby granted, provided that this entire notice + * is included in all copies of any software which is or includes a copy + * or modification of this software. + * + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION + * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS + * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + * + * $Id$ + */ + + +#ifndef __POSIX_SYS_SCHEDULING_h +#define __POSIX_SYS_SCHEDULING_h + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include +#include + +/* Scheduling Policies, P1003.1b-1993, p. 250 + NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. */ + +#define SCHED_OTHER 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 + +#if defined(_POSIX_SPORADIC_SERVER) +#define SCHED_SPORADIC 3 +#endif + +/* Scheduling Parameters, P1003.1b-1993, p. 249 + NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */ + +struct sched_param { + int sched_priority; /* Process execution scheduling priority */ + +#if defined(_POSIX_SPORADIC_SERVER) + int ss_low_priority; /* Low scheduling priority for sporadic */ + /* server */ + struct timespec ss_replenish_period; + /* Replenishment period for sporadic server */ + struct timespec ss_initial_budget; /* Initial budget for sporadic server */ +#endif +}; + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ + -- cgit v1.2.3