mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-16 00:13:00 +00:00
[yield] yank demo_nanosleep #1613
This commit is contained in:
parent
edc10fc054
commit
cd5c913994
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user