]> git.proxmox.com Git - mirror_ovs.git/commitdiff
ctags: Include new annotations to ctags ignore list.
authorFlavio Leitner <fbl@sysclose.org>
Wed, 10 Jun 2020 19:49:45 +0000 (16:49 -0300)
committerWilliam Tu <u9012063@gmail.com>
Sat, 4 Jul 2020 22:42:38 +0000 (15:42 -0700)
The annotation OVS_NO_THREAD_SAFETY_ANALYSIS and OVS_LOCKABLE are
not part of the list, so ctags can't find functions using them.

The annotation list comes from a regex and to include more items
make the regex more difficult to read and maintain. Convert to a
static list because it isn't supposed to change much and there
is no standard names.

Also add a comment to remind to keep the list up-to-date.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: William Tu <u9012063@gmail.com>
Makefile.am
acinclude.m4
include/openvswitch/compiler.h

index b279303d186c6f621432bf9ce28ae7a7028cf0bd..27ef9e4b483f517af8dd487d42839254b9cba0b7 100644 (file)
@@ -46,7 +46,7 @@ AM_CPPFLAGS += -DNDEBUG
 AM_CFLAGS += -fomit-frame-pointer
 endif
 
-AM_CTAGSFLAGS = $(OVS_CTAGS_IDENTIFIERS_LIST)
+AM_CTAGSFLAGS = -I "$(OVS_CTAGS_IDENTIFIERS_LIST)"
 
 if WIN32
 psep=";"
index 8847b81459773f39b1d87a478895dbf340ea311c..054ec2e3c43f64fda890a48316213732e15f01d6 100644 (file)
@@ -1332,11 +1332,11 @@ AC_DEFUN([OVS_ENABLE_SPARSE],
 
 dnl OVS_CTAGS_IDENTIFIERS
 dnl
-dnl ctags ignores symbols with extras identifiers. This builds a list of
-dnl specially handled identifiers to be ignored.
+dnl ctags ignores symbols with extras identifiers. This is a list of
+dnl specially handled identifiers to be ignored. [ctags(1) -I <list>].
 AC_DEFUN([OVS_CTAGS_IDENTIFIERS],
     AC_SUBST([OVS_CTAGS_IDENTIFIERS_LIST],
-           [`printf %s '-I "'; sed -n 's/^#define \(OVS_[A-Z_]\+\)(\.\.\.)$/\1+/p' ${srcdir}/include/openvswitch/compiler.h  | tr \\\n ' ' ; printf '"'`] ))
+           ["OVS_LOCKABLE OVS_NO_THREAD_SAFETY_ANALYSIS OVS_REQ_RDLOCK+ OVS_ACQ_RDLOCK+ OVS_REQ_WRLOCK+ OVS_ACQ_WRLOCK+ OVS_REQUIRES+ OVS_ACQUIRES+ OVS_TRY_WRLOCK+ OVS_TRY_RDLOCK+ OVS_TRY_LOCK+ OVS_GUARDED_BY+ OVS_EXCLUDED+ OVS_RELEASES+ OVS_ACQ_BEFORE+ OVS_ACQ_AFTER+"]))
 
 dnl OVS_PTHREAD_SET_NAME
 dnl
index 5289a70f6eadc6b5535afc71b175b4c20df5696a..cf009f826443e892889ad450cb1044624afb7f4d 100644 (file)
  *    OVS_REQUIRES         OVS_REQ_RDLOCK       OVS_REQ_WRLOCK
  *    OVS_EXCLUDED         OVS_EXCLUDED         OVS_EXCLUDED
  */
+
+/* Please keep OVS_CTAGS_IDENTIFIERS up-to-date in acinclude.m4. */
 #define OVS_LOCKABLE __attribute__((lockable))
 #define OVS_REQ_RDLOCK(...) __attribute__((shared_locks_required(__VA_ARGS__)))
 #define OVS_ACQ_RDLOCK(...) __attribute__((shared_lock_function(__VA_ARGS__)))