mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 20:23:34 +08:00
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:
@@ -1,8 +1,8 @@
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* pthread_getschedparam.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 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
|
||||
@@ -31,11 +31,11 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
@@ -44,46 +44,46 @@
|
||||
#include <debug.h>
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
*********************************************************************************************/
|
||||
*****************************************************************************/
|
||||
|
||||
/********************************************************************************************
|
||||
* Function: pthread_getschedparam
|
||||
/****************************************************************************
|
||||
* Name: pthread_getschedparam
|
||||
*
|
||||
* Description:
|
||||
* The pthread_getschedparam() functions will get the scheduling policy and
|
||||
* parameters of threads. For SCHED_FIFO and SCHED_RR, the only required
|
||||
* member of the sched_param structure is the priority sched_priority.
|
||||
*
|
||||
* The pthread_getschedparam() function will retrieve the scheduling policy
|
||||
* and scheduling parameters for the thread whose thread ID is given by
|
||||
* 'thread' and will store those values in 'policy' and 'param',
|
||||
* The pthread_getschedparam() function will retrieve the scheduling
|
||||
* policy and scheduling parameters for the thread whose thread ID is
|
||||
* given by 'thread' and will store those values in 'policy' and 'param',
|
||||
* respectively. The priority value returned from pthread_getschedparam()
|
||||
* will be the value specified by the most recent pthread_setschedparam(),
|
||||
* pthread_setschedprio(), or pthread_create() call affecting the target
|
||||
* thread. It will not reflect any temporary adjustments to its priority (such
|
||||
* as might result of any priority inheritance, for example).
|
||||
* thread. It will not reflect any temporary adjustments to its priority
|
||||
* (such as might result of any priority inheritance, for example).
|
||||
*
|
||||
* The policy parameter may have the value SCHED_FIFO, or SCHED_RR
|
||||
* (SCHED_OTHER and SCHED_SPORADIC, in particular, are not supported).
|
||||
@@ -101,9 +101,10 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
********************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
int pthread_getschedparam(pthread_t thread, FAR int *policy, FAR struct sched_param *param)
|
||||
int pthread_getschedparam(pthread_t thread, FAR int *policy,
|
||||
FAR struct sched_param *param)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -128,7 +129,7 @@ int pthread_getschedparam(pthread_t thread, FAR int *policy, FAR struct sched_pa
|
||||
*policy = sched_getscheduler((pid_t)thread);
|
||||
if (*policy == ERROR)
|
||||
{
|
||||
ret = *get_errno_ptr();
|
||||
ret = get_errno();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user