summaryrefslogtreecommitdiff
path: root/nuttx/sched/sem_destroy.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-31 17:59:22 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2008-01-31 17:59:22 +0000
commit8a99a139ba3683e981c9e71c57f7fce313d92cae (patch)
tree2dfeb694139cc0dbfcbb69bcbaae8ff6ddecbdd3 /nuttx/sched/sem_destroy.c
parentb1fd89b2e088a49381c698ef69904124605e81dc (diff)
downloadpx4-nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.tar.gz
px4-nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.tar.bz2
px4-nuttx-8a99a139ba3683e981c9e71c57f7fce313d92cae.zip
Z16F integration changes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@595 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sem_destroy.c')
-rw-r--r--nuttx/sched/sem_destroy.c65
1 files changed, 32 insertions, 33 deletions
diff --git a/nuttx/sched/sem_destroy.c b/nuttx/sched/sem_destroy.c
index 1d88563ff..6dd60bc28 100644
--- a/nuttx/sched/sem_destroy.c
+++ b/nuttx/sched/sem_destroy.c
@@ -1,7 +1,7 @@
-/************************************************************
- * sem_destroy.c
+/****************************************************************************
+ * sched/sem_destroy.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,58 +31,57 @@
* 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 <semaphore.h>
#include "sem_internal.h"
-/************************************************************
+/****************************************************************************
* Compilation Switches
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Definitions
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Private Type Declarations
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Global Variables
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Private Variables
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Private Functions
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Public Functions
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Function: sem_destroy
*
* Description:
- * This function is used to destroy the un-named semaphore
- * indicated by sem. Only a semaphore that was created
- * using sem_init() may be destroyed using sem_destroy();
- * the effect of calling sem_destroy() with a name semaphore
- * is undefined. The effect of subsequent use of the
- * semaphore sem is undefined until sem is re-initialized
- * by another call to sem_init().
+ * This function is used to destroy the un-named semaphore indicated by
+ * 'sem'. Only a semaphore that was created using sem_init() may be
+ * destroyed using sem_destroy(); the effect of calling sem_destroy() with
+ * a named semaphore is undefined. The effect of subsequent use of the
+ * semaphore sem is undefined until sem is re-initialized by another call
+ * to sem_init().
*
- * The effect of destroying a semaphore upon which other
- * processes are currently blocked is undefined.
+ * The effect of destroying a semaphore upon which other processes are
+ * currently blocked is undefined.
*
* Parameters:
* sem - Semaphore to be destroyed.
@@ -92,9 +91,9 @@
*
* Assumptions:
*
- ************************************************************/
+ ****************************************************************************/
-int sem_destroy (sem_t *sem)
+int sem_destroy (FAR sem_t *sem)
{
int ret = ERROR;