Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_umtx.c
Show First 20 Lines • Show All 4,364 Lines • ▼ Show 20 Lines | __umtx_op_sem2_wait_compat32(struct thread *td, struct _umtx_op_args *uap) | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
static int | static int | ||||
__umtx_op_nwake_private32(struct thread *td, struct _umtx_op_args *uap) | __umtx_op_nwake_private32(struct thread *td, struct _umtx_op_args *uap) | ||||
{ | { | ||||
uint32_t uaddrs[BATCH_SIZE], **upp; | uint32_t uaddrs[BATCH_SIZE], *upp; | ||||
int count, error, i, pos, tocopy; | int count, error, i, pos, tocopy; | ||||
upp = (uint32_t **)uap->obj; | upp = (uint32_t *)uap->obj; | ||||
error = 0; | error = 0; | ||||
for (count = uap->val, pos = 0; count > 0; count -= tocopy, | for (count = uap->val, pos = 0; count > 0; count -= tocopy, | ||||
pos += tocopy) { | pos += tocopy) { | ||||
tocopy = MIN(count, BATCH_SIZE); | tocopy = MIN(count, BATCH_SIZE); | ||||
error = copyin(upp + pos, uaddrs, tocopy * sizeof(uint32_t)); | error = copyin(upp + pos, uaddrs, tocopy * sizeof(uint32_t)); | ||||
if (error != 0) | if (error != 0) | ||||
break; | break; | ||||
for (i = 0; i < tocopy; ++i) | for (i = 0; i < tocopy; ++i) | ||||
kern_umtx_wake(td, (void *)(intptr_t)uaddrs[i], | kern_umtx_wake(td, (void *)(uintptr_t)uaddrs[i], | ||||
INT_MAX, 1); | INT_MAX, 1); | ||||
maybe_yield(); | maybe_yield(); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
struct umtx_robust_lists_params_compat32 { | struct umtx_robust_lists_params_compat32 { | ||||
uint32_t robust_list_offset; | uint32_t robust_list_offset; | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |