diff options
author | Longpeng(Mike) <longpeng2@huawei.com> | 2022-02-22 17:05:04 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-04-06 14:31:55 +0200 |
commit | f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94 (patch) | |
tree | b3baad6e196328bed2811174d73b6514dcc35ee1 /meson.build | |
parent | d7482ffe9756919531307330fd1c6dbec66e8c32 (diff) | |
download | qemu-f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94.zip qemu-f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94.tar.gz qemu-f9fc8932b11f3bcf2a2626f567cb6fdd36a33a94.tar.bz2 |
thread-posix: remove the posix semaphore support
POSIX specifies an absolute time for sem_timedwait(), it would be
affected if the system time is changing, but there is not a relative
time or monotonic clock version of sem_timedwait, so we cannot gain
from POSIX semaphore any more.
An alternative way is to use sem_trywait + usleep, maybe we can
remove CONFIG_SEM_TIMEDWAIT in this way? No, because some systems
(e.g. mac os) mark the sem_xxx API as deprecated.
So maybe remove the usage of POSIX semaphore and turn to use the
pthread variant for all systems looks better.
Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Message-Id: <20220222090507.2028-2-longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 5a207ed..526e9dc 100644 --- a/meson.build +++ b/meson.build @@ -1632,7 +1632,6 @@ config_host_data.set('CONFIG_MEMALIGN', cc.has_function('memalign')) config_host_data.set('CONFIG_PPOLL', cc.has_function('ppoll')) config_host_data.set('CONFIG_PREADV', cc.has_function('preadv', prefix: '#include <sys/uio.h>')) config_host_data.set('CONFIG_PTHREAD_FCHDIR_NP', cc.has_function('pthread_fchdir_np')) -config_host_data.set('CONFIG_SEM_TIMEDWAIT', cc.has_function('sem_timedwait', dependencies: threads)) config_host_data.set('CONFIG_SENDFILE', cc.has_function('sendfile')) config_host_data.set('CONFIG_SETNS', cc.has_function('setns') and cc.has_function('unshare')) config_host_data.set('CONFIG_SYNCFS', cc.has_function('syncfs')) |