diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-07 15:21:27 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-06-07 15:21:27 +0000 |
commit | 05ce4e097aeab6292b59a0d3b792cb403eeb6e03 (patch) | |
tree | 2f37ce9a4edec10f176cdee1f42c5edc5e8257ec /cpukit/posix/src/sched.c | |
parent | new file (diff) | |
download | rtems-05ce4e097aeab6292b59a0d3b792cb403eeb6e03.tar.bz2 |
changed code which set errno and then returned -1 to use the macro
set_errno_and_return_minus_one.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/sched.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/cpukit/posix/src/sched.c b/cpukit/posix/src/sched.c index b66c6fb195..f16bb12757 100644 --- a/cpukit/posix/src/sched.c +++ b/cpukit/posix/src/sched.c @@ -9,6 +9,7 @@ #include <rtems/system.h> #include <rtems/score/tod.h> #include <rtems/score/thread.h> +#include <rtems/posix/seterr.h> #include <rtems/posix/priority.h> #include <rtems/posix/time.h> @@ -23,8 +24,7 @@ int sched_setparam( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -37,8 +37,7 @@ int sched_getparam( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -53,8 +52,7 @@ int sched_setscheduler( const struct sched_param *param ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -66,8 +64,7 @@ int sched_getscheduler( pid_t pid ) { - errno = ENOSYS; - return -1; + set_errno_and_return_minus_one( ENOSYS ); } /*PAGE @@ -87,8 +84,7 @@ int sched_get_priority_max( break; default: - errno = EINVAL; - return -1; + set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; @@ -111,8 +107,7 @@ int sched_get_priority_min( break; default: - errno = EINVAL; - return -1; + set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; |