[PATCH] Mark pure functions with attribute pure

2013-12-20 Thread Marin Ramesa
--- ddb/db_aout.c | 4 ++-- ddb/db_break.c| 4 ++-- ddb/db_break.h| 2 +- ddb/db_command.c | 2 +- ddb/db_command.h | 2 +- ddb/db_output.c | 2 +- ddb/db_output.h | 2 +- ddb/db_run.c | 2 +- ddb/db_sym.c | 2 +- device/dev_name.c | 2 +- include/string.h | 8

Re: [PATCHv2,HURD] Add fork hooks for pthread_atfork

2013-12-20 Thread Thomas Schwinge
Hi! On Tue, 24 Sep 2013 23:08:15 +0200, Samuel Thibault samuel.thiba...@ens-lyon.org wrote: 2013-09-24 Samuel Thibault samuel.thiba...@ens-lyon.org pthread_atfork needs application callbacks to be called outside any locking. * sysdeps/mach/hurd/fork.c (_hurd_atfork_prepare_hook,

[PATCH] Avoid the casts in calls to queue function and macros

2013-12-20 Thread Marin Ramesa
Avoid the casts by specifying addresses of queue_chain_t members. If the order of members in the structures ever changes, the code will be correct. --- device/net_io.c | 4 ++-- kern/mach_clock.c | 10 +- kern/processor.c | 2 +- kern/sched_prim.c | 14 +++--- kern/task.c

Re: [PATCHv2,HURD] Add fork hooks for pthread_atfork

2013-12-20 Thread Roland McGrath
The linker is supposed to define those symbols automagically. Did it break?

Re: [PATCH] Avoid the casts in calls to queue function and macros

2013-12-20 Thread Marin Ramesa
On 20.12.2013 19:41:14, Marin Ramesa wrote: - insque((queue_entry_t) telt, ((queue_entry_t)next)-prev); + insque((telt-chain), *((next-chain).prev)); This should be simply: - insque((queue_entry_t) telt, ((queue_entry_t)next)-prev); + insque((telt-chain), next-chain.prev);