Commit 2c8de414 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot 8

Remove pthread_yield support

Summary:[Folly] Remove `pthread_yield` support.

* It is not actually part of POSIX - rather, `sched_yield` is.
* In C++, we should be using `std::this_thread::yield` anyway.

Reviewed By: Gownta

Differential Revision: D3056221

fb-gh-sync-id: 2fea55dd7b715149327987d61e5a573ad0455330
shipit-source-id: 2fea55dd7b715149327987d61e5a573ad0455330
parent 1e9f3465
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
#if FOLLY_HAVE_SCHED_H #if FOLLY_HAVE_SCHED_H
#include <sched.h> #include <sched.h>
#ifndef FOLLY_HAVE_PTHREAD_YIELD
#define pthread_yield sched_yield
#endif
#endif #endif
// Unaligned loads and stores // Unaligned loads and stores
......
...@@ -121,7 +121,7 @@ AM_PATH_PYTHON ...@@ -121,7 +121,7 @@ AM_PATH_PYTHON
# Checks for header files. # Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h features.h inttypes.h limits.h stdint.h stdlib.h string.h sys/time.h unistd.h mutex.h malloc.h byteswap.h bits/functexcept.h bits/c++config.h]) AC_CHECK_HEADERS([fcntl.h features.h inttypes.h limits.h sched.h stdint.h stdlib.h string.h sys/time.h unistd.h mutex.h malloc.h byteswap.h bits/functexcept.h bits/c++config.h])
AC_CHECK_HEADER(double-conversion/double-conversion.h, [], [AC_MSG_ERROR( AC_CHECK_HEADER(double-conversion/double-conversion.h, [], [AC_MSG_ERROR(
[Couldn't find double-conversion.h, please download from \ [Couldn't find double-conversion.h, please download from \
...@@ -474,17 +474,12 @@ AC_CHECK_FUNCS([getdelim \ ...@@ -474,17 +474,12 @@ AC_CHECK_FUNCS([getdelim \
memset \ memset \
pow \ pow \
strerror \ strerror \
pthread_yield \ sched_yield \
malloc_size \ malloc_size \
malloc_usable_size \ malloc_usable_size \
memrchr \ memrchr \
pipe2]) pipe2])
if test "$ac_cv_func_pthread_yield" = "no"; then
AC_CHECK_HEADERS([sched.h])
AC_CHECK_FUNCS([sched_yield])
fi
AC_CHECK_HEADER([lz4.h], AC_CHECK_LIB([lz4], [LZ4_decompress_safe])) AC_CHECK_HEADER([lz4.h], AC_CHECK_LIB([lz4], [LZ4_decompress_safe]))
AC_CHECK_HEADER([snappy.h], AC_CHECK_LIB([snappy], [main])) AC_CHECK_HEADER([snappy.h], AC_CHECK_LIB([snappy], [main]))
AC_CHECK_HEADER([zlib.h], AC_CHECK_LIB([z], [main])) AC_CHECK_HEADER([zlib.h], AC_CHECK_LIB([z], [main]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment