- Still a bit of portability-related changes. Now it is almost totally portable to Windows (only path of config file should remain...)
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1175 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
057d3609f1
commit
bd1b8f879b
|
@ -22,8 +22,9 @@
|
||||||
|
|
||||||
#include "python_cpu_policy.hh"
|
#include "python_cpu_policy.hh"
|
||||||
|
|
||||||
|
#include <glibmm/timer.h>
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <unistd.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
|
@ -235,7 +236,7 @@ PythonCPUPolicy::wait_unlock() const throw(UserInterruptException, MalformedPoli
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
Py_UNBLOCK_THREADS;
|
Py_UNBLOCK_THREADS;
|
||||||
usleep(wait_for); // hack'a'ton! magggggiccc nummmbeeerrrrrs!!
|
Glib::usleep(wait_for); // hack'a'ton! magggggiccc nummmbeeerrrrrs!!
|
||||||
Py_BLOCK_THREADS;
|
Py_BLOCK_THREADS;
|
||||||
|
|
||||||
PyObject* retval = PyObject_CallMethod(_adapter, "mutex_test_lock", NULL);
|
PyObject* retval = PyObject_CallMethod(_adapter, "mutex_test_lock", NULL);
|
||||||
|
|
|
@ -23,16 +23,17 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <sgpemv2/cpu_policy.hh>
|
||||||
|
#include <sgpemv2/user_interrupt_exception.hh>
|
||||||
|
#include <sgpemv2/malformed_policy_exception.hh>
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#include <glibmm/thread.h>
|
#include <glibmm/thread.h>
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <sgpemv2/cpu_policy.hh>
|
|
||||||
#include <sgpemv2/user_interrupt_exception.hh>
|
|
||||||
#include <sgpemv2/malformed_policy_exception.hh>
|
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
{
|
{
|
||||||
class PythonCPUPolicy;
|
class PythonCPUPolicy;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include <sgpemv2/templates/deletor.tcc>
|
#include <sgpemv2/templates/deletor.tcc>
|
||||||
|
|
||||||
#include <Python.h>
|
|
||||||
#include <glibmm/ustring.h>
|
#include <glibmm/ustring.h>
|
||||||
#include <glibmm/timer.h>
|
#include <glibmm/timer.h>
|
||||||
#include <glibmm/fileutils.h>
|
#include <glibmm/fileutils.h>
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
using namespace sgpem;
|
using namespace sgpem;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
@ -108,8 +106,8 @@ PythonCPUPolicyManager::collect_policies()
|
||||||
|
|
||||||
for (; dir_it != dir_end; ++dir_it)
|
for (; dir_it != dir_end; ++dir_it)
|
||||||
{
|
{
|
||||||
Glib::Dir dir(dir_it->c_str());
|
Glib::Dir dir(*dir_it);
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
std::clog << "Opening directory " << *dir_it << " looking for python policies..." << endl;
|
std::clog << "Opening directory " << *dir_it << " looking for python policies..." << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <Python.h>
|
#include "python_cpu_policy.hh"
|
||||||
|
|
||||||
#include <sgpemv2/cpu_policy_manager.hh>
|
#include <sgpemv2/cpu_policy_manager.hh>
|
||||||
#include "python_cpu_policy.hh"
|
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
namespace sgpem
|
namespace sgpem
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue