[svn-commits] branch group/autoconf_and_menuselect r18341 - in /team/group/autoconf_and_men...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Apr 7 11:35:27 MST 2006


Author: russell
Date: Fri Apr  7 13:35:26 2006
New Revision: 18341

URL: http://svn.digium.com/view/asterisk?rev=18341&view=rev
Log:
merge missing changes from linkedlists.h and removed the AST_LIST_NOLOCK stuff
from menuselect

Modified:
    team/group/autoconf_and_menuselect/build_tools/menuselect.c
    team/group/autoconf_and_menuselect/include/asterisk/linkedlists.h

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect.c?rev=18341&r1=18340&r2=18341&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Fri Apr  7 13:35:26 2006
@@ -33,9 +33,7 @@
 #include "mxml/mxml.h"
 #include "menuselect.h"
 
-#define AST_LIST_NOLOCK
 #include "asterisk/linkedlists.h"
-#undef AST_LIST_NOLOCK
 
 #define MIN_X		80
 #define MIN_Y		20

Modified: team/group/autoconf_and_menuselect/include/asterisk/linkedlists.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/include/asterisk/linkedlists.h?rev=18341&r1=18340&r2=18341&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/include/asterisk/linkedlists.h (original)
+++ team/group/autoconf_and_menuselect/include/asterisk/linkedlists.h Fri Apr  7 13:35:26 2006
@@ -20,16 +20,12 @@
 #ifndef ASTERISK_LINKEDLISTS_H
 #define ASTERISK_LINKEDLISTS_H
 
-#ifndef AST_LIST_NOLOCK
 #include "asterisk/lock.h"
-#endif
 
 /*!
   \file linkedlists.h
   \brief A set of macros to manage forward-linked lists.
 */
-
-#ifndef AST_LIST_NOLOCK
 
 /*!
   \brief Attempts to lock a list.
@@ -80,12 +76,45 @@
 }
 
 /*!
+  \brief Defines a structure to be used to hold a list of specified type (with no lock).
+  \param name This will be the name of the defined structure.
+  \param type This is the type of each list entry.
+
+  This macro creates a structure definition that can be used
+  to hold a list of the entries of type \a type. It does not actually
+  declare (allocate) a structure; to do that, either follow this
+  macro with the desired name of the instance you wish to declare,
+  or use the specified \a name to declare instances elsewhere.
+
+  Example usage:
+  \code
+  static AST_LIST_HEAD_NOLOCK(entry_list, entry) entries;
+  \endcode
+
+  This would define \c struct \c entry_list, and declare an instance of it named
+  \a entries, all intended to hold a list of type \c struct \c entry.
+*/
+#define AST_LIST_HEAD_NOLOCK(name, type)				\
+struct name {								\
+	struct type *first;						\
+	struct type *last;						\
+}
+
+/*!
   \brief Defines initial values for a declaration of AST_LIST_HEAD
 */
 #define AST_LIST_HEAD_INIT_VALUE	{		\
 	.first = NULL,					\
 	.last = NULL,					\
 	.lock = AST_MUTEX_INIT_VALUE,			\
