Thread (47 messages) flat view 47 messages, 3 authors, 2016-06-15

Re: [msysGit] [PATCH v2 02/14] mingw: implement syslog

From: Erik Faye-Lund <hidden>
Date: 2016-06-15 22:48:02

On Fri, Jan 15, 2010 at 11:57 PM, Janos Laube [off-list ref] wrote:
quoted
+static HANDLE ms_eventlog;
+
+void openlog(const char *ident, int logopt, int facility)
+{
+       if (ms_eventlog)
+               return;
+       ms_eventlog = RegisterEventSourceA(NULL, ident);
+}
maybe make ms_eventlog thread local?
for example:

static __thread HANDLE ms_eventlog;

this would break compilation with msvc tho.

janos
Since the code that use it isn't multi-threaded, I fail to see the
point. In fact even if it were, I'm not sure I see the big point...
especially since the "__thread"-keyword isn't used (AFAICT) at all in
the git source code so far.

-- 
Erik "kusma" Faye-Lund
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help