return $res
}
+check_internal_tags() { # <patch>
+ res=0
+
+ cat "$1" |awk '
+ BEGIN {
+ current_file = "";
+ ret = 0;
+ }
+ /^+++ b\// {
+ current_file = $2;
+ }
+ /^+.*__rte_internal/ {
+ if (current_file ~ ".c$" ) {
+ print "Please only put __rte_internal tags in " \
+ "headers ("current_file")";
+ ret = 1;
+ }
+ if ($1 != "+__rte_internal" || $2 != "") {
+ print "__rte_internal must appear alone on the line" \
+ " immediately preceding the return type of" \
+ " a function."
+ ret = 1;
+ }
+ }
+ END {
+ exit ret;
+ }' || res=1
+
+ return $res
+}
+
number=0
range='origin/master..'
quiet=false
ret=1
fi
+ ! $verbose || printf '\nChecking __rte_internal tags:\n'
+ report=$(check_internal_tags "$tmpinput")
+ if [ $? -ne 0 ] ; then
+ $headline_printed || print_headline "$3"
+ printf '%s\n' "$report"
+ ret=1
+ fi
+
if [ "$tmpinput" != "$1" ]; then
rm -f "$tmpinput"
trap - INT
#endif
+#ifndef ALLOW_INTERNAL_API
+
+#define __rte_internal \
+__attribute__((error("Symbol is not public ABI"), \
+section(".text.internal")))
+
+#else
+
+#define __rte_internal \
+__attribute__((section(".text.internal")))
+
+#endif
+
#endif /* _RTE_COMPAT_H_ */