[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-devel
Subject:    Re: pthread locking question
From:       Jeff Johnson <n3npq.jbj () gmail ! com>
Date:       2017-10-15 20:06:10
Message-ID: 18844AA0-39E9-4BFE-8A0A-B3DBDC64862A () gmail ! com
[Download RAW message or body]


> On Oct 15, 2017, at 4:06 AM, Arkadiusz Miśkiewicz <arekm@maven.pl> wrote:
> 
> On Sunday 15 of October 2017, Arkadiusz Miśkiewicz wrote:
> > Hi.
> > 
> > Is this lock supposed to be locked/unlocked before initialization?
> 
> Ok, this was missing
> 
> --- rpmio/rpmsq.c~      2017-10-15 09:34:23.000000000 +0200
> +++ rpmio/rpmsq.c       2017-10-15 10:05:39.859549557 +0200
> @@ -781,7 +781,9 @@
> (void) sigprocmask (SIG_SETMASK, &oldMask, NULL);
> 
> /* Reset rpmsigTbl lock and refcnt. */
> +#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
> INIT_LOCK ();
> +#endif
> 
> (void) execve (argv[0], (char *const *) argv, environ);
> _exit (127);
> 

Thanks.

FWIW: The locking scheme (and macros) were borrowed from glibc ~2005 and not changed \
since … there appear to be some improvements/bugs/changes/fixes.

73 de Jeff

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic