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:
patacongo
2009-12-14 18:39:29 +00:00
parent 92b110e0e2
commit 12ae4d2bd7
152 changed files with 1328 additions and 1151 deletions
-1
View File
@@ -37,7 +37,6 @@
* Included Files * Included Files
************************************************************/ ************************************************************/
#include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <unistd.h> #include <unistd.h>
+1 -1
View File
@@ -38,7 +38,7 @@
********************************************************************************/ ********************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+31 -28
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,62 +31,65 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <stdint.h>
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include "clock_internal.h" #include "clock_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Function Prototypes * Private Function Prototypes
************************************************************/ ************************************************************************/
/********************************************************** /**********************************************************************
* Public Constant Data * Public Constant Data
**********************************************************/ **********************************************************************/
/************************************************************ /************************************************************************
* Public Variables * Public Variables
************************************************************/ ************************************************************************/
/********************************************************** /**********************************************************************
* Private Variables * Private Variables
**********************************************************/ **********************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: clock_getres * Function: clock_getres
* *
* Description: * Description:
* Clock Functions based on POSIX APIs * Clock Functions based on POSIX APIs
* *
************************************************************/ ************************************************************************/
int clock_getres(clockid_t clock_id, struct timespec *res) int clock_getres(clockid_t clock_id, struct timespec *res)
{ {
uint32 time_res; uint32_t time_res;
int ret = OK; int ret = OK;
sdbg("clock_id=%d\n", clock_id); sdbg("clock_id=%d\n", clock_id);
+35 -32
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,63 +31,66 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <stdint.h>
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include "clock_internal.h" #include "clock_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Function Prototypes * Private Function Prototypes
************************************************************/ ************************************************************************/
/********************************************************** /**********************************************************************
* Public Constant Data * Public Constant Data
**********************************************************/ **********************************************************************/
/************************************************************ /************************************************************************
* Public Variables * Public Variables
************************************************************/ ************************************************************************/
/********************************************************** /**********************************************************************
* Private Variables * Private Variables
**********************************************************/ **********************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: clock_gettime * Function: clock_gettime
* *
* Description: * Description:
* Clock Functions based on POSIX APIs * Clock Functions based on POSIX APIs
* *
************************************************************/ ************************************************************************/
int clock_gettime(clockid_t clock_id, struct timespec *tp) int clock_gettime(clockid_t clock_id, struct timespec *tp)
{ {
uint32 msecs; uint32_t msecs;
uint32 secs; uint32_t secs;
uint32 nsecs; uint32_t nsecs;
int ret = OK; int ret = OK;
sdbg("clock_id=%d\n", clock_id); 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. */ /* Add the base time to this. */
secs += (uint32)g_basetime.tv_sec; secs += (uint32_t)g_basetime.tv_sec;
nsecs += (uint32)g_basetime.tv_nsec; nsecs += (uint32_t)g_basetime.tv_nsec;
/* Handle carry to seconds. */ /* Handle carry to seconds. */
if (nsecs > NSEC_PER_SEC) if (nsecs > NSEC_PER_SEC)
{ {
uint32 dwCarrySecs = nsecs / NSEC_PER_SEC; uint32_t dwCarrySecs = nsecs / NSEC_PER_SEC;
secs += dwCarrySecs; secs += dwCarrySecs;
nsecs -= (dwCarrySecs * NSEC_PER_SEC); nsecs -= (dwCarrySecs * NSEC_PER_SEC);
} }
+1 -1
View File
@@ -37,7 +37,7 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <sys/time.h> #include <sys/time.h>
#include <errno.h> #include <errno.h>
+5 -5
View File
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* clock_initialize.c * sched/clock_initialize.c
* *
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -38,8 +38,8 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
@@ -71,9 +71,9 @@
* Public Variables * Public Variables
****************************************************************************/ ****************************************************************************/
volatile uint32 g_system_timer = 0; volatile uint32_t g_system_timer = 0;
struct timespec g_basetime = {0,0}; struct timespec g_basetime = {0,0};
uint32 g_tickbias = 0; uint32_t g_tickbias = 0;
/************************************************************************** /**************************************************************************
* Private Variables * Private Variables
+1 -2
View File
@@ -41,7 +41,6 @@
********************************************************************************/ ********************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/clock.h> #include <nuttx/clock.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
@@ -58,7 +57,7 @@
********************************************************************************/ ********************************************************************************/
extern struct timespec g_basetime; extern struct timespec g_basetime;
extern uint32 g_tickbias; extern uint32_t g_tickbias;
/******************************************************************************** /********************************************************************************
* Public Function Prototypes * Public Function Prototypes
+2 -1
View File
@@ -37,7 +37,8 @@
* Included Files * Included Files
************************************************************/ ************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <time.h> #include <time.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+1 -1
View File
@@ -38,7 +38,7 @@
********************************************************************************/ ********************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "clock_internal.h" #include "clock_internal.h"
+7 -5
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -38,8 +38,10 @@
********************************************************************************/ ********************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h>
#include <stdint.h>
#include <time.h> #include <time.h>
#include "clock_internal.h" #include "clock_internal.h"
/******************************************************************************** /********************************************************************************
@@ -87,7 +89,7 @@
int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks) int clock_time2ticks(FAR const struct timespec *reltime, FAR int *ticks)
{ {
sint32 relusec; int32_t relusec;
/* Convert the relative time into microseconds.*/ /* Convert the relative time into microseconds.*/
+1
View File
@@ -41,6 +41,7 @@
#ifndef CONFIG_DISABLE_ENVIRON #ifndef CONFIG_DISABLE_ENVIRON
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
+1
View File
@@ -41,6 +41,7 @@
#ifndef CONFIG_DISABLE_ENVIRON #ifndef CONFIG_DISABLE_ENVIRON
#include <sys/types.h>
#include <sched.h> #include <sched.h>
#include <stdlib.h> #include <stdlib.h>
#include "os_internal.h" #include "os_internal.h"
+2 -1
View File
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <debug.h> #include <debug.h>
+1 -1
View File
@@ -37,7 +37,7 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "irq_internal.h" #include "irq_internal.h"
+2 -1
View File
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
+1 -1
View File
@@ -37,7 +37,7 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include "irq_internal.h" #include "irq_internal.h"
+2 -1
View File
@@ -40,7 +40,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
+1 -1
View File
@@ -37,7 +37,7 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <nuttx/irq.h> #include <nuttx/irq.h>
#include <debug.h> #include <debug.h>
#include "os_internal.h" #include "os_internal.h"
+2 -1
View File
@@ -37,7 +37,8 @@
* Included Files * Included Files
************************************************************/ ************************************************************/
#include <sys/types.h> /* uint32, etc. */ #include <nuttx/config.h>
#include <mqueue.h> #include <mqueue.h>
#include <sched.h> #include <sched.h>
#include "os_internal.h" #include "os_internal.h"
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h>
#include <stdarg.h> /* va_list */ #include <stdarg.h> /* va_list */
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
@@ -48,7 +50,6 @@
#include "os_internal.h" #include "os_internal.h"
#include "sig_internal.h" #include "sig_internal.h"
#include <sys/types.h> /* uint32, etc. */
#include <queue.h> #include <queue.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include "mq_internal.h" #include "mq_internal.h"
+22 -21
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <string.h> #include <string.h>
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_findnamed * Function: mq_findnamed
* *
* Description: * Description:
@@ -79,7 +80,7 @@
* A reference to the matching named message queue * A reference to the matching named message queue
* structure (or NULL if none was found). * structure (or NULL if none was found).
* *
************************************************************/ ************************************************************************/
FAR msgq_t *mq_findnamed(const char *mq_name) FAR msgq_t *mq_findnamed(const char *mq_name)
{ {
+22 -21
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <stdarg.h> /* va_list */ #include <stdarg.h> /* va_list */
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
@@ -51,31 +52,31 @@
#include "sig_internal.h" #include "sig_internal.h"
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_getattr * Function: mq_getattr
* *
* Description: * Description:
@@ -91,7 +92,7 @@
* *
* Assumptions: * Assumptions:
* *
************************************************************/ ************************************************************************/
int mq_getattr(mqd_t mqdes, struct mq_attr *mq_stat) int mq_getattr(mqd_t mqdes, struct mq_attr *mq_stat)
{ {
+30 -27
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <sys/types.h> /* uint32, etc. */ #include <nuttx/config.h>
#include <stdinit.h>
#include <queue.h> #include <queue.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/* This is a container for a list of message queue /* This is a container for a list of message queue
* descriptors. * descriptors.
@@ -60,9 +63,9 @@ struct mq_des_block_s
struct mq_des mqdes[NUM_MSG_DESCRIPTORS]; struct mq_des mqdes[NUM_MSG_DESCRIPTORS];
}; };
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/* This is a list of all opened message queues */ /* This is a list of all opened message queues */
@@ -88,9 +91,9 @@ sq_queue_t g_msgfreeirq;
sq_queue_t g_desfree; sq_queue_t g_desfree;
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/* g_msgalloc is a pointer to the start of the allocated /* g_msgalloc is a pointer to the start of the allocated
* block of messages. * block of messages.
@@ -110,11 +113,11 @@ static mqmsg_t *g_msgfreeirqalloc;
static sq_queue_t g_desalloc; static sq_queue_t g_desalloc;
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_msgblockalloc * Function: mq_msgblockalloc
* *
* Description: * Description:
@@ -124,10 +127,10 @@ static sq_queue_t g_desalloc;
* *
* Inputs: * Inputs:
* queue * queue
************************************************************/ ************************************************************************/
static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs, static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16_t nmsgs,
ubyte alloc_type) uint8_t alloc_type)
{ {
mqmsg_t *mqmsgblock; mqmsg_t *mqmsgblock;
@@ -151,11 +154,11 @@ static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs,
return mqmsgblock; return mqmsgblock;
} }
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_initialize * Function: mq_initialize
* *
* Description: * Description:
@@ -170,7 +173,7 @@ static mqmsg_t *mq_msgblockalloc(sq_queue_t *queue, uint16 nmsgs,
* Return Value: * Return Value:
* None * None
* *
************************************************************/ ************************************************************************/
void mq_initialize(void) void mq_initialize(void)
{ {
@@ -203,7 +206,7 @@ void mq_initialize(void)
mq_desblockalloc(); mq_desblockalloc();
} }
/************************************************************ /************************************************************************
* Function: mq_desblockalloc * Function: mq_desblockalloc
* *
* Description: * Description:
@@ -216,7 +219,7 @@ void mq_initialize(void)
* Return Value: * Return Value:
* None * None
* *
************************************************************/ ************************************************************************/
void mq_desblockalloc(void) void mq_desblockalloc(void)
{ {
+11 -11
View File
@@ -90,14 +90,14 @@ typedef enum mqalloc_e mqalloc_t;
struct mqmsg struct mqmsg
{ {
FAR struct mqmsg *next; /* Forward link to next message */ FAR struct mqmsg *next; /* Forward link to next message */
ubyte type; /* (Used to manage allocations) */ uint8_t type; /* (Used to manage allocations) */
ubyte priority; /* priority of message */ uint8_t priority; /* priority of message */
#if MQ_MAX_BYTES < 256 #if MQ_MAX_BYTES < 256
ubyte msglen; /* Message data length */ uint8_t msglen; /* Message data length */
#else #else
uint16 msglen; /* Message data length */ uint16_t msglen; /* Message data length */
#endif #endif
ubyte mail[MQ_MAX_BYTES]; /* Message data */ uint8_t mail[MQ_MAX_BYTES]; /* Message data */
}; };
typedef struct mqmsg mqmsg_t; typedef struct mqmsg mqmsg_t;
@@ -109,12 +109,12 @@ struct msgq_s
{ {
FAR struct msgq_s *flink; /* Forward link to next message queue */ FAR struct msgq_s *flink; /* Forward link to next message queue */
sq_queue_t msglist; /* Prioritized message list */ sq_queue_t msglist; /* Prioritized message list */
sint16 maxmsgs; /* Maximum number of messages in the queue */ int16_t maxmsgs; /* Maximum number of messages in the queue */
sint16 nmsgs; /* Number of message in the queue */ int16_t nmsgs; /* Number of message in the queue */
sint16 nconnect; /* Number of connections to message queue */ int16_t nconnect; /* Number of connections to message queue */
sint16 nwaitnotfull; /* Number tasks waiting for not full */ int16_t nwaitnotfull; /* Number tasks waiting for not full */
sint16 nwaitnotempty; /* Number tasks waiting for not empty */ int16_t nwaitnotempty; /* Number tasks waiting for not empty */
ubyte maxmsgsize; /* Max size of message in message queue */ uint8_t maxmsgsize; /* Max size of message in message queue */
boolean unlinked; /* TRUE if the msg queue has been unlinked */ boolean unlinked; /* TRUE if the msg queue has been unlinked */
#ifndef CONFIG_DISABLE_SIGNALS #ifndef CONFIG_DISABLE_SIGNALS
FAR struct mq_des *ntmqdes; /* Notification: Owning mqdes (NULL if none) */ FAR struct mq_des *ntmqdes; /* Notification: Owning mqdes (NULL if none) */
+22 -21
View File
@@ -1,5 +1,5 @@
/************************************************************ /************************************************************************
* mq_msgfree.c * sched/mq_msgfree.c
* *
* Copyright (C) 2007 Gregory Nutt. All rights reserved. * Copyright (C) 2007 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,43 +31,44 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <queue.h> #include <queue.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_msgfree * Function: mq_msgfree
* *
* Description: * Description:
@@ -82,7 +83,7 @@
* Return Value: * Return Value:
* None * None
* *
************************************************************/ ************************************************************************/
void mq_msgfree(FAR mqmsg_t *mqmsg) void mq_msgfree(FAR mqmsg_t *mqmsg)
{ {
+23 -22
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,42 +31,43 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <debug.h> #include <debug.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_msgqfree * Function: mq_msgqfree
* *
* Description: * Description:
@@ -82,7 +83,7 @@
* Return Value: * Return Value:
* None * None
* *
************************************************************/ ************************************************************************/
void mq_msgqfree(FAR msgq_t *msgq) void mq_msgqfree(FAR msgq_t *msgq)
{ {
+20 -19
View File
@@ -1,4 +1,4 @@
/************************************************************ /************************************************************************
* sched/mq_notify.c * sched/mq_notify.c
* *
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. * 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 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <signal.h> #include <signal.h>
#include <mqueue.h> #include <mqueue.h>
#include <sched.h> #include <sched.h>
#include "os_internal.h" #include "os_internal.h"
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_notify * Function: mq_notify
* *
* Description: * Description:
@@ -110,7 +111,7 @@
* message shall satisfy mq_receive()... The resulting behavior is as if * message shall satisfy mq_receive()... The resulting behavior is as if
* the message queue remains empty, and no notification shall be sent." * the message queue remains empty, and no notification shall be sent."
* *
************************************************************/ ************************************************************************/
int mq_notify(mqd_t mqdes, const struct sigevent *notification) int mq_notify(mqd_t mqdes, const struct sigevent *notification)
{ {
+8 -6
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,8 +37,10 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> /* uint32, etc. */ #include <nuttx/config.h>
#include <stdarg.h> /* va_list */
#include <sys/types.h>
#include <stdarg.h>
#include <mqueue.h> #include <mqueue.h>
#include <fcntl.h> #include <fcntl.h>
#include <string.h> #include <string.h>
@@ -173,10 +175,10 @@ mqd_t mq_open(const char *mq_name, int oflags, ...)
sq_init(&msgq->msglist); sq_init(&msgq->msglist);
if (attr) if (attr)
{ {
msgq->maxmsgs = (sint16)attr->mq_maxmsg; msgq->maxmsgs = (int16_t)attr->mq_maxmsg;
if (attr->mq_msgsize <= MQ_MAX_BYTES) if (attr->mq_msgsize <= MQ_MAX_BYTES)
{ {
msgq->maxmsgsize = (sint16)attr->mq_msgsize; msgq->maxmsgsize = (int16_t)attr->mq_msgsize;
} }
else else
{ {
+23 -22
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,42 +31,43 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <fcntl.h> /* O_NONBLOCK */ #include <fcntl.h> /* O_NONBLOCK */
#include <mqueue.h> #include <mqueue.h>
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_setattr * Function: mq_setattr
* *
* Description: * Description:
@@ -89,7 +90,7 @@
* *
* Assumptions: * Assumptions:
* *
************************************************************/ ************************************************************************/
int mq_setattr(mqd_t mqdes, const struct mq_attr *mq_stat, int mq_setattr(mqd_t mqdes, const struct mq_attr *mq_stat,
struct mq_attr *oldstat) struct mq_attr *oldstat)
+1 -1
View File
@@ -208,7 +208,7 @@ FAR mqmsg_t *mq_msgalloc(void)
else else
{ {
sdbg("Out of messages\n"); sdbg("Out of messages\n");
PANIC((uint32)OSERR_OUTOFMESSAGES); PANIC((uint32_t)OSERR_OUTOFMESSAGES);
} }
} }
} }
+6 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* sched/mq_timedreceive.c * 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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,13 +37,17 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <wdog.h> #include <wdog.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "os_internal.h" #include "os_internal.h"
#include "clock_internal.h" #include "clock_internal.h"
#include "mq_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; FAR _TCB *wtcb;
irqstate_t saved_state; irqstate_t saved_state;
+5 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* sched/mq_timedsend.c * 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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -38,13 +38,16 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <unistd.h> #include <unistd.h>
#include <mqueue.h> #include <mqueue.h>
#include <wdog.h> #include <wdog.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include "clock_internal.h" #include "clock_internal.h"
#include "os_internal.h" #include "os_internal.h"
#include "mq_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; FAR _TCB *wtcb;
irqstate_t saved_state; irqstate_t saved_state;
+23 -22
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -31,43 +31,44 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Included Files * Included Files
************************************************************/ ************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h> /* uint32, etc. */
#include <mqueue.h> #include <mqueue.h>
#include <sched.h> #include <sched.h>
#include "os_internal.h" #include "os_internal.h"
#include "mq_internal.h" #include "mq_internal.h"
/************************************************************ /************************************************************************
* Definitions * Definitions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Type Declarations * Private Type Declarations
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Global Variables * Global Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Variables * Private Variables
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Private Functions * Private Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Public Functions * Public Functions
************************************************************/ ************************************************************************/
/************************************************************ /************************************************************************
* Function: mq_unlink * Function: mq_unlink
* *
* Description: * Description:
@@ -85,7 +86,7 @@
* *
* Assumptions: * Assumptions:
* *
************************************************************/ ************************************************************************/
int mq_unlink(const char *mq_name) int mq_unlink(const char *mq_name)
{ {
+3 -2
View File
@@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* sched/mq_waitirq.c * 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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <sched.h> #include <sched.h>
#include <errno.h> #include <errno.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
+2
View File
@@ -40,6 +40,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <queue.h> #include <queue.h>
#include <sched.h> #include <sched.h>
#include <nuttx/kmalloc.h> #include <nuttx/kmalloc.h>
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <sched.h> #include <sched.h>
+5 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,11 +37,13 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include "pthread_internal.h" #include "pthread_internal.h"
/**************************************************************************** /****************************************************************************
+7 -5
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,11 +37,13 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include "pthread_internal.h" #include "pthread_internal.h"
/**************************************************************************** /****************************************************************************
@@ -102,7 +104,7 @@ int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
} }
else else
{ {
attr->inheritsched = (ubyte)inheritsched; attr->inheritsched = (uint8_t)inheritsched;
ret = OK; ret = OK;
} }
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <sched.h> #include <sched.h>
+4 -3
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <sched.h> #include <sched.h>
+6 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,11 +37,13 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include "pthread_internal.h" #include "pthread_internal.h"
/**************************************************************************** /****************************************************************************
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <errno.h> #include <errno.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <errno.h> #include <errno.h>
+5 -4
View File
@@ -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> * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* *
* Redistribution and use in source and binary forms, with or without * 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 * notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the * the documentation and/or other materials provided with the
* distribution. * 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 * used to endorse or promote products derived from this software
* without specific prior written permission. * without specific prior written permission.
* *
@@ -37,7 +37,8 @@
* Included Files * Included Files
********************************************************************************/ ********************************************************************************/
#include <sys/types.h> #include <nuttx/config.h>
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <sched.h> #include <sched.h>

Some files were not shown because too many files have changed in this diff Show More