[yield] yank demo_nanosleep #1613

This commit is contained in:
nick black 2021-10-22 21:56:07 -04:00 committed by nick black
parent edc10fc054
commit cd5c913994
2 changed files with 2 additions and 4 deletions

View File

@ -123,8 +123,8 @@ add_compile_options(-fno-math-errno -freciprocal-math -funsafe-math-optimization
add_compile_options(-fexceptions -fstrict-aliasing) add_compile_options(-fexceptions -fstrict-aliasing)
if(${USE_ASAN}) if(${USE_ASAN})
add_compile_options(-fsanitize=thread) add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=thread) add_link_options(-fsanitize=address)
endif() endif()
# don't use REQUIRED with subsequent find_package() operations; we use # don't use REQUIRED with subsequent find_package() operations; we use

View File

@ -106,8 +106,6 @@ yielder(struct marsh* m){
ncplane_reparent(m->vopts.n, m->vopts.n); ncplane_reparent(m->vopts.n, m->vopts.n);
pthread_mutex_unlock(&rlock); pthread_mutex_unlock(&rlock);
pthread_cond_signal(&rcond); pthread_cond_signal(&rcond);
// FIXME only sleep if we didn't take enough time updating ncvisual!
//demo_nanosleep(m->nc, &m->tspec);
pthread_mutex_lock(&lock); pthread_mutex_lock(&lock);
while(*m->turn != m->id && !*m->done){ while(*m->turn != m->id && !*m->done){
pthread_cond_wait(&cond, &lock); pthread_cond_wait(&cond, &lock);