Re: [msysGit] [PATCH v2 02/14] mingw: implement syslog
- From
Erik Faye-Lund <kusmabite@googlemail.com>
- Date
- Jan 15, 2010, 23:01 UTC
- Message-ID
- <40aa078e1001151501s462802ffua3aec600ed38f516@mail.gmail.com>
- In-Reply-To
- <9d6091531001151457v4c446b61k40c93f7c6180683d@mail.gmail.com>
On Fri, Jan 15, 2010 at 11:57 PM, Janos Laube <janos.dev@gmail.com> wrote:
Show 18 quoted lines
>> +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