Skip to content

Commit

Permalink
work-around solution
Browse files Browse the repository at this point in the history
  • Loading branch information
HawxChen committed Jul 24, 2017
1 parent bf583f4 commit a7f5884
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "libc/pthread.hh"
#include<osv/stubbing.hh>
#define __APP_SOL__
#define __WORK_AROUND__


using namespace boost::range;
Expand Down Expand Up @@ -254,6 +255,10 @@ int application::join()

_joiner = sched::thread::current();
_runtime.reset();
#ifdef __WORK_AROUND__
debug_always("work-around solution\n" );
sched::thread::current()->wake_with( [&] { _terminated.store(true); });
#endif
sched::thread::wait_until([&] { return _terminated.load(); });

_termination_request_callbacks.clear();
Expand Down
2 changes: 1 addition & 1 deletion linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ long syscall(long number, ...)
sched::fpu_lock fpu;
SCOPE_LOCK(fpu);

debug_always("syscall(): system call %d called by tid:%u\n", number, sched::thread::current()->id());
//debug_always("syscall(): system call %d called by tid:%u\n", number, sched::thread::current()->id());
switch (number) {
SYSCALL2(open, const char *, int);
SYSCALL3(read, int, char *, size_t);
Expand Down

0 comments on commit a7f5884

Please sign in to comment.