Minor issues:
I don't know why dup_wait_info() returns a value--it is always ignored.
If duping can fail, the situation is not particularly recoverable.
I don't like that the dup method is responsible for copying the dup and
dtor members of struct __wait_info. It would be simpler for the common
code in dup_wait_info() to always copy the dup and dtor function pointers:
void * (*dup)(void *);
static inline void dup_wait_info(wait_info_t *s, wait_info_t *d)
{
close_wait_info(d);
*d = *s;
if (s->dup)
d->data = s->dup(s->data);
}
I prefer the style where assignment functions, such as dup_wait_info(),
place the destination argument to the left of the source, to mimic the
assignment operator and functions such as strcpy().
remove_wait_queue_info() could be optimized slightly by transferring
ownership of the wait queue info data instead of duping it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: [rfc/patch] wake_up_info() draft ...Davide Libenzi
- Prev by Date: [PATCH 379] Amiga core C99
- Next by Date: [PATCH 377] M68k asm/system.h
- Previous by thread: [rfc/patch] wake_up_info() draft ...
- Next by thread: Re: [rfc/patch] wake_up_info() draft ...
- Indexes:[Main][Thread]