[PATCH] libports: implement lockless management of threads

2013-11-15 Thread Justus Winter
ports_manage_port_operations_multithread uses two values, totalthreads and nreqthreads, to manage the threads it creates. Previously a lock was used to synchronize the access to them. Use atomic operations instead. * libports/manage-multithread.c (ports_manage_port_operations_multithread): Use

Re: [PATCH] libports: implement lockless management of threads

2013-11-15 Thread Justus Winter
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

[PATCH] Clean up the included header files

2013-11-15 Thread Justus Winter
* libihash/ihash.c: Clean up the included header files. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/canon-host.c: Likewise. * libshouldbeinlibc/fsysops.c: Likewise. * libshouldbeinlibc/idvec-auth.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/idvec.h: Likewi

[PATCH 5/5] i386/i386/seg.c: remove file

2013-11-15 Thread Marin Ramesa
MACH_INLINE is already defined where needed. Inline functions from seg.h and tss.h get compiled when included from other files, therefore seg.c serves no real purpose. I think it's safe to remove. * i386/Makefrag.am: Remove i386/i386/seg.c. * i386/i386/seg.c: Remove file. --- i386/Makefrag.am |

[PATCH 2/5] i386/include/mach/i386: add ifndefs

2013-11-15 Thread Marin Ramesa
* i386/include/mach/i386/asm.h: Add ifndef. * i386/include/mach/i386/disk.h: Likewise. --- i386/include/mach/i386/asm.h | 4 i386/include/mach/i386/disk.h | 4 2 files changed, 8 insertions(+) diff --git a/i386/include/mach/i386/asm.h b/i386/include/mach/i386/asm.h index 3e3f48b..4e3b

[PATCH 4/5] i386/include/mach/i386/rpc.h: remove file

2013-11-15 Thread Marin Ramesa
A file with two empty unused structs. I think it's safe to remove. * i386/Makefrag.am: Remove i386/include/mach/i386/rpc.h. * i386/include/mach/i386/rpc.h: Remove file. * include/mach/rpc.h: Don't include mach/machine/rpc.h. --- i386/Makefrag.am | 1 - i386/include/mach/i386/rpc.h

[PATCH 3/5] i386/include/mach/i386/mach_i386_types.h: add comments after else and endif

2013-11-15 Thread Marin Ramesa
* i386/include/mach/i386/mach_i386_types.h (MACH_KERNEL): Add comments after else and endif. --- i386/include/mach/i386/mach_i386_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i386/include/mach/i386/mach_i386_types.h b/i386/include/mach/i386/mach_i386_types.h i

[PATCH 1/5] i386/i386: remove io_perm_deallocate()

2013-11-15 Thread Marin Ramesa
The comment says there is nothing to deallocate and TODO_REMOVE_ME is nowhere defined, so I guess this destructor is no longer called. * i386/i386/io_perm.c (io_perm_deallocate): Remove definition. * i386/i386/io_perm.h (io_perm_deallocate): Remove prototype. (_I386_IO_PERM_H_): Add comment after