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

View File

@@ -37,7 +37,6 @@
* Included Files
************************************************************/
#include <sys/types.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>

View File

@@ -38,7 +38,7 @@
********************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <time.h>
#include <errno.h>
#include <debug.h>

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>
*
* 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);

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>
*
* 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);
}

View File

@@ -37,7 +37,7 @@
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <nuttx/config.h>
#include <sys/time.h>
#include <errno.h>

View File

@@ -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

View File

@@ -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

View File

@@ -37,7 +37,8 @@
* Included Files
************************************************************/
#include <sys/types.h>
#include <nuttx/config.h>
#include <time.h>
#include <errno.h>
#include <debug.h>

View File

@@ -38,7 +38,7 @@
********************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <time.h>
#include "clock_internal.h"

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>
*
* 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.*/

View File

@@ -41,6 +41,7 @@
#ifndef CONFIG_DISABLE_ENVIRON
#include <sys/types.h>
#include <sched.h>
#include <string.h>
#include <errno.h>

View File

@@ -41,6 +41,7 @@
#ifndef CONFIG_DISABLE_ENVIRON
#include <sys/types.h>
#include <sched.h>
#include <stdlib.h>
#include "os_internal.h"

View File

@@ -37,7 +37,8 @@
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <nuttx/config.h>
#include <stdlib.h>
#include <unistd.h>
#include <debug.h>

View File

@@ -37,7 +37,7 @@
* Included Files
****************************************************************************/
#include <sys/types.h>
#include <nuttx/config.h>
#include <nuttx/irq.h>
#include "irq_internal.h"

View File

@@ -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>

View File

@@ -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"

View File

@@ -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>

View File

@@ -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"

View File

@@ -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"

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>
*
* 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"

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>
*
* 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)
{

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>
*
* 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)
{

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>
*
* 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)
{

View File

@@ -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) */

View File

@@ -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)
{

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>
*
* 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)
{

View File

@@ -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)
{

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>
*
* 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
{

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>
*
* 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)

View File

@@ -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);
}
}
}

View File

@@ -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;

View File

@@ -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;

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>
*
* 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)
{

View File

@@ -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>

View File

@@ -40,6 +40,8 @@
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <queue.h>
#include <sched.h>
#include <nuttx/kmalloc.h>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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"
/****************************************************************************

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>
*
* 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;
}

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>
*
* 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>

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>
*
* 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>

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>
*
* 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"
/****************************************************************************

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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>
*
* 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>

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