[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] libports: implement lockless management of threads
From: |
Justus Winter |
Subject: |
Re: [PATCH] libports: implement lockless management of threads |
Date: |
Fri, 15 Nov 2013 20:52:22 +0100 |
Hi :)
youpi wrote:
> Now, there is no need for the two counters to be updated coherently,
> they are used for different reasons, and don't actually interfere. Also,
> mixing them into one int reduces the maximum number of threads to 65535,
> which is not so big.
>
> So I'd say please move to using two unsigned ints. Yes, it means
> two atomic operations on thread creation/destruction, but that's an
> expensive operation already anyway (and we're not supposed to do that so
> often). Readability of the code is more important than that :)
You were right, the counters do not have to be updated coherently,
here is an updated patch. Hurd packages built with them seem to work
normal.
Justus
- Re: [PATCH] libports: fix the thread counts in case the thread creation fails, (continued)
- Re: [PATCH] libports: fix the thread counts in case the thread creation fails, Samuel Thibault, 2013/11/09
- Re: [PATCH] libports: fix the thread counts in case the thread creation fails, Neal H. Walfield, 2013/11/10
- Re: [PATCH] libports: fix the thread counts in case the thread creation fails, Samuel Thibault, 2013/11/10
- Re: [PATCH] libports: fix the thread counts in case the thread creation fails, Neal H. Walfield, 2013/11/10
- lockless thread management in libports (was: [PATCH] libports: fix the thread counts in case the thread creation fails), Justus Winter, 2013/11/11
- [PATCH] libports: implement lockless management of threads, Justus Winter, 2013/11/11
- Re: [PATCH] libports: implement lockless management of threads, Neal H. Walfield, 2013/11/11
- Re: [PATCH] libports: implement lockless management of threads, Justus Winter, 2013/11/12
- Re: [PATCH] libports: implement lockless management of threads, Samuel Thibault, 2013/11/12
- Re: [PATCH] libports: implement lockless management of threads, Emilio Pozuelo Monfort, 2013/11/13
- Re: [PATCH] libports: implement lockless management of threads,
Justus Winter <=
- [PATCH] libports: implement lockless management of threads, Justus Winter, 2013/11/15
- Re: [PATCH] libports: implement lockless management of threads, Samuel Thibault, 2013/11/16
- Re: [PATCH] libports: implement lockless management of threads, Justus Winter, 2013/11/16
- Re: [PATCH] libports: implement lockless management of threads, Richard Braun, 2013/11/16