+	}
+
+/*!
+  \brief Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK
+*/
+#define AST_LIST_HEAD_NOLOCK_INIT_VALUE	{	\
+	.first = NULL,					\
+	.last = NULL,					\
 	}
 
 /*!
@@ -113,82 +142,6 @@
 } name = AST_LIST_HEAD_INIT_VALUE
 
 /*!
-  \brief Initializes a list head structure with a specified first entry.
-  \param head This is a pointer to the list head structure
-  \param entry pointer to the list entry that will become the head of the list
-
-  This macro initializes a list head structure by setting the head
-  entry to the supplied value and recreating the embedded lock.
-*/
-#define AST_LIST_HEAD_SET(head, entry) do {				\
-	(head)->first = (entry);					\
-	(head)->last = (entry);						\
-	ast_mutex_init(&(head)->lock);					\
-} while (0)
-
-/*!
-  \brief Initializes a list head structure.
-  \param head This is a pointer to the list head structure
-
-  This macro initializes a list head structure by setting the head
-  entry to \a NULL (empty list) and recreating the embedded lock.
-*/
-#define AST_LIST_HEAD_INIT(head) {					\
-	(head)->first = NULL;						\
-	(head)->last = NULL;						\
-	ast_mutex_init(&(head)->lock);					\
-}
-
-/*!
-  \brief Destroys a list head structure.
-  \param head This is a pointer to the list head structure
-
-  This macro destroys a list head structure by setting the head
-  entry to \a NULL (empty list) and destroying the embedded lock.
-  It does not free the structure from memory.
-*/
-#define AST_LIST_HEAD_DESTROY(head) {					\
-	(head)->first = NULL;						\
-	(head)->last = NULL;						\
-	ast_mutex_destroy(&(head)->lock);				\
-}
-
-#endif /* AST_LIST_NOLOCK */
-
-/*!
-  \brief Defines a structure to be used to hold a list of specified type (with no lock).
-  \param name This will be the name of the defined structure.
-  \param type This is the type of each list entry.
-
-  This macro creates a structure definition that can be used
-  to hold a list of the entries of type \a type. It does not actually
-  declare (allocate) a structure; to do that, either follow this
-  macro with the desired name of the instance you wish to declare,
-  or use the specified \a name to declare instances elsewhere.
-
-  Example usage:
-  \code
-  static AST_LIST_HEAD_NOLOCK(entry_list, entry) entries;
-  \endcode
-
-  This would define \c struct \c entry_list, and declare an instance of it named
-  \a entries, all intended to hold a list of type \c struct \c entry.
-*/
-#define AST_LIST_HEAD_NOLOCK(name, type)				\
-struct name {								\
-	struct type *first;						\
-	struct type *last;						\
-}
-
-/*!
-  \brief Defines initial values for a declaration of AST_LIST_HEAD_NOLOCK
-*/
-#define AST_LIST_HEAD_NOLOCK_INIT_VALUE	{	\
-	.first = NULL,					\
-	.last = NULL,					\
-	}
-
-/*!
   \brief Defines a structure to be used to hold a list of specified type, statically initialized.
 
   This is the same as AST_LIST_HEAD_STATIC, except without the lock included.
@@ -198,6 +151,20 @@
 	struct type *first;						\
 	struct type *last;						\
 } name = AST_LIST_HEAD_NOLOCK_INIT_VALUE
+
+/*!
+  \brief Initializes a list head structure with a specified first entry.
+  \param head This is a pointer to the list head structure
+  \param entry pointer to the list entry that will become the head of the list
+
+  This macro initializes a list head structure by setting the head
+  entry to the supplied value and recreating the embedded lock.
+*/
+#define AST_LIST_HEAD_SET(head, entry) do {				\
+	(head)->first = (entry);					\
+	(head)->last = (entry);						\
+	ast_mutex_init(&(head)->lock);					\
+} while (0)
 
 /*!
   \brief Initializes a list head structure with a specified first entry.
@@ -386,7 +353,32 @@
  */
 #define AST_LIST_TRAVERSE_SAFE_END  }
 
-
+/*!
+  \brief Initializes a list head structure.
+  \param head This is a pointer to the list head structure
+
+  This macro initializes a list head structure by setting the head
+  entry to \a NULL (empty list) and recreating the embedded lock.
+*/
+#define AST_LIST_HEAD_INIT(head) {					\
+	(head)->first = NULL;						\
+	(head)->last = NULL;						\
+	ast_mutex_init(&(head)->lock);					\
+}
+
+/*!
+  \brief Destroys a list head structure.
+  \param head This is a pointer to the list head structure
+
+  This macro destroys a list head structure by setting the head
+  entry to \a NULL (empty list) and destroying the embedded lock.
+  It does not free the structure from memory.
+*/
+#define AST_LIST_HEAD_DESTROY(head) {					\
+	(head)->first = NULL;						\
+	(head)->last = NULL;						\
+	ast_mutex_destroy(&(head)->lock);				\
+}
 
 /*!
   \brief Initializes a list head structure.



More information about the svn-commits mailing list