Hi Jakub, > On Sun, Jan 17, 2021 at 12:26:26PM +0100, Rainer Orth wrote: >> >> I have applied your other suggestions, and have retested the gomp.exp and >> >> libgomp tests. The full testrun started yesterday showed no regressions. >> >> If >> >> you have no further issues then I will commit this later tonight ahead of >> >> stage4. >> > >> > LGTM, thanks. >> >> this patch broke Solaris bootstrap, but probably all non-Linux targets: >> >> /vol/gcc/src/hg/master/local/libgomp/task.c: In function 'task_fulfilled_p': >> /vol/gcc/src/hg/master/local/libgomp/task.c:334:1: error: control reaches >> end of non-void function [-Werror=return-type] >> 334 | } >> | ^ >> >> task_fulfilled_p is >> >> return __atomic_load_n (&task->completion_sem, __ATOMIC_RELAXED); >> >> but in config/posix/sem.h gomp_sem_t is (for >> !HAVE_BROKEN_POSIX_SEMAPHORES): >> >> typedef sem_t gomp_sem_t; >> >> and sem_t being a struct in Solaris <semaphores.h>. > > Oops. > I guess we want to add to sem.h some API to query current value of the > semaphore, which could be atomic load for the config/{linux,accel}/sem.h, > sem_getvalue for config/posix/sem.h (does Solaris implement that?)
it does: this was already in POSIX.1-2001 and even Solaris 11.3 supports XPG6. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University