Fix STM32 F2/F4 SDIO clocking; Clean-up files in sched/ directory

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4940 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-07-14 19:30:31 +00:00
parent 876ffbd29f
commit 4ea9aa3ff1
204 changed files with 2197 additions and 1635 deletions
+19 -17
View File
@@ -2,7 +2,7 @@
* sched/sched_rrgetinterval.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -38,10 +38,13 @@
************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <sched.h>
#include <errno.h>
#include <nuttx/arch.h>
#include "os_internal.h"
#include "clock_internal.h"
@@ -77,21 +80,20 @@
* Name: sched_rr_get_interval
*
* Description:
* sched_rr_get_interval() writes the timeslice interval
* for task identified by 'pid' into the timespec structure
* pointed to by 'interval.' If pid is zero, the timeslice
* for the calling process is written into 'interval. The
* identified process should be running under the SCHED_RR
* scheduling policy.'
* sched_rr_get_interval() writes the timeslice interval for task
* identified by 'pid' into the timespec structure pointed to by
* 'interval.' If pid is zero, the timeslice for the calling process
* is written into 'interval. The identified process should be running
* under the SCHED_RRscheduling policy.'
*
* Inputs:
* pid - the task ID of the task. If pid is zero, the
* priority of the calling task is returned.
* pid - the task ID of the task. If pid is zero, the priority of the
* calling task is returned.
* interval - a structure used to return the time slice
*
* Return Value:
* On success, sched_rr_get_interval() returns OK (0). On
* error, ERROR (-1) is returned, and errno is set to:
* On success, sched_rr_get_interval() returns OK (0). On error,
* ERROR (-1) is returned, and errno is set to:
*
* EFAULT -- Cannot copy to interval
* EINVAL Invalid pid.
@@ -107,8 +109,8 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
#if CONFIG_RR_INTERVAL > 0
FAR _TCB *rrtcb;
/* If pid is zero, the timeslice for the calling process is
* written into 'interval.'
/* If pid is zero, the timeslice for the calling process is written
* into 'interval.'
*/
if (!pid)
@@ -120,7 +122,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
else if (pid < 0)
{
*get_errno_ptr() = EINVAL;
set_errno(EINVAL);
return ERROR;
}
@@ -131,14 +133,14 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
rrtcb = sched_gettcb(pid);
if (!rrtcb)
{
*get_errno_ptr() = ESRCH;
set_errno(ESRCH);
return ERROR;
}
}
if (!interval)
{
*get_errno_ptr() = EFAULT;
set_errno(EFAULT);
return ERROR;
}
@@ -149,7 +151,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
return OK;
#else
*get_errno_ptr() = ENOSYS;
set_errno(ENOSYS);
return ERROR;
#endif
}