Definition mem_ok (tp: dryThreadPool) m :=
Smallstep.globals_not_fresh (Clight.genv_genv ge) m /\
mem_wd2 m /\
(forall i (CT: containsThread tp i),
ctl_ok (Mem.nextblock m) (getThreadC CT)).

Lemma ctl_ok_addThread:
forall nextb (ms: dryThreadPool) tid v1 v2 r
(H: containsThread ms tid),
val_ok nextb v1 ->
val_ok nextb v2 ->
(forall i (CT: containsThread ms i), ctl_ok nextb (getThreadC CT)) ->
(forall i (CT: containsThread (addThread ms v1 v2 r) i),
ctl_ok nextb (getThreadC CT)).