2002-04-25 Jeff Johnston <jjohnstn@redhat.com>

*  libc/sys/linux/Makefile.am: Add support for sched.c.
        *  libc/sys/linux/Makefile.in: Regenerated.
        *  libc/sys/linux/sched.c: New file.
        *  libc/sys/linux/sys/types.h: Add struct timespec.
This commit is contained in:
Jeff Johnston 2002-04-25 22:12:10 +00:00
parent 217ad4a0b1
commit c62adaccc7
5 changed files with 42 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2002-04-25 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/Makefile.am: Add support for sched.c.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/sched.c: New file.
* libc/sys/linux/sys/types.h: Add struct timespec.
2002-04-25 Thomas Fitzsimmons <fitzsim@redhat.com>
* configure.in (CC_FOR_BUILD): Set to gcc whether

View File

@ -9,7 +9,7 @@ SUBLIBS = $(LINUX_MACH_LIB)
LIB_SOURCES = \
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
process.c realpath.c \
process.c realpath.c sched.c \
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
sysconf.c systat.c termios.c time.c \
usleep.c wait.c

View File

@ -98,7 +98,7 @@ SUBLIBS = $(LINUX_MACH_LIB)
LIB_SOURCES = \
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
process.c realpath.c \
process.c realpath.c sched.c \
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
sysconf.c systat.c termios.c time.c \
usleep.c wait.c
@ -132,17 +132,18 @@ DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@
@USE_LIBTOOL_FALSE@lib_a_OBJECTS = brk.o getoptlong.o ids.o inode.o \
@USE_LIBTOOL_FALSE@io.o linux.o mmap.o process.o realpath.o select.o \
@USE_LIBTOOL_FALSE@signal.o siglongjmp.o socket.o sleep.o stack.o \
@USE_LIBTOOL_FALSE@sysconf.o systat.o termios.o time.o usleep.o wait.o
@USE_LIBTOOL_FALSE@io.o linux.o mmap.o process.o realpath.o sched.o \
@USE_LIBTOOL_FALSE@select.o signal.o siglongjmp.o socket.o sleep.o \
@USE_LIBTOOL_FALSE@stack.o sysconf.o systat.o termios.o time.o usleep.o \
@USE_LIBTOOL_FALSE@wait.o
LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES =
@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = brk.lo getoptlong.lo ids.lo \
@USE_LIBTOOL_TRUE@inode.lo io.lo linux.lo mmap.lo process.lo \
@USE_LIBTOOL_TRUE@realpath.lo select.lo signal.lo siglongjmp.lo \
@USE_LIBTOOL_TRUE@socket.lo sleep.lo stack.lo sysconf.lo systat.lo \
@USE_LIBTOOL_TRUE@termios.lo time.lo usleep.lo wait.lo
@USE_LIBTOOL_TRUE@realpath.lo sched.lo select.lo signal.lo \
@USE_LIBTOOL_TRUE@siglongjmp.lo socket.lo sleep.lo stack.lo sysconf.lo \
@USE_LIBTOOL_TRUE@systat.lo termios.lo time.lo usleep.lo wait.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

View File

@ -0,0 +1,16 @@
/* libc/sys/linux/sched.c - Process scheduling functions */
/* Copyright 2002, Red Hat Inc. */
#include <time.h>
#include <sched.h>
#include <machine/syscall.h>
_syscall2(int,sched_getparam,pid_t,pid,struct sched_param *,sched);
_syscall1(int,sched_get_priority_max,int,policy);
_syscall1(int,sched_get_priority_min,int,policy);
_syscall1(int,sched_getscheduler,pid_t,pid);
_syscall2(int,sched_rr_get_interval,pid_t,pid,struct timespec *,interval);
_syscall2(int,sched_setparam,pid_t,pid,const struct sched_param *,sched);
_syscall3(int,sched_setscheduler,pid_t,pid,int,policy,const struct sched_param *,sched);
_syscall0(int,sched_yield);

View File

@ -31,6 +31,16 @@ typedef __pid_t pid_t;
typedef __off_t off_t;
typedef __loff_t loff_t;
/* Time Value Specification Structures, P1003.1b-1993, p. 261 */
#ifndef _STRUCT_TIMESPEC
#define _STRUCT_TIMESPEC
struct timespec {
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
#endif /* !_STRUCT_TIMESPEC */
#include <linux/types.h>
#endif