On Wed, Oct 26, 2016 at 1:40 PM, Johannes Sixt wrote:
> Am 26.10.2016 um 22:26 schrieb Jeff King:
>>
>> On Wed, Oct 26, 2016 at 10:25:38PM +0200, Johannes Sixt wrote:
>>
>>> Am 26.10.2016 um 21:51 schrieb Stefan Beller:
it is
very convenient to not have to explicitly initialize mute
On Wed, Oct 26, 2016 at 1:26 PM, Jeff King wrote:
> On Wed, Oct 26, 2016 at 10:25:38PM +0200, Johannes Sixt wrote:
>
>> Am 26.10.2016 um 21:51 schrieb Stefan Beller:
>> > it is
>> > very convenient to not have to explicitly initialize mutexes?
>>
>> Not to initialize a mutex is still wrong for pth
Am 26.10.2016 um 22:26 schrieb Jeff King:
On Wed, Oct 26, 2016 at 10:25:38PM +0200, Johannes Sixt wrote:
Am 26.10.2016 um 21:51 schrieb Stefan Beller:
it is
very convenient to not have to explicitly initialize mutexes?
Not to initialize a mutex is still wrong for pthreads.
I think Stefan w
On Wed, Oct 26, 2016 at 10:25:38PM +0200, Johannes Sixt wrote:
> Am 26.10.2016 um 21:51 schrieb Stefan Beller:
> > it is
> > very convenient to not have to explicitly initialize mutexes?
>
> Not to initialize a mutex is still wrong for pthreads.
I think Stefan was being loose with his wording. T
Am 26.10.2016 um 21:51 schrieb Stefan Beller:
it is
very convenient to not have to explicitly initialize mutexes?
Not to initialize a mutex is still wrong for pthreads.
-- Hannes
On Wed, Oct 26, 2016 at 12:51:02PM -0700, Stefan Beller wrote:
> > I seem to recall this does not work on Windows, where the pthread
> > functions are thin wrappers over CRITICAL_SECTION. Other threaded code
> > in git does an explicit setup step before entering threaded sections.
> > E.g., see st
On Wed, Oct 26, 2016 at 5:15 AM, Jeff King wrote:
> On Wed, Oct 26, 2016 at 11:35:58AM +0200, Simon Ruderich wrote:
>
>> > static pthread_mutex_t attr_mutex;
>> > -#define attr_lock()pthread_mutex_lock(&attr_mutex)
>> > +static inline void attr_lock(void)
>> > +{
>> > + static int initialized;
On Tue, Oct 25, 2016 at 2:18 AM, Stefan Beller wrote:
> On Mon, Oct 24, 2016 at 11:55 AM, Junio C Hamano wrote:
>
>>
>> Make that a double-asterisk. The same problem appears in an updated
>> example in technical/api-gitattributes.txt doc, but the example in
>> the commit log message (below) is c
On Sun, Oct 23, 2016 at 6:32 AM, Stefan Beller wrote:
> This revamps the API of the attr subsystem to be thread safe.
> Before we had the question and its results in one struct type.
> The typical usage of the API was
>
> static struct git_attr_check *check;
>
> if (!check)
> check
On Wed, Oct 26, 2016 at 11:35:58AM +0200, Simon Ruderich wrote:
> > static pthread_mutex_t attr_mutex;
> > -#define attr_lock()pthread_mutex_lock(&attr_mutex)
> > +static inline void attr_lock(void)
> > +{
> > + static int initialized;
> > +
> > + if (!initialized) {
> > + pthread_m
On Wed, Oct 26, 2016 at 10:52:23AM +0200, Johannes Schindelin wrote:
> diff --git a/attr.c b/attr.c
> index d5a6aa9..6933504 100644
> --- a/attr.c
> +++ b/attr.c
> @@ -50,7 +50,16 @@ static struct git_attr *(git_attr_hash[HASHSIZE]);
> #ifndef NO_PTHREADS
>
> static pthread_mutex_t attr_mutex;
>
Hi Stefan,
On Sat, 22 Oct 2016, Stefan Beller wrote:
> @@ -46,6 +47,19 @@ struct git_attr {
> static int attr_nr;
> static struct git_attr *(git_attr_hash[HASHSIZE]);
>
> +#ifndef NO_PTHREADS
> +
> +static pthread_mutex_t attr_mutex;
> +#define attr_lock() pthread_mutex_lock(&attr_mu
On Mon, Oct 24, 2016 at 11:55 AM, Junio C Hamano wrote:
>
> Make that a double-asterisk. The same problem appears in an updated
> example in technical/api-gitattributes.txt doc, but the example in
> the commit log message (below) is correct.
The implementation is actually using a double pointer
Stefan Beller writes:
> This revamps the API of the attr subsystem to be thread safe.
> Before we had the question and its results in one struct type.
> The typical usage of the API was
>
> static struct git_attr_check *check;
>
> if (!check)
> check = git_attr_check_initl("text",
This revamps the API of the attr subsystem to be thread safe.
Before we had the question and its results in one struct type.
The typical usage of the API was
static struct git_attr_check *check;
if (!check)
check = git_attr_check_initl("text", NULL);
git_check_attr(path, chec
15 matches
Mail list logo