freebsd-ports/math/cvc4/files/patch-src_main_portfolio.cpp
Kurt Jaeger 1c2716f959 New port: math/cvc4
An efficient open-source automatic theorem prover for satisfiability modulo
theories (SMT) problems. It can be used to prove the validity (or, dually, the
satisfiability) of first-order formulas in a large number of built-in logical
theories and their combination.

WWW: https://cvc4.cs.stanford.edu/web/

PR:		227702
Submitted by:	Greg V <greg@unrelenting.technology>
2018-06-21 11:06:10 +00:00

24 lines
794 B
C++

--- src/main/portfolio.cpp.orig 2018-04-22 17:42:48 UTC
+++ src/main/portfolio.cpp
@@ -18,6 +18,9 @@
#include <boost/bind.hpp>
#include <boost/thread/condition.hpp>
#include <boost/exception_ptr.hpp>
+#ifdef __FreeBSD__
+#include <pthread_np.h>
+#endif
#include "base/output.h"
#include "options/options.h"
@@ -100,7 +103,11 @@ std::pair<int, S> runPortfolio(int numThreads,
void *stackaddr;
size_t stacksize;
pthread_attr_t attr;
+#ifdef __linux__
pthread_getattr_np(threads[t].native_handle(), &attr);
+#elif __FreeBSD__
+ pthread_attr_get_np(threads[t].native_handle(), &attr);
+#endif
pthread_attr_getstack(&attr, &stackaddr, &stacksize);
Chat() << "Created worker thread " << t << " with stack size " << stacksize << std::endl;
}