5
Last change
on this file since 77fbbd6 was
e785fbaa,
checked in by Sebastian Huber <sebastian.huber@…>, on 04/04/14 at 11:58:26
|
score: Delete _Thread_Ticks_per_timeslice
Use the Configuration instead.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Limits for Scheduling Parameter |
---|
5 | * @ingroup POSIXAPI |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258 |
---|
10 | * |
---|
11 | * COPYRIGHT (c) 1989-2007. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.org/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #if HAVE_CONFIG_H |
---|
20 | #include "config.h" |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <unistd.h> /* getpid */ |
---|
24 | #include <sched.h> |
---|
25 | #include <errno.h> |
---|
26 | |
---|
27 | #include <rtems/score/timespec.h> |
---|
28 | #include <rtems/config.h> |
---|
29 | #include <rtems/seterr.h> |
---|
30 | |
---|
31 | int sched_rr_get_interval( |
---|
32 | pid_t pid, |
---|
33 | struct timespec *interval |
---|
34 | ) |
---|
35 | { |
---|
36 | /* |
---|
37 | * Only supported for the "calling process" (i.e. this node). |
---|
38 | */ |
---|
39 | |
---|
40 | if ( pid && pid != getpid() ) |
---|
41 | rtems_set_errno_and_return_minus_one( ESRCH ); |
---|
42 | |
---|
43 | if ( !interval ) |
---|
44 | rtems_set_errno_and_return_minus_one( EINVAL ); |
---|
45 | |
---|
46 | _Timespec_From_ticks( |
---|
47 | rtems_configuration_get_ticks_per_timeslice(), |
---|
48 | interval |
---|
49 | ); |
---|
50 | |
---|
51 | return 0; |
---|
52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.