Switching to C99 stdint.h types
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2336 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
92b110e0e2
commit
12ae4d2bd7
@ -37,7 +37,6 @@
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
@ -38,7 +38,7 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* clock_getres.c
|
||||
/************************************************************************
|
||||
* sched/clock_getres.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,62 +31,65 @@
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "clock_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**********************************************************************
|
||||
* Public Constant Data
|
||||
**********************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**********************************************************************
|
||||
* Private Variables
|
||||
**********************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: clock_getres
|
||||
*
|
||||
* Description:
|
||||
* Clock Functions based on POSIX APIs
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int clock_getres(clockid_t clock_id, struct timespec *res)
|
||||
{
|
||||
uint32 time_res;
|
||||
int ret = OK;
|
||||
uint32_t time_res;
|
||||
int ret = OK;
|
||||
|
||||
sdbg("clock_id=%d\n", clock_id);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* clock_gettime.c
|
||||
/************************************************************************
|
||||
* sched/clock_gettime.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,63 +31,66 @@
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "clock_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**********************************************************************
|
||||
* Public Constant Data
|
||||
**********************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/**********************************************************
|
||||
/**********************************************************************
|
||||
* Private Variables
|
||||
**********************************************************/
|
||||
**********************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: clock_gettime
|
||||
*
|
||||
* Description:
|
||||
* Clock Functions based on POSIX APIs
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
{
|
||||
uint32 msecs;
|
||||
uint32 secs;
|
||||
uint32 nsecs;
|
||||
uint32_t msecs;
|
||||
uint32_t secs;
|
||||
uint32_t nsecs;
|
||||
int ret = OK;
|
||||
|
||||
sdbg("clock_id=%d\n", clock_id);
|
||||
@ -123,14 +126,14 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
|
||||
/* Add the base time to this. */
|
||||
|
||||
secs += (uint32)g_basetime.tv_sec;
|
||||
nsecs += (uint32)g_basetime.tv_nsec;
|
||||
secs += (uint32_t)g_basetime.tv_sec;
|
||||
nsecs += (uint32_t)g_basetime.tv_nsec;
|
||||
|
||||
/* Handle carry to seconds. */
|
||||
|
||||
if (nsecs > NSEC_PER_SEC)
|
||||
{
|
||||
uint32 dwCarrySecs = nsecs / NSEC_PER_SEC;
|
||||
uint32_t dwCarrySecs = nsecs / NSEC_PER_SEC;
|
||||
secs += dwCarrySecs;
|
||||
nsecs -= (dwCarrySecs * NSEC_PER_SEC);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* clock_initialize.c
|
||||
* sched/clock_initialize.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@ -38,8 +38,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
@ -71,9 +71,9 @@
|
||||
* Public Variables
|
||||
****************************************************************************/
|
||||
|
||||
volatile uint32 g_system_timer = 0;
|
||||
struct timespec g_basetime = {0,0};
|
||||
uint32 g_tickbias = 0;
|
||||
volatile uint32_t g_system_timer = 0;
|
||||
struct timespec g_basetime = {0,0};
|
||||
uint32_t g_tickbias = 0;
|
||||
|
||||
/**************************************************************************
|
||||
* Private Variables
|
||||
|
@ -41,7 +41,6 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/clock.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
@ -58,7 +57,7 @@
|
||||
********************************************************************************/
|
||||
|
||||
extern struct timespec g_basetime;
|
||||
extern uint32 g_tickbias;
|
||||
extern uint32_t g_tickbias;
|
||||
|
||||
/********************************************************************************
|
||||
* Public Function Prototypes
|
||||
|
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -38,7 +38,7 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <time.h>
|
||||
#include "clock_internal.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* clock_time2ticks.c
|
||||
* sched/clock_time2ticks.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -38,8 +38,10 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "clock_internal.h"
|
||||
|
||||
/********************************************************************************
|
||||
@ -87,7 +89,7 @@
|
||||
|
||||
int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks)
|
||||
{
|
||||
sint32 relusec;
|
||||
int32_t relusec;
|
||||
|
||||
/* Convert the relative time into microseconds.*/
|
||||
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <stdlib.h>
|
||||
#include "os_internal.h"
|
||||
|
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <debug.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include "irq_internal.h"
|
||||
|
||||
|
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include "irq_internal.h"
|
||||
|
@ -40,7 +40,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
@ -37,7 +37,7 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <debug.h>
|
||||
#include "os_internal.h"
|
||||
|
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
************************************************************/
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <mqueue.h>
|
||||
#include <sched.h>
|
||||
#include "os_internal.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* mq_descreate.c
|
||||
* sched/mq_descreate.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,6 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdarg.h> /* va_list */
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
@ -48,7 +50,6 @@
|
||||
#include "os_internal.h"
|
||||
#include "sig_internal.h"
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <queue.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include "mq_internal.h"
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_findnamed.c
|
||||
/************************************************************************
|
||||
* sched/mq_findnamed.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -31,41 +31,42 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <string.h>
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_findnamed
|
||||
*
|
||||
* Description:
|
||||
@ -79,7 +80,7 @@
|
||||
* A reference to the matching named message queue
|
||||
* structure (or NULL if none was found).
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
FAR msgq_t *mq_findnamed(const char *mq_name)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_getattr.c
|
||||
/************************************************************************
|
||||
* sched/mq_getattr.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -31,13 +31,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <stdarg.h> /* va_list */
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
@ -51,31 +52,31 @@
|
||||
#include "sig_internal.h"
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_getattr
|
||||
*
|
||||
* Description:
|
||||
@ -91,7 +92,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int mq_getattr(mqd_t mqdes, struct mq_attr *mq_stat)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_initialize.c
|
||||
/************************************************************************
|
||||
* sched/mq_initialize.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -31,24 +31,27 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdinit.h>
|
||||
#include <queue.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* This is a container for a list of message queue
|
||||
* descriptors.
|
||||
@ -60,9 +63,9 @@ struct mq_des_block_s
|
||||
struct mq_des mqdes[NUM_MSG_DESCRIPTORS];
|
||||
};
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* This is a list of all opened message queues */
|
||||
|
||||
@ -88,9 +91,9 @@ sq_queue_t g_msgfreeirq;
|
||||
|
||||
sq_queue_t g_desfree;
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/* g_msgalloc is a pointer to the start of the allocated
|
||||
* block of messages.
|
||||
@ -110,11 +113,11 @@ static mqmsg_t *g_msgfreeirqalloc;
|
||||
|
||||
static sq_queue_t g_desalloc;
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_msgblockalloc
|
||||
*
|
||||
* Description:
|
||||
@ -124,10 +127,10 @@ static sq_queue_t g_desalloc;
|
||||
*
|
||||
* Inputs:
|
||||
* queue
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs,
|
||||
ubyte alloc_type)
|
||||
static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16_t nmsgs,
|
||||
uint8_t alloc_type)
|
||||
{
|
||||
mqmsg_t *mqmsgblock;
|
||||
|
||||
@ -151,11 +154,11 @@ static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs,
|
||||
return mqmsgblock;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_initialize
|
||||
*
|
||||
* Description:
|
||||
@ -170,7 +173,7 @@ static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs,
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mq_initialize(void)
|
||||
{
|
||||
@ -203,7 +206,7 @@ void mq_initialize(void)
|
||||
mq_desblockalloc();
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_desblockalloc
|
||||
*
|
||||
* Description:
|
||||
@ -216,7 +219,7 @@ void mq_initialize(void)
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mq_desblockalloc(void)
|
||||
{
|
||||
|
@ -90,14 +90,14 @@ typedef enum mqalloc_e mqalloc_t;
|
||||
struct mqmsg
|
||||
{
|
||||
FAR struct mqmsg *next; /* Forward link to next message */
|
||||
ubyte type; /* (Used to manage allocations) */
|
||||
ubyte priority; /* priority of message */
|
||||
uint8_t type; /* (Used to manage allocations) */
|
||||
uint8_t priority; /* priority of message */
|
||||
#if MQ_MAX_BYTES < 256
|
||||
ubyte msglen; /* Message data length */
|
||||
uint8_t msglen; /* Message data length */
|
||||
#else
|
||||
uint16 msglen; /* Message data length */
|
||||
uint16_t msglen; /* Message data length */
|
||||
#endif
|
||||
ubyte mail[MQ_MAX_BYTES]; /* Message data */
|
||||
uint8_t mail[MQ_MAX_BYTES]; /* Message data */
|
||||
};
|
||||
typedef struct mqmsg mqmsg_t;
|
||||
|
||||
@ -109,12 +109,12 @@ struct msgq_s
|
||||
{
|
||||
FAR struct msgq_s *flink; /* Forward link to next message queue */
|
||||
sq_queue_t msglist; /* Prioritized message list */
|
||||
sint16 maxmsgs; /* Maximum number of messages in the queue */
|
||||
sint16 nmsgs; /* Number of message in the queue */
|
||||
sint16 nconnect; /* Number of connections to message queue */
|
||||
sint16 nwaitnotfull; /* Number tasks waiting for not full */
|
||||
sint16 nwaitnotempty; /* Number tasks waiting for not empty */
|
||||
ubyte maxmsgsize; /* Max size of message in message queue */
|
||||
int16_t maxmsgs; /* Maximum number of messages in the queue */
|
||||
int16_t nmsgs; /* Number of message in the queue */
|
||||
int16_t nconnect; /* Number of connections to message queue */
|
||||
int16_t nwaitnotfull; /* Number tasks waiting for not full */
|
||||
int16_t nwaitnotempty; /* Number tasks waiting for not empty */
|
||||
uint8_t maxmsgsize; /* Max size of message in message queue */
|
||||
boolean unlinked; /* TRUE if the msg queue has been unlinked */
|
||||
#ifndef CONFIG_DISABLE_SIGNALS
|
||||
FAR struct mq_des *ntmqdes; /* Notification: Owning mqdes (NULL if none) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/************************************************************
|
||||
* mq_msgfree.c
|
||||
/************************************************************************
|
||||
* sched/mq_msgfree.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,43 +31,44 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <queue.h>
|
||||
#include <nuttx/arch.h>
|
||||
#include "os_internal.h"
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_msgfree
|
||||
*
|
||||
* Description:
|
||||
@ -82,7 +83,7 @@
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mq_msgfree(FAR mqmsg_t *mqmsg)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_msgqfree.c
|
||||
/************************************************************************
|
||||
* sched/mq_msgqfree.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,42 +31,43 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <debug.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_msgqfree
|
||||
*
|
||||
* Description:
|
||||
@ -82,7 +83,7 @@
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void mq_msgqfree(FAR msgq_t *msgq)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* sched/mq_notify.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
@ -31,44 +31,45 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <signal.h>
|
||||
#include <mqueue.h>
|
||||
#include <sched.h>
|
||||
#include "os_internal.h"
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_notify
|
||||
*
|
||||
* Description:
|
||||
@ -110,7 +111,7 @@
|
||||
* message shall satisfy mq_receive()... The resulting behavior is as if
|
||||
* the message queue remains empty, and no notification shall be sent."
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int mq_notify(mqd_t mqdes, const struct sigevent *notification)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* mq_open.c
|
||||
* sched/mq_open.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,8 +37,10 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <stdarg.h> /* va_list */
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h>
|
||||
#include <mqueue.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
@ -173,10 +175,10 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
|
||||
sq_init(&msgq->msglist);
|
||||
if (attr)
|
||||
{
|
||||
msgq->maxmsgs = (sint16)attr->mq_maxmsg;
|
||||
msgq->maxmsgs = (int16_t)attr->mq_maxmsg;
|
||||
if (attr->mq_msgsize <= MQ_MAX_BYTES)
|
||||
{
|
||||
msgq->maxmsgsize = (sint16)attr->mq_msgsize;
|
||||
msgq->maxmsgsize = (int16_t)attr->mq_msgsize;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_setattr.c
|
||||
/************************************************************************
|
||||
* sched/mq_setattr.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,42 +31,43 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <fcntl.h> /* O_NONBLOCK */
|
||||
#include <mqueue.h>
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_setattr
|
||||
*
|
||||
* Description:
|
||||
@ -89,7 +90,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int mq_setattr(mqd_t mqdes, const struct mq_attr *mq_stat,
|
||||
struct mq_attr *oldstat)
|
||||
|
@ -208,7 +208,7 @@ FAR mqmsg_t *mq_msgalloc(void)
|
||||
else
|
||||
{
|
||||
sdbg("Out of messages\n");
|
||||
PANIC((uint32)OSERR_OUTOFMESSAGES);
|
||||
PANIC((uint32_t)OSERR_OUTOFMESSAGES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/mq_timedreceive.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,13 +37,17 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <mqueue.h>
|
||||
#include <wdog.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "clock_internal.h"
|
||||
#include "mq_internal.h"
|
||||
@ -86,7 +90,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void mq_rcvtimeout(int argc, uint32 pid)
|
||||
static void mq_rcvtimeout(int argc, uint32_t pid)
|
||||
{
|
||||
FAR _TCB *wtcb;
|
||||
irqstate_t saved_state;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/mq_timedsend.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -38,13 +38,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <mqueue.h>
|
||||
#include <wdog.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "clock_internal.h"
|
||||
#include "os_internal.h"
|
||||
#include "mq_internal.h"
|
||||
@ -87,7 +90,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void mq_sndtimeout(int argc, uint32 pid)
|
||||
static void mq_sndtimeout(int argc, uint32_t pid)
|
||||
{
|
||||
FAR _TCB *wtcb;
|
||||
irqstate_t saved_state;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* mq_unlink.c
|
||||
/************************************************************************
|
||||
* sched.mq_unlink.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,43 +31,44 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h> /* uint32, etc. */
|
||||
#include <mqueue.h>
|
||||
#include <sched.h>
|
||||
#include "os_internal.h"
|
||||
#include "mq_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: mq_unlink
|
||||
*
|
||||
* Description:
|
||||
@ -85,7 +86,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int mq_unlink(const char *mq_name)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/mq_waitirq.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
@ -40,6 +40,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
#include <queue.h>
|
||||
#include <sched.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrdestroy.c
|
||||
* sched/pthread_attrdestroy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrgetinheritsched.c
|
||||
* sched/pthread_attrgetinheritsched.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrgetschedparam.c
|
||||
* sched/pthread_attrgetschedparam.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <sched.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrinit.c
|
||||
* sched/pthread_attrinit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,11 +37,13 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrsetinheritsched.c
|
||||
* sched/pthread_attrsetinheritsched.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,11 +37,13 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -102,7 +104,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
|
||||
}
|
||||
else
|
||||
{
|
||||
attr->inheritsched = (ubyte)inheritsched;
|
||||
attr->inheritsched = (uint8_t)inheritsched;
|
||||
ret = OK;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrsetschedparam.c
|
||||
* sched/pthread_attrsetschedparam.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <sched.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrsetschedpolicy.c
|
||||
* sched/pthread_attrsetschedpolicy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <sched.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_attrsetstacksize.c
|
||||
* sched/pthread_attrsetstacksize.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,11 +37,13 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrierattrdestroy.c
|
||||
* sched/pthread_barrierattrdestroy.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrierattrgetpshared.c
|
||||
* sched/pthread_barrierattrgetpshared.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrierattrinit.c
|
||||
* sched/pthread_barrierattrinit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrierattrsetpshared.c
|
||||
* sched/pthread_barrierattrsetpshared.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barriedestroy.c
|
||||
* sched/pthread_barriedestroy.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrieinit.c
|
||||
* sched/pthread_barrieinit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_barrierwait.c
|
||||
* sched/pthread_barrierwait.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
********************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <sched.h>
|
||||
|
@ -37,9 +37,13 @@
|
||||
* Included Files
|
||||
**************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "pthread_internal.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_condattrdestroy.c
|
||||
* sched/pthread_condattrdestroy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condattrinit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <config/nuttx.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condbroadcast.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,11 +37,13 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_conddestroy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condinit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condsignal.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condtimedwait.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,8 +37,9 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
@ -89,7 +90,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void pthread_condtimedout(int argc, uint32 pid, uint32 signo)
|
||||
static void pthread_condtimedout(int argc, uint32_t pid, uint32_t signo)
|
||||
{
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
union sigval value;
|
||||
@ -233,7 +234,7 @@ int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
|
||||
/* Start the watchdog */
|
||||
|
||||
wd_start(wdog, ticks, (wdentry_t)pthread_condtimedout,
|
||||
2, (uint32)mypid, (uint32)SIGCONDTIMEDOUT);
|
||||
2, (uint32_t)mypid, (uint32_t)SIGCONDTIMEDOUT);
|
||||
|
||||
/* Take the condition semaphore. Do not restore interrupts
|
||||
* until we return from the wait. This is necessary to
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_condwait.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,12 +37,14 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* pthread_exit.c
|
||||
/************************************************************************
|
||||
* sched/pthread_exit.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,13 +31,14 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
@ -47,31 +48,31 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: pthread_exit
|
||||
*
|
||||
* Description:
|
||||
@ -85,7 +86,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void pthread_exit(FAR void *exit_value)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* pthread_getspecific.c
|
||||
/************************************************************************
|
||||
* sched/pthread_getspecific.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,46 +31,46 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: pthread_getspecific
|
||||
*
|
||||
* Description:
|
||||
@ -101,7 +101,7 @@
|
||||
* may be called from a thread-specific data destructor
|
||||
* function.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
FAR void *pthread_getspecific(pthread_key_t key)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_initialize.c
|
||||
* sched/pthread_initialize.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,9 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <semaphore.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -71,7 +74,7 @@ sem_t g_join_semaphore;
|
||||
* allocated.
|
||||
*/
|
||||
|
||||
ubyte g_pthread_num_keys;
|
||||
uint8_t g_pthread_num_keys;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_internal.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -41,6 +41,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
@ -64,7 +65,7 @@
|
||||
struct join_s
|
||||
{
|
||||
FAR struct join_s *next; /* Implements link list */
|
||||
ubyte crefs; /* Reference count */
|
||||
uint8_t crefs; /* Reference count */
|
||||
boolean started; /* TRUE: pthread started. */
|
||||
boolean detached; /* TRUE: pthread_detached'ed */
|
||||
boolean terminated; /* TRUE: detach'ed+exit'ed */
|
||||
@ -97,7 +98,7 @@ extern sem_t g_join_semaphore;
|
||||
* allocated.
|
||||
*/
|
||||
|
||||
extern ubyte g_pthread_num_keys;
|
||||
extern uint8_t g_pthread_num_keys;
|
||||
|
||||
/* Default pthread attributes */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_keycreate.c
|
||||
* sched/pthread_keycreate.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -39,10 +39,10 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* pthread_keydelete.c
|
||||
/************************************************************************
|
||||
* sched/pthread_keydelete.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,45 +31,45 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: pthread_key_delete
|
||||
*
|
||||
* Description:
|
||||
@ -87,7 +87,7 @@
|
||||
*
|
||||
* POSIX Compatibility:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int pthread_key_delete(pthread_key_t key)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* pthread_kill.c
|
||||
/************************************************************************
|
||||
* sched/pthread_kill.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,23 +31,25 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: pthread_kill
|
||||
*
|
||||
* Description:
|
||||
@ -75,7 +77,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int pthread_kill(pthread_t thread, int signo)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_mutexattrdestroy.c
|
||||
* sched/pthread_mutexattrdestroy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_mutexattrgetpshared.c
|
||||
* sched/pthread_mutexattrgetpshared.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_mutexattrinit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_mutexattrsetpshared.c
|
||||
* sched/pthread_mutexattrsetpshared.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_mutexdestroy.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <sched.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_mutexinit.c
|
||||
* sched/pthread_mutexinit.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,13 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -87,9 +90,9 @@ int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr
|
||||
{
|
||||
int pshared = 0;
|
||||
#ifdef CONFIG_MUTEX_TYPES
|
||||
ubyte type = PTHREAD_MUTEX_DEFAULT;
|
||||
uint8_t type = PTHREAD_MUTEX_DEFAULT;
|
||||
#endif
|
||||
int ret = OK;
|
||||
int ret = OK;
|
||||
int status;
|
||||
|
||||
sdbg("mutex=0x%p attr=0x%p\n", mutex, attr);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_mutexlock.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,12 +37,14 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_mutextrylock.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,7 +37,8 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/pthread_mutexunlock.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,12 +37,14 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "pthread_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
* pthread_once.c
|
||||
* sched/pthread_once.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -38,7 +38,7 @@
|
||||
********************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* pthread_setspecific.c
|
||||
* sched/pthread_setspecific.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* pthread_sigmask.c
|
||||
/************************************************************************
|
||||
* sched/pthread_sigmask.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,43 +31,44 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: pthread_sigmask
|
||||
*
|
||||
* Description:
|
||||
@ -93,7 +94,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_addblocked.c
|
||||
/************************************************************************
|
||||
* sched/sched_addblocked.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,42 +31,44 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_addblocked
|
||||
*
|
||||
* Description:
|
||||
@ -84,7 +86,7 @@
|
||||
* - The caller has established a critical section before
|
||||
* calling this function.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void sched_addblocked(FAR _TCB *btcb, tstate_t task_state)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_addprioritized.c
|
||||
/************************************************************************
|
||||
* sched/sched_addprioritized.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,42 +31,45 @@
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: sched_addprioritized
|
||||
*
|
||||
* Description:
|
||||
@ -89,13 +92,13 @@
|
||||
* the head of the task list is changed.
|
||||
* - The caller must set the task_state field of the TCB to
|
||||
* match the state associated with the list.
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
boolean sched_addprioritized(FAR _TCB *tcb, DSEG dq_queue_t *list)
|
||||
{
|
||||
FAR _TCB *next;
|
||||
FAR _TCB *prev;
|
||||
ubyte sched_priority = tcb->sched_priority;
|
||||
uint8_t sched_priority = tcb->sched_priority;
|
||||
boolean ret = FALSE;
|
||||
|
||||
/* Lets do a sanity check before we get started. */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/sched_addreadytorun.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,9 +37,11 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -38,7 +38,6 @@
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_getprioritymax.c
|
||||
/************************************************************************
|
||||
* sched/sched_getprioritymax.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,46 +31,47 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: ched_get_priority_max
|
||||
*
|
||||
* Description:
|
||||
@ -86,7 +87,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int sched_get_priority_max(int policy)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_getprioritymin.c
|
||||
/************************************************************************
|
||||
* sched/sched_getprioritymin.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,46 +31,47 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_get_priority_min
|
||||
*
|
||||
* Description:
|
||||
@ -86,7 +87,7 @@
|
||||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int sched_get_priority_min(int policy)
|
||||
{
|
||||
|
@ -38,9 +38,10 @@
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include "os_internal.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_lockcount.c
|
||||
/************************************************************************
|
||||
* sched/sched_lockcount.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -31,45 +31,47 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functionss
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_lockcount
|
||||
*
|
||||
* Description:
|
||||
@ -84,10 +86,10 @@
|
||||
* Return Value:
|
||||
* lockcount
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
sint32 sched_lockcount(void)
|
||||
int32_t sched_lockcount(void)
|
||||
{
|
||||
_TCB *rtcb = (_TCB*)g_readytorun.head;
|
||||
return (sint32)rtcb->lockcount;
|
||||
return (int32_t)rtcb->lockcount;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_mergepending.c
|
||||
/************************************************************************
|
||||
* sched/sched_mergepending.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,42 +31,44 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: sched_mergepending
|
||||
*
|
||||
* Description:
|
||||
@ -86,7 +88,7 @@
|
||||
* - The caller handles the condition that occurs if the
|
||||
* the head of the sched_mergTSTATE_TASK_PENDINGs is changed.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
boolean sched_mergepending(void)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_processtimer.c
|
||||
/************************************************************************
|
||||
* sched/sched_processtimer.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,19 +31,18 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Compilation Switches
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#if CONFIG_RR_INTERVAL > 0
|
||||
# include <sched.h>
|
||||
@ -54,25 +53,25 @@
|
||||
#include "wd_internal.h"
|
||||
#include "clock_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
static void sched_process_timeslice(void)
|
||||
{
|
||||
@ -136,19 +135,19 @@ static void sched_process_timeslice(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* System Timer Hooks
|
||||
*
|
||||
* These are standard interfaces that are exported by the OS
|
||||
* for use by the architecture specific logic
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_process_timer
|
||||
*
|
||||
* Description:
|
||||
@ -164,7 +163,7 @@ static void sched_process_timeslice(void)
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void sched_process_timer(void)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_releasetcb.c
|
||||
/************************************************************************
|
||||
* sched/sched_releasetcb.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,33 +31,33 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
* Compilation Switches
|
||||
************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "timer_internal.h"
|
||||
#include "env_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_releasepid
|
||||
*
|
||||
* Description: When a task is destroyed, this function must
|
||||
* be called to make its process ID available for re-use.
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
static void sched_releasepid(pid_t pid)
|
||||
{
|
||||
@ -72,11 +72,11 @@ static void sched_releasepid(pid_t pid)
|
||||
g_pidhash[hash_ndx].pid = INVALID_PROCESS_ID;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Function: sched_releasetcb
|
||||
*
|
||||
* Description:
|
||||
@ -91,7 +91,7 @@ static void sched_releasepid(pid_t pid)
|
||||
* Assumptions:
|
||||
* Interrupts are disabled.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
int sched_releasetcb(FAR _TCB *tcb)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/************************************************************
|
||||
* sched_removeblocked.c
|
||||
/************************************************************************
|
||||
* sched/sched_removeblocked.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -14,7 +14,7 @@
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@ -31,46 +31,48 @@
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Compilation Switches
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Private Function Prototypes
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/************************************************************************
|
||||
* Name: sched_removeblocked
|
||||
*
|
||||
* Description:
|
||||
@ -88,7 +90,7 @@
|
||||
* - The caller has established a critical section before
|
||||
* calling this function.
|
||||
*
|
||||
************************************************************/
|
||||
************************************************************************/
|
||||
|
||||
void sched_removeblocked(FAR _TCB *btcb)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* shced/sched_removereadytorun.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,9 +37,11 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <queue.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -38,7 +38,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
|
||||
@ -115,7 +115,7 @@ int sched_reprioritize(FAR _TCB *tcb, int sched_priority)
|
||||
* to once it posts the semaphore.
|
||||
*/
|
||||
|
||||
tcb->base_priority = (ubyte)sched_priority;
|
||||
tcb->base_priority = (uint8_t)sched_priority;
|
||||
|
||||
/* Discard any pending reprioritizations as well */
|
||||
|
||||
|
@ -38,10 +38,11 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
@ -140,7 +141,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
{
|
||||
/* A context switch will occur. */
|
||||
|
||||
up_reprioritize_rtr(tcb, (ubyte)sched_priority);
|
||||
up_reprioritize_rtr(tcb, (uint8_t)sched_priority);
|
||||
}
|
||||
|
||||
/* Otherwise, we can just change priority since it has no effect */
|
||||
@ -149,7 +150,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
{
|
||||
/* Change the task priority */
|
||||
|
||||
tcb->sched_priority = (ubyte)sched_priority;
|
||||
tcb->sched_priority = (uint8_t)sched_priority;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -167,7 +168,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
{
|
||||
/* A context switch will occur. */
|
||||
|
||||
up_reprioritize_rtr(tcb, (ubyte)sched_priority);
|
||||
up_reprioritize_rtr(tcb, (uint8_t)sched_priority);
|
||||
}
|
||||
|
||||
/* Otherwise, we can just change priority and re-schedule (since it
|
||||
@ -182,7 +183,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
|
||||
/* Change the task priority */
|
||||
|
||||
tcb->sched_priority = (ubyte)sched_priority;
|
||||
tcb->sched_priority = (uint8_t)sched_priority;
|
||||
|
||||
/* Put it back into the ready-to-run task list */
|
||||
|
||||
@ -205,7 +206,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
|
||||
/* Change the task priority */
|
||||
|
||||
tcb->sched_priority = (ubyte)sched_priority;
|
||||
tcb->sched_priority = (uint8_t)sched_priority;
|
||||
|
||||
/* Put it back into the prioritized list at the correct
|
||||
* position
|
||||
@ -220,7 +221,7 @@ int sched_setpriority(FAR _TCB *tcb, int sched_priority)
|
||||
{
|
||||
/* Just change the task's priority */
|
||||
|
||||
tcb->sched_priority = (ubyte)sched_priority;
|
||||
tcb->sched_priority = (uint8_t)sched_priority;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/sched_setupidlefiles.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -39,7 +39,6 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -38,8 +38,9 @@
|
||||
************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/************************************************************************
|
||||
|
@ -37,8 +37,10 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <sched.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -38,8 +38,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* sched/sem_close.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -37,10 +37,12 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <semaphore.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include "os_internal.h"
|
||||
#include "sem_internal.h"
|
||||
|
||||
|
@ -37,8 +37,10 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <semaphore.h>
|
||||
|
||||
#include "sem_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user