gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_7-76-ge0ce54b


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_7-76-ge0ce54b
Date: Fri, 11 Nov 2011 12:51:21 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=e0ce54b38ba3060bbee8f3314138fba45ce816e7

The branch, master has been updated
       via  e0ce54b38ba3060bbee8f3314138fba45ce816e7 (commit)
       via  fa9760a72f3e840e0960837b12b693160a48e972 (commit)
      from  8886a2f6029f5e7929162145970abaf1a5bcd224 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e0ce54b38ba3060bbee8f3314138fba45ce816e7
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Nov 11 13:52:45 2011 +0100

    define likely() and unlikely() and use them to prevent debugging code from 
being prioritized in branch prediction.

commit fa9760a72f3e840e0960837b12b693160a48e972
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri Nov 11 13:36:19 2011 +0100

    more files to ignore

-----------------------------------------------------------------------

Summary of changes:
 .gitignore          |    1 +
 lib/gnutls_errors.h |    4 ++--
 lib/gnutls_int.h    |   15 +++++++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 66e99e0..86d0b4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -529,3 +529,4 @@ tests/x509paths/
 tests/x509self
 tests/x509sign-verify
 tests/x509signself
+tests/keygen
diff --git a/lib/gnutls_errors.h b/lib/gnutls_errors.h
index 8f1c05d..9907c63 100644
--- a/lib/gnutls_errors.h
+++ b/lib/gnutls_errors.h
@@ -58,10 +58,10 @@ _gnutls_audit_log (gnutls_session_t, const char *fmt, ...)
 void _gnutls_mpi_log (const char *prefix, bigint_t a);
 
 #ifdef C99_MACROS
-#define LEVEL(l, ...) do { if (_gnutls_log_level >= l || _gnutls_log_level > 
9) \
+#define LEVEL(l, ...) do { if (unlikely(_gnutls_log_level >= l || 
_gnutls_log_level > 9)) \
       _gnutls_log( l, __VA_ARGS__); } while(0)
 
-#define LEVEL_EQ(l, ...) do { if (_gnutls_log_level == l || _gnutls_log_level 
> 9) \
+#define LEVEL_EQ(l, ...) do { if (unlikely(_gnutls_log_level == l || 
_gnutls_log_level > 9)) \
       _gnutls_log( l, __VA_ARGS__); } while(0)
 
 #define _gnutls_debug_log(...) LEVEL(2, __VA_ARGS__)
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 4818eeb..92acdd2 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -58,6 +58,21 @@ typedef int ssize_t;
 # define memxor gl_memxor
 #endif
 
+#ifdef __GNUC__
+# ifndef _GNUTLS_GCC_VERSION
+#  define _GNUTLS_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + 
__GNUC_PATCHLEVEL__)
+# endif
+# if _GNUTLS_GCC_VERSION >= 30100
+#  define likely(x)      __builtin_expect((x), 1)
+#  define unlikely(x)    __builtin_expect((x), 0)
+# endif
+#endif
+
+#ifndef likely
+# define likely
+# define unlikely
+#endif
+
 /* some systems had problems with long long int, thus,
  * it is not used.
  */


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]