[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8448 - in flightrecorder/src: include libflightrecorder
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8448 - in flightrecorder/src: include libflightrecorder |
Date: |
Sun, 3 May 2009 05:19:07 -0600 |
Author: durner
Date: 2009-05-03 05:19:06 -0600 (Sun, 03 May 2009)
New Revision: 8448
Modified:
flightrecorder/src/include/flightrecorder.h
flightrecorder/src/libflightrecorder/clientapi.c
flightrecorder/src/libflightrecorder/stack_trace.c
Log:
fr_*st_get*()
Modified: flightrecorder/src/include/flightrecorder.h
===================================================================
--- flightrecorder/src/include/flightrecorder.h 2009-05-03 09:13:31 UTC (rev
8447)
+++ flightrecorder/src/include/flightrecorder.h 2009-05-03 11:19:06 UTC (rev
8448)
@@ -86,6 +86,20 @@
void fr_srv_opt_cleanup(struct FR_Session *ses);
/**
+ * @brief Get the stack trace of a particular thread
+ * @param tid thread ID
+ * @return stack trace, NULL on error
+ */
+struct StackTrace *fr_st_get(unsigned int tid);
+
+/**
+ * @brief Get the stack trace of this thread
+ * @param tid thread ID
+ * @return stack trace, NULL on error
+ */
+struct StackTrace *fr_st_get_this();
+
+/**
* @brief Add function to the stack trace
* @param file source file from which the function is called
* @param line source line from which the function is called
@@ -156,6 +170,14 @@
/* --- Stack traces - C/S API --- */
/**
+ * @brief Get the stack trace for a particular thread
+ * @param ses C/S session
+ * @param tid thread id
+ * @return stack trace, NULL if tid is unknown
+ */
+struct StackTrace *fr_srv_st_get(struct FR_Session *ses, unsigned int tid);
+
+/**
* @brief Add function to the stack trace
* @param ses C/S session
* @param file source file from which the function is called
Modified: flightrecorder/src/libflightrecorder/clientapi.c
===================================================================
--- flightrecorder/src/libflightrecorder/clientapi.c 2009-05-03 09:13:31 UTC
(rev 8447)
+++ flightrecorder/src/libflightrecorder/clientapi.c 2009-05-03 11:19:06 UTC
(rev 8448)
@@ -29,6 +29,16 @@
#include "flightrecorder.h"
/**
+ * @brief Get the stack trace of this thread
+ * @param tid thread ID
+ * @return stack trace, NULL on error
+ */
+struct StackTrace *fr_st_get_this()
+{
+ return fr_st_get(fr_thread_get_tid());
+}
+
+/**
* @brief Add function to the stack trace
* @param file source file from which the function is called
* @param line source line from which the function is called
Modified: flightrecorder/src/libflightrecorder/stack_trace.c
===================================================================
--- flightrecorder/src/libflightrecorder/stack_trace.c 2009-05-03 09:13:31 UTC
(rev 8447)
+++ flightrecorder/src/libflightrecorder/stack_trace.c 2009-05-03 11:19:06 UTC
(rev 8448)
@@ -24,7 +24,13 @@
#include "flightrecorder.h"
#include "private.h"
-static struct StackTrace *get_trace(struct FR_Session *ses, unsigned int tid)
+/**
+ * @brief Get the stack trace for a particular thread
+ * @param ses C/S session
+ * @param tid thread id
+ * @return stack trace, NULL if tid is unknown
+ */
+struct StackTrace *fr_srv_st_get(struct FR_Session *ses, unsigned int tid)
{
struct StackTrace *trace;
unsigned int idx;
@@ -64,7 +70,7 @@
struct StackTrace *trace;
struct StackTraceEntry *entry;
- trace = get_trace(ses, tid);
+ trace = fr_srv_st_get(ses, tid);
if (!trace)
return 0;
@@ -97,7 +103,7 @@
{
struct StackTrace *trace;
- trace = get_trace(ses, tid);
+ trace = fr_srv_st_get(ses, tid);
if (!trace || trace->depth == 0)
return 0;
@@ -137,7 +143,7 @@
struct StackTrace *trace;
struct StackTraceEntry *entry;
- trace = get_trace(ses, tid);
+ trace = fr_srv_st_get(ses, tid);
if (!trace || !trace->depth)
return 0;
@@ -153,17 +159,6 @@
}
/**
- * @brief Return the stack trace for a particular thread
- * @param ses C/S session
- * @param tid thread ID
- * @return pointer stack trace, NULL on error
- */
-struct StackTrace *fr_srv_st_get(struct FR_Session *ses, unsigned int tid)
-{
- return get_trace(ses, tid);
-}
-
-/**
* @brief Return a list of thread IDs
* @param ses C/S session
* @return array of thread IDs, NULL on error
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8448 - in flightrecorder/src: include libflightrecorder,
gnunet <=