[ofa-general] [PATCH] opensm/osm_log: OSM_LOG() macro

Sasha Khapyorsky sashak at voltaire.com
Sat Feb 16 14:03:04 PST 2008


This macro is similar to osm_log() function but also includes function
name.

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/include/opensm/osm_log.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opensm/include/opensm/osm_log.h b/opensm/include/opensm/osm_log.h
index bfd2e96..dd63dc4 100644
--- a/opensm/include/opensm/osm_log.h
+++ b/opensm/include/opensm/osm_log.h
@@ -396,6 +396,8 @@ extern void osm_log_msg_box(osm_log_t *log, osm_log_level_t level,
 extern void osm_log_raw(IN osm_log_t * const p_log,
 	    IN const osm_log_level_t verbosity, IN const char *p_buf);
 
+#define OSM_LOG(log, level, fmt, arg...) osm_log(log, level, "%s: " fmt, __func__, ##arg)
+
 #define DBG_CL_LOCK 0
 
 #define CL_PLOCK_EXCL_ACQUIRE( __exp__ )  \
-- 
1.5.4.1.122.gaa8d




More information about the general mailing list