Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_sleepqueue.c
Show First 20 Lines • Show All 1,157 Lines • ▼ Show 20 Lines | for (i = 0; i < 3 && !finished ; i++) { | ||||
* to sb until after we drop the spinlock. | * to sb until after we drop the spinlock. | ||||
*/ | */ | ||||
/* Where we will store the stacks. */ | /* Where we will store the stacks. */ | ||||
st = malloc(sizeof(struct stack *) * stacks_to_allocate, | st = malloc(sizeof(struct stack *) * stacks_to_allocate, | ||||
M_TEMP, M_WAITOK); | M_TEMP, M_WAITOK); | ||||
for (stack_idx = 0; stack_idx < stacks_to_allocate; | for (stack_idx = 0; stack_idx < stacks_to_allocate; | ||||
stack_idx++) | stack_idx++) | ||||
st[stack_idx] = stack_create(); | st[stack_idx] = stack_create(M_WAITOK); | ||||
/* Where we will store the td name, tid, etc. */ | /* Where we will store the td name, tid, etc. */ | ||||
td_infos = malloc(sizeof(struct sbuf *) * stacks_to_allocate, | td_infos = malloc(sizeof(struct sbuf *) * stacks_to_allocate, | ||||
M_TEMP, M_WAITOK); | M_TEMP, M_WAITOK); | ||||
for (stack_idx = 0; stack_idx < stacks_to_allocate; | for (stack_idx = 0; stack_idx < stacks_to_allocate; | ||||
stack_idx++) | stack_idx++) | ||||
td_infos[stack_idx] = sbuf_new(NULL, NULL, | td_infos[stack_idx] = sbuf_new(NULL, NULL, | ||||
MAXCOMLEN + sizeof(struct thread *) * 2 + 40, | MAXCOMLEN + sizeof(struct thread *) * 2 + 40, | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |