summaryrefslogtreecommitdiffstats
path: root/libdimension/profile.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-06-07 16:58:20 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-06-07 16:58:20 -0400
commita22560c3ccaf19261b5c40fdcab36d2d22426986 (patch)
tree85a39e016ac972f54e282eedcf32b26da6f67822 /libdimension/profile.c
parentbfadc2ee359f10842da21336795e54f24a2746e3 (diff)
downloaddimension-a22560c3ccaf19261b5c40fdcab36d2d22426986.tar.xz
Use // comments when possible.
Diffstat (limited to 'libdimension/profile.c')
-rw-r--r--libdimension/profile.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libdimension/profile.c b/libdimension/profile.c
index 308c8fb..164e002 100644
--- a/libdimension/profile.c
+++ b/libdimension/profile.c
@@ -28,23 +28,23 @@
#include <stdio.h>
#include <inttypes.h>
-/** Information on one predicted branch. */
+/// Information on one predicted branch.
typedef struct {
char *location;
uint64_t predicted, branches;
} dmnsn_branch;
-/** Count of mispredicted branches. */
+/// Count of mispredicted branches.
static dmnsn_dictionary *dmnsn_profile = NULL;
-/** Mutex which protects \c dmnsn_profile. */
+/// Mutex which protects \c dmnsn_profile.
static pthread_mutex_t dmnsn_profile_mutex = PTHREAD_MUTEX_INITIALIZER;
-/** Thread-local count of mispredicted branches. */
+/// Thread-local count of mispredicted branches.
static pthread_key_t dmnsn_thread_profile;
-/** Initialize the thread-specific pointer exactly once. */
+/// Initialize the thread-specific pointer exactly once.
static pthread_once_t dmnsn_thread_profile_once = PTHREAD_ONCE_INIT;
-/** Add thread-specific profile data to the global counts. */
+/// Add thread-specific profile data to the global counts.
static void
dmnsn_profile_globalize(void *ptr)
{
@@ -59,7 +59,7 @@ dmnsn_profile_globalize(void *ptr)
}
}
-/** Destructor function for thread-specific profile data. */
+/// Destructor function for thread-specific profile data.
static void
dmnsn_delete_thread_profile(void *ptr)
{
@@ -72,7 +72,7 @@ dmnsn_delete_thread_profile(void *ptr)
dmnsn_delete_dictionary(thread_profile);
}
-/** Initialize the thread-specific pointer. */
+/// Initialize the thread-specific pointer.
static void
dmnsn_initialize_thread_profile(void)
{
@@ -83,7 +83,7 @@ dmnsn_initialize_thread_profile(void)
dmnsn_unlock_mutex(&dmnsn_profile_mutex);
}
-/** Get the thread-specific profile data. */
+/// Get the thread-specific profile data.
static dmnsn_dictionary *
dmnsn_get_thread_profile(void)
{
@@ -91,7 +91,7 @@ dmnsn_get_thread_profile(void)
return pthread_getspecific(dmnsn_thread_profile);
}
-/** Set the thread-specific profile data. */
+/// Set the thread-specific profile data.
static void
dmnsn_set_thread_profile(dmnsn_dictionary *thread_profile)
{