From 675c2e46b25122c8b5cb44deb5fc9cc914d65633 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 18 Apr 2012 13:24:39 +0000 Subject: [PATCH] Fix sched_setscheduler() return value git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4629 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 3 +++ sched/pthread_setschedparam.c | 5 +++-- sched/sched_setscheduler.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6eeacf67ae..6b30a31740 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2661,3 +2661,6 @@ and WWDIG watchdog timer driver. * configs/stm3240g-eval/src/up_lcd.c: Add LCD from for the STM3240G-EVAL (the initial check-in is just a stm3210e-eval driver with renaming). + * sched/sched_setscheduler.c: Correct successful return value (Contributed + by Richard Cochran). + diff --git a/sched/pthread_setschedparam.c b/sched/pthread_setschedparam.c index 40e1c4918c..e3e3c8ae90 100644 --- a/sched/pthread_setschedparam.c +++ b/sched/pthread_setschedparam.c @@ -1,8 +1,8 @@ /******************************************************************************************** * pthread_setschedparam.c * - * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -136,3 +136,4 @@ int pthread_setschedparam(pthread_t thread, int policy, FAR const struct sched_p } return ret; } + diff --git a/sched/sched_setscheduler.c b/sched/sched_setscheduler.c index 2ca4849bb6..dafab3e7b6 100644 --- a/sched/sched_setscheduler.c +++ b/sched/sched_setscheduler.c @@ -1,8 +1,8 @@ /**************************************************************************** * sched/sched_setscheduler.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -182,7 +182,7 @@ int sched_setscheduler(pid_t pid, int policy, } else { - return SCHED_FIFO; + return OK; } }