mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Most cosmetic, but includes some fixes to some range checking
This commit is contained in:
@@ -45,6 +45,10 @@
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Function: pthread_attr_setschedparam
|
||||
*
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************
|
||||
* libc/sched/sched_getprioritymax.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009, 2011, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -39,32 +39,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************/
|
||||
@@ -89,12 +67,6 @@
|
||||
|
||||
int sched_get_priority_max(int policy)
|
||||
{
|
||||
if (policy != SCHED_FIFO && policy != SCHED_RR)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SCHED_PRIORITY_MAX;
|
||||
}
|
||||
DEBUGASSERT(policy >= SCHED_FIFO && policy <= SCHED_OTHER);
|
||||
return SCHED_PRIORITY_MAX;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/************************************************************************
|
||||
* libc/sched/sched_getprioritymin.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009, 2011, 2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -39,32 +39,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************/
|
||||
@@ -89,12 +67,6 @@
|
||||
|
||||
int sched_get_priority_min(int policy)
|
||||
{
|
||||
if (policy != SCHED_FIFO && policy != SCHED_RR)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SCHED_PRIORITY_MIN;
|
||||
}
|
||||
DEBUGASSERT(policy >= SCHED_FIFO && policy <= SCHED_OTHER);
|
||||
return SCHED_PRIORITY_MIN;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Global Functions
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user