Skip to main content
summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorPeder Andersen2011-06-23 14:39:22 -0400
committerEugene Tarassov2011-11-21 12:56:40 -0500
commitb7a76d5c2e04197a05f52d99a2401457b77ca83b (patch)
treeb781efc290cbb4c7dc465f2bfaa939634127d88e /server
parent45c739a72bc2f3943aed89e4912137dc2afe8f8f (diff)
downloadorg.eclipse.tcf.agent-b7a76d5c2e04197a05f52d99a2401457b77ca83b.tar.gz
org.eclipse.tcf.agent-b7a76d5c2e04197a05f52d99a2401457b77ca83b.tar.xz
org.eclipse.tcf.agent-b7a76d5c2e04197a05f52d99a2401457b77ca83b.zip
TCF Agent: leverage static initialization of lists
In addition to improving size and performance, this allows certain service capabilites to function to some extent before their initializer routines are invoked.
Diffstat (limited to 'server')
-rw-r--r--server/services/context-proxy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/services/context-proxy.c b/server/services/context-proxy.c
index 3aea652f..04c18276 100644
--- a/server/services/context-proxy.c
+++ b/server/services/context-proxy.c
@@ -152,7 +152,7 @@ struct PeerCache {
#define ctx2stk(A) ((StackFrameCache *)((char *)(A) - offsetof(StackFrameCache, link_ctx)))
#define idhashl2ctx(A) ((ContextCache *)((char *)(A) - offsetof(ContextCache, id_hash_link)))
-static LINK peers;
+static LINK peers = TCF_LIST_INIT(peers);
static MemoryRegion * mem_buf = NULL;
static unsigned mem_buf_max = 0;
@@ -1540,7 +1540,6 @@ void init_contexts_sys_dep(void) {
add_context_event_listener(&listener, NULL);
add_channel_close_listener(channel_close_listener);
context_extension_offset = context_extension(sizeof(ContextCache *));
- list_init(&peers);
}
#endif /* ENABLE_DebugContext && ENABLE_ContextProxy */

Back to the top