Opened 8 years ago
Closed 8 years ago
#10263 closed Bugs (fixed)
[container] AIX 6.1 bug with sched_yield() function out of scope
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | container |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The error that pops up in some of the container tests is the following:
gcc.compile.c++ ../bin.v2/libs/container/test/flat_map_test.test/gcc-4.8.1/debug/flat_map_test.o In file included from ../boost/container/detail/node_pool.hpp:21:0,
from ../boost/container/node_allocator.hpp:22, from ../libs/container/test/flat_map_test.cpp:14:
../boost/container/detail/mutex.hpp: In function 'int boost_interprocess_spin_acquire_lock(int*)': ../boost/container/detail/mutex.hpp:139:45: error: 'sched_yield' was not declared in this scope
#define SPIN_LOCK_YIELD sched_yield();
../boost/container/detail/mutex.hpp:150:13: note: in expansion of macro 'SPIN_LOCK_YIELD'
SPIN_LOCK_YIELD;
In mutex.hpp there was a compilation failure because, "'sched_yield' was not declared in this scope." If I add the missing file (sched.h) in AIX in order to allow it to see the missing function, the issue is resolved.
Please look at the Pull Request created for further details: https://github.com/boostorg/container/pull/2
Thanks for the report. Merged and then modified in commit d849f80ea549efbac2142cfdfe7973bd65d0fda0, adding missing <sched.h> for all systems, not only AIX.