The bitset field of freshly created futex should be initialized explicity.

Otherwise, REQUEUE operations fails.
This commit is contained in:
Dmitry Chagin 2011-02-13 17:56:22 +00:00
parent dcdb209924
commit 7c3b05b99c

View File

@ -194,6 +194,7 @@ futex_get0(uint32_t *uaddr, struct futex **newf, uint32_t flags)
tmpf = malloc(sizeof(*tmpf), M_FUTEX, M_WAITOK | M_ZERO);
tmpf->f_uaddr = uaddr;
tmpf->f_refcount = 1;
tmpf->f_bitset = FUTEX_BITSET_MATCH_ANY;
FUTEX_INIT(tmpf);
TAILQ_INIT(&tmpf->f_waiting_proc);