From f054af6f3ae096c6851d8eae0d1d2e98bc631351 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 23 Mar 2012 20:14:21 +0000 Subject: Updated comments; starting to implement priority protection but backed everything out but some changes to comments git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4510 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/include/semaphore.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'nuttx/include/semaphore.h') diff --git a/nuttx/include/semaphore.h b/nuttx/include/semaphore.h index dd1754d69..85214b9c2 100644 --- a/nuttx/include/semaphore.h +++ b/nuttx/include/semaphore.h @@ -1,8 +1,8 @@ /**************************************************************************** * include/semaphore.h * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __SEMAPHORE_H -#define __SEMAPHORE_H +#ifndef __INCLUDE_SEMAPHORE_H +#define __INCLUDE_SEMAPHORE_H /**************************************************************************** * Included Files @@ -83,7 +83,7 @@ struct semholder_s struct sem_s { - int16_t semcount; /* >0 -> Num counts available */ + int16_t semcount; /* >0 -> Num counts available */ /* <0 -> Num tasks waiting for semaphore */ #ifdef CONFIG_PRIORITY_INHERITANCE struct semholder_s hlist; /* List of holders of semaphore counts */ @@ -91,6 +91,8 @@ struct sem_s }; typedef struct sem_s sem_t; +/* Initializers */ + #ifdef CONFIG_PRIORITY_INHERITANCE # define SEM_INITIALIZER(c) {(c), SEMHOLDER_INITIALIZER} #else @@ -127,4 +129,4 @@ EXTERN int sem_getvalue(FAR sem_t *sem, FAR int *sval); } #endif -#endif /* __SEMAPHORE_H */ +#endif /* __INCLUDE_SEMAPHORE_H */ -- cgit v1.2.3