source: rtems/cpukit/posix/src/sched_rr_get_interval.c @ fbfb5926

4.104.114.95
Last change on this file since fbfb5926 was fbfb5926, checked in by Joel Sherrill <joel.sherrill@…>, on 12/13/07 at 16:52:21

2007-12-13 Joel Sherrill <joel.sherrill@…>

  • posix/Makefile.am, posix/src/clockgetcpuclockid.c, posix/src/clockgetenableattr.c, posix/src/clockgettime.c, posix/src/clocksetenableattr.c, posix/src/clocksettime.c, posix/src/devctl.c, posix/src/execl.c, posix/src/execle.c, posix/src/execlp.c, posix/src/execv.c, posix/src/execve.c, posix/src/execvp.c, posix/src/fork.c, posix/src/mutexinit.c, posix/src/pthreadatfork.c, posix/src/pthreadgetcpuclockid.c, posix/src/pthreadkill.c, posix/src/semaphorecreatesupp.c, posix/src/sysconf.c, posix/src/wait.c, posix/src/waitpid.c: Split files into one function per file.
  • posix/src/aio_cancel.c, posix/src/aio_error.c, posix/src/aio_fsync.c, posix/src/aio_read.c, posix/src/aio_return.c, posix/src/aio_suspend.c, posix/src/aio_write.c, posix/src/lio_listio.c, posix/src/sched_getparam.c, posix/src/sched_getprioritymax.c, posix/src/sched_getprioritymin.c, posix/src/sched_getscheduler.c, posix/src/sched_rr_get_interval.c, posix/src/sched_setparam.c, posix/src/sched_setscheduler.c, posix/src/sched_yield.c: New files.
  • posix/src/aio.c, posix/src/sched.c, posix/src/types.c: Removed.
  • Property mode set to 100644
File size: 929 bytes
Line 
1/*
2 *  13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
3 *
4 *  COPYRIGHT (c) 1989-2007.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#if HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <sched.h>
19#include <errno.h>
20
21#include <rtems/system.h>
22#include <rtems/score/tod.h>
23#include <rtems/score/thread.h>
24#include <rtems/seterr.h>
25
26int sched_rr_get_interval(
27  pid_t             pid,
28  struct timespec  *interval
29)
30{
31  /*
32   *  Only supported for the "calling process" (i.e. this node).
33   */
34
35  if ( pid && pid != getpid() )
36    rtems_set_errno_and_return_minus_one( ESRCH );
37
38  if ( !interval )
39    rtems_set_errno_and_return_minus_one( EINVAL );
40
41  _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
42  return 0;
43}
Note: See TracBrowser for help on using the repository browser.