Skip to content

Commit

Permalink
Fix missing sched_yield() (#3599)
Browse files Browse the repository at this point in the history
* Fix missing sched_yield()

* Fix
  • Loading branch information
twose authored Aug 27, 2020
1 parent 78c2826 commit 3850ce8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/swoole.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,16 @@
#include <limits.h>
#include <fcntl.h>
#include <unistd.h>
#include <sched.h> /* sched_yield() */

#include <sys/utsname.h>
#include <sys/time.h>

#if defined(HAVE_CPU_AFFINITY)
#ifdef __FreeBSD__
#if defined(HAVE_CPU_AFFINITY) && defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/cpuset.h>
#include <pthread_np.h>
typedef cpuset_t cpu_set_t;
#else
#include <sched.h>
#endif
#endif

#include <memory>
Expand Down

0 comments on commit 3850ce8

Please sign in to comment.