Skip to content
Snippets Groups Projects
Commit 167c3fce authored by Florian Fischer's avatar Florian Fischer
Browse files

Merge branch 'fix-fsearch-for-io-eval' into 'master'

fsearch: write only found files to stdout and use implicit file offset

See merge request i4/manycore/emper!350
parents 8c29dff3 b0438822
No related branches found
No related tags found
No related merge requests found
Pipeline #77909 passed
...@@ -51,7 +51,7 @@ void search(const std::string& path) { ...@@ -51,7 +51,7 @@ void search(const std::string& path) {
std::array<char, PATH_MAX + 1> outBuf; std::array<char, PATH_MAX + 1> outBuf;
memcpy(outBuf.data(), path.c_str(), path.length()); memcpy(outBuf.data(), path.c_str(), path.length());
outBuf[path.length()] = '\n'; outBuf[path.length()] = '\n';
emper::io::writeFileAndWait(STDOUT_FILENO, outBuf.data(), path.length() + 1, 0); emper::io::writeFileAndWait(STDOUT_FILENO, outBuf.data(), path.length() + 1, -1);
goto out; goto out;
} }
...@@ -105,9 +105,9 @@ static auto fssearch(const po::variables_map& vm) -> int { ...@@ -105,9 +105,9 @@ static auto fssearch(const po::variables_map& vm) -> int {
Runtime runtime; Runtime runtime;
std::cout << "Starting fsearch with stealingMode=" << stealingMode; std::cerr << "Starting fsearch with stealingMode=" << stealingMode;
if (max_running) std::cout << " and " << max_running->getCount() << " file fibers"; if (max_running) std::cerr << " and " << max_running->getCount() << " file fibers";
std::cout << std::endl; std::cerr << std::endl;
auto* dirWalker = Fiber::from(walk_dir); auto* dirWalker = Fiber::from(walk_dir);
runtime.scheduleFromAnywhere(*dirWalker); runtime.scheduleFromAnywhere(*dirWalker);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment