summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/sched.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-07 15:21:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-07 15:21:27 +0000
commit05ce4e097aeab6292b59a0d3b792cb403eeb6e03 (patch)
tree2f37ce9a4edec10f176cdee1f42c5edc5e8257ec /c/src/exec/posix/src/sched.c
parentnew file (diff)
downloadrtems-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 'c/src/exec/posix/src/sched.c')
-rw-r--r--c/src/exec/posix/src/sched.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/c/src/exec/posix/src/sched.c b/c/src/exec/posix/src/sched.c
index b66c6fb195..f16bb12757 100644
--- a/c/src/exec/posix/src/sched.c
+++ b/c/src/exec/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;