diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 14:01:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-30 14:01:22 +0000 |
commit | e674da72e287079bed6af67b3ab1c47896e4c5e0 (patch) | |
tree | f996771a3003d34ba59916139fd0192e0af7fc67 | |
parent | dc8be32e82d78481cd269b4e60d025e2e2357db7 (diff) | |
download | nuttx-e674da72e287079bed6af67b3ab1c47896e4c5e0.tar.gz nuttx-e674da72e287079bed6af67b3ab1c47896e4c5e0.tar.bz2 nuttx-e674da72e287079bed6af67b3ab1c47896e4c5e0.zip |
Cosmetic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@589 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/sched/mq_descreate.c | 44 | ||||
-rw-r--r-- | nuttx/sched/mq_open.c | 46 | ||||
-rw-r--r-- | nuttx/sched/mq_rcvinternal.c | 58 |
3 files changed, 74 insertions, 74 deletions
diff --git a/nuttx/sched/mq_descreate.c b/nuttx/sched/mq_descreate.c index 69ddf999c..47b9397d5 100644 --- a/nuttx/sched/mq_descreate.c +++ b/nuttx/sched/mq_descreate.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * mq_descreate.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 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,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <stdarg.h> /* va_list */ #include <unistd.h> @@ -53,27 +53,27 @@ #include <nuttx/kmalloc.h> #include "mq_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: mq_desalloc * * Description: @@ -85,7 +85,7 @@ * Return Value: * Reference to the allocated mq descriptor. * - ************************************************************/ + ****************************************************************************/ static mqd_t mq_desalloc(void) { @@ -111,11 +111,11 @@ static mqd_t mq_desalloc(void) return mqdes; } -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: mq_descreate * * Description: @@ -129,7 +129,7 @@ static mqd_t mq_desalloc(void) * Return Value: * * - ************************************************************/ + ****************************************************************************/ mqd_t mq_descreate(FAR _TCB* mtcb, FAR msgq_t* msgq, int oflags) { diff --git a/nuttx/sched/mq_open.c b/nuttx/sched/mq_open.c index 8290aa0d2..2179178d0 100644 --- a/nuttx/sched/mq_open.c +++ b/nuttx/sched/mq_open.c @@ -1,7 +1,7 @@ -/************************************************************ +/**************************************************************************** * mq_open.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 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,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> /* uint32, etc. */ #include <stdarg.h> /* va_list */ @@ -49,31 +49,31 @@ #include "os_internal.h" #include "mq_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Function: mq_open * * Description: @@ -100,7 +100,7 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ mqd_t mq_open(const char *mq_name, int oflags, ...) { @@ -125,11 +125,11 @@ mqd_t mq_open(const char *mq_name, int oflags, ...) msgq = mq_findnamed(mq_name); if (msgq) { - /* It does. Check if the caller wanted to create - * a new message queue with this name. + /* It does. Check if the caller wanted to create a new + * message queue with this name (i.e., O_CREAT|O_EXCL) */ - if (!(oflags & O_CREAT) || !(oflags & O_EXCL)) + if ((oflags & O_CREAT) == 0 || (oflags & O_EXCL) == 0) { /* Create a message queue descriptor for the TCB */ diff --git a/nuttx/sched/mq_rcvinternal.c b/nuttx/sched/mq_rcvinternal.c index 853ac0bc1..744094322 100644 --- a/nuttx/sched/mq_rcvinternal.c +++ b/nuttx/sched/mq_rcvinternal.c @@ -1,7 +1,7 @@ -/************************************************************ - * mq_rcvinternal.c +/**************************************************************************** + * sched/mq_rcvinternal.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008 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,11 +31,11 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Included Files - ************************************************************/ + ****************************************************************************/ #include <sys/types.h> #include <fcntl.h> /* O_NONBLOCK */ @@ -49,31 +49,31 @@ #include "os_internal.h" #include "mq_internal.h" -/************************************************************ +/**************************************************************************** * Definitions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Type Declarations - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Global Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Variables - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Private Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Public Functions - ************************************************************/ + ****************************************************************************/ -/************************************************************ +/**************************************************************************** * Name: mq_verifyreceive * * Description: @@ -97,7 +97,7 @@ * * Assumptions: * - ************************************************************/ + ****************************************************************************/ int mq_verifyreceive(mqd_t mqdes, void *msg, size_t msglen) { @@ -124,7 +124,7 @@ int mq_verifyreceive(mqd_t mqdes, void *msg, size_t msglen) return OK; } -/************************************************************ +/**************************************************************************** * Function: mq_waitreceive * * Description: @@ -150,7 +150,7 @@ int mq_verifyreceive(mqd_t mqdes, void *msg, size_t msglen) * - For mq_timedreceive, setting of the timer and this wait * must be atomic. * - ************************************************************/ + ****************************************************************************/ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes) { @@ -166,13 +166,13 @@ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes) while ((rcvmsg = (FAR mqmsg_t*)sq_remfirst(&msgq->msglist)) == NULL) { - /* Should we block until there the above condition has been - * satisfied? + /* The queue is empty! Should we block until there the above condition + * has been satisfied? */ - if (!(mqdes->oflags & O_NONBLOCK)) + if ((mqdes->oflags & O_NONBLOCK) == 0) { - /* Block and try again */ + /* Yes.. Block and try again */ rtcb = (FAR _TCB*)g_readytorun.head; rtcb->msgwaitq = msgq; @@ -214,7 +214,7 @@ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes) return rcvmsg; } -/************************************************************ +/**************************************************************************** * Function: mq_doreceive * * Description: @@ -245,7 +245,7 @@ FAR mqmsg_t *mq_waitreceive(mqd_t mqdes) * message queue * - Pre-emption should be disabled throughout this call. * - ************************************************************/ + ****************************************************************************/ ssize_t mq_doreceive(mqd_t mqdes, mqmsg_t *mqmsg, void *ubuffer, int *prio) { |