mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
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
This commit is contained in:
+8
-6
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* include/semaphore.h
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* 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 */
|
||||
|
||||
Reference in New Issue
Block a user