|
From: <cao...@us...> - 2005-06-03 19:27:25
|
Update of /cvsroot/opendlm/opendlm/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27790/src/include Modified Files: Makefile.am dlm_list.h dlm_version.h Log Message: daemonizing changes and version info changes Index: Makefile.am =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/include/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.am 20 May 2004 20:55:32 -0000 1.3 --- Makefile.am 3 Jun 2005 19:27:15 -0000 1.4 *************** *** 8,12 **** clm_migrate.h clm_reconfig.h clm_tune.h clmstructs.h cltrc.h dlm.h \ dlm_cluster.h dlm_devmsg.h dlm_kernel.h dlm_list.h dlm_version.h \ ! iterator.h print.h pti.h incdir = $(includedir)/$(PACKAGE) --- 8,12 ---- clm_migrate.h clm_reconfig.h clm_tune.h clmstructs.h cltrc.h dlm.h \ dlm_cluster.h dlm_devmsg.h dlm_kernel.h dlm_list.h dlm_version.h \ ! iterator.h print.h pti.h dlm_assert.h dlm_log.h dlm_module.h incdir = $(includedir)/$(PACKAGE) Index: dlm_list.h =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/include/dlm_list.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dlm_list.h 25 May 2005 16:25:18 -0000 1.6 --- dlm_list.h 3 Jun 2005 19:27:15 -0000 1.7 *************** *** 70,74 **** // DLM_ASSERT must also be enabled globally in dlm_assert.h // comment this out to disable assertions in dlm_list ! //#define USE_DLM_ASSERTIONS /**************************************************************** --- 70,74 ---- // DLM_ASSERT must also be enabled globally in dlm_assert.h // comment this out to disable assertions in dlm_list ! #define USE_DLM_ASSERTIONS /**************************************************************** *************** *** 268,292 **** #endif // defined(__linux__) && defined(__KERNEL__) - /**************************************************************** - * a routine to exercise the list code - * add whatever you want here, but leave the list intact and - * effectively unmodified when you are done - * Automatically enabled when DLM_LIST_ASSERTIONS are turned on - ****************************************************************/ - static inline void - dlm_exercise_list(dlm_list_t * list) { - #ifdef DLM_LIST_ASSERTIONS - dlm_list_t test_list; - dlm_list_t test_node; - dlm_list_init(&test_list); - dlm_list_append(&test_list, list); // also performs init on list - dlm_list_add_head(&test_list, &test_node); - dlm_list_remove(&test_node); - dlm_list_add_tail(&test_list, &test_node); - dlm_list_remove(&test_node); - dlm_list_append(list, &test_list); - #endif - } - static inline void dlm_listnode_init(void * node) { --- 268,271 ---- *************** *** 304,308 **** dlm_list_get_head(dlm_list_t * list) { ASSERT_VALID_DLM_LIST(list); - dlm_exercise_list(list); return dlm_list_is_empty(list) ? NULL : list->next; } --- 283,286 ---- *************** *** 311,315 **** dlm_list_get_tail(dlm_list_t * list) { ASSERT_VALID_DLM_LIST(list); - dlm_exercise_list(list); return dlm_list_is_empty(list) ? NULL : list->prev; } --- 289,292 ---- *************** *** 319,323 **** dlm_listnode_t * node; ASSERT_VALID_DLM_LIST(list); - dlm_exercise_list(list); node = dlm_list_get_head(list); if (node != NULL) --- 296,299 ---- *************** *** 329,333 **** dlm_list_insert(dlm_list_t * list, void * node, void * pred ) { ASSERT_VALID_DLM_LIST(list); - dlm_exercise_list(list); if (! pred) pred = list; --- 305,308 ---- *************** *** 339,343 **** dlm_listnode_t * n = node; ASSERT_VALID_DLM_LIST(list); - dlm_exercise_list(list); if (IS_DLM_LISTNODE_QUEUED(n)) { dlm_listnode_t * i; --- 314,317 ---- *************** *** 356,360 **** dlm_listnode_t * n = node; ASSERT_DLM_LIST_HAS_NODE(list, node); - dlm_exercise_list(list); return (n->next != list) ? n->next : NULL; } --- 330,333 ---- *************** *** 364,368 **** dlm_listnode_t * n = node; ASSERT_DLM_LIST_HAS_NODE(list, node); - dlm_exercise_list(list); return (n->prev != list) ? n->prev : NULL; } --- 337,340 ---- *************** *** 373,378 **** unsigned count = 0; ASSERT_VALID_DLM_LIST(list); ! dlm_exercise_list(list); ! for (EACH_DLM_LISTNODE(list, node)) ++count; return count; --- 345,349 ---- unsigned count = 0; ASSERT_VALID_DLM_LIST(list); ! for (node = list->next; node != list; node = node->next) ++count; return count; Index: dlm_version.h =================================================================== RCS file: /cvsroot/opendlm/opendlm/src/include/dlm_version.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dlm_version.h 3 Mar 2005 19:58:09 -0000 1.5 --- dlm_version.h 3 Jun 2005 19:27:15 -0000 1.6 *************** *** 37,64 **** /* - | Lock manager version numbers. These version numbers are embedded - | in the messages notifying the lock manager of lock manager state - | changes. - */ - #define DLM_MAJOR_VERSION 0 - #define DLM_MINOR_VERSION 4 - - /* * Migration protocol */ #define MPROTO_VERSION 1 - /* - * Current version - */ - #define DLM_00000001VERSION ((DLM_MAJOR_VERSION << 16) | \ - (DLM_MINOR_VERSION & 0xffff)) - - #define DLM_FIRST_VERSION DLM_00000001VERSION - - #define DLM_CurVERSION DLM_00000001VERSION - /* version of *this* copy of the software */ ! #define DLM_VERSION DLM_CurVERSION #endif /* DLM_VERSION_H */ --- 37,48 ---- /* * Migration protocol */ #define MPROTO_VERSION 1 /* version of *this* copy of the software */ ! #define DLM_VERSION ( (DLM_MAJOR_VERSION << 16) \ ! + (DLM_MINOR_VERSION << 8) \ ! + (DLM_PATCH_VERSION) ) #endif /* DLM_VERSION_H */ |