All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prerna Saxena <prerna@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, Jan Kiszka <jan.kiszka@siemens.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com
Subject: [RFC v2] [PATCH 1/3] Export tdb_hash()
Date: Fri, 11 Jun 2010 00:45:58 +0530	[thread overview]
Message-ID: <20100611004558.7d87f0e5@zephyr> (raw)
In-Reply-To: <20100611003811.2635fa5d@zephyr>

For now, I simply export tdb_hash() from qdict.h for use by tracing 
framework.
Luiz suggested renaming and exporting it from a location other than 
qdict.h . Would "qemu-common.h" be a better place?


Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qdict.c |    2 +-
 qdict.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/qdict.c b/qdict.c
index 175bc17..5261872 100644
--- a/qdict.c
+++ b/qdict.c
@@ -56,7 +56,7 @@ QDict *qobject_to_qdict(const QObject *obj)
  * tdb_hash(): based on the hash agorithm from gdbm, via tdb
  * (from module-init-tools)
  */
-static unsigned int tdb_hash(const char *name)
+unsigned int tdb_hash(const char *name)
 {
     unsigned value;	/* Used to compute the hash value.  */
     unsigned   i;	/* Used to cycle through random values. */
diff --git a/qdict.h b/qdict.h
index 5e5902c..d221c18 100644
--- a/qdict.h
+++ b/qdict.h
@@ -59,4 +59,6 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key,
                           int64_t err_value);
 const char *qdict_get_try_str(const QDict *qdict, const char *key);
 
+/* Export tdb_hash() for use by trace framework */
+unsigned int tdb_hash(const char *name);
 #endif /* QDICT_H */
-- 
1.6.2.5



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India


WARNING: multiple messages have this Message-ID (diff)
From: Prerna Saxena <prerna@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, Jan Kiszka <jan.kiszka@siemens.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com
Subject: [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash()
Date: Fri, 11 Jun 2010 00:45:58 +0530	[thread overview]
Message-ID: <20100611004558.7d87f0e5@zephyr> (raw)
In-Reply-To: <20100611003811.2635fa5d@zephyr>

For now, I simply export tdb_hash() from qdict.h for use by tracing 
framework.
Luiz suggested renaming and exporting it from a location other than 
qdict.h . Would "qemu-common.h" be a better place?


Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qdict.c |    2 +-
 qdict.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/qdict.c b/qdict.c
index 175bc17..5261872 100644
--- a/qdict.c
+++ b/qdict.c
@@ -56,7 +56,7 @@ QDict *qobject_to_qdict(const QObject *obj)
  * tdb_hash(): based on the hash agorithm from gdbm, via tdb
  * (from module-init-tools)
  */
-static unsigned int tdb_hash(const char *name)
+unsigned int tdb_hash(const char *name)
 {
     unsigned value;	/* Used to compute the hash value.  */
     unsigned   i;	/* Used to cycle through random values. */
diff --git a/qdict.h b/qdict.h
index 5e5902c..d221c18 100644
--- a/qdict.h
+++ b/qdict.h
@@ -59,4 +59,6 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key,
                           int64_t err_value);
 const char *qdict_get_try_str(const QDict *qdict, const char *key);
 
+/* Export tdb_hash() for use by trace framework */
+unsigned int tdb_hash(const char *name);
 #endif /* QDICT_H */
-- 
1.6.2.5



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

  reply	other threads:[~2010-06-10 19:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 19:08 [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Prerna Saxena
2010-06-10 19:08 ` [Qemu-devel] " Prerna Saxena
2010-06-10 19:15 ` Prerna Saxena [this message]
2010-06-10 19:15   ` [Qemu-devel] [RFC v2] [PATCH 1/3] Export tdb_hash() Prerna Saxena
2010-06-11 17:54   ` Luiz Capitulino
2010-06-11 17:54     ` [Qemu-devel] " Luiz Capitulino
2010-06-10 19:20 ` [RFC v2] [PATCH 2/3] Monitor command 'info trace' Prerna Saxena
2010-06-10 19:20   ` [Qemu-devel] " Prerna Saxena
2010-06-10 19:24 ` [RFC v2] [PATCH 3/3] Toggle tracepoint state Prerna Saxena
2010-06-10 19:24   ` [Qemu-devel] " Prerna Saxena
2010-06-11 11:42 ` [Qemu-devel] [RFC v2] [PATCH 0/3] Monitor Support for 'simple' trace backend Markus Armbruster
2010-06-11 11:42   ` Markus Armbruster
2010-06-11 12:08   ` Jan Kiszka
2010-06-11 12:08     ` Jan Kiszka
2010-06-11 17:56     ` Luiz Capitulino
2010-06-11 17:56       ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100611004558.7d87f0e5@zephyr \
    --to=prerna@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=maneesh@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